Electrification.collect_indep_lines_codes

Electrification.collect_indep_lines_codes(confirmation_required=True, verbose=False)[source]

Collect OLE section codes for independent lines from source web page.

Parameters
  • confirmation_required (bool) – whether to require users to confirm and proceed, defaults to True

  • verbose (bool or int) – whether to print relevant information in console as the function runs, defaults to False

Returns

OLE section codes for independent lines

Return type

dict or None

Example:

>>> from pyrcs.line_data import Electrification

>>> elec = Electrification()

>>> il_ole_dat = elec.collect_indep_lines_codes(confirmation_required=False)

>>> type(il_ole_dat)
dict
>>> list(il_ole_dat.keys())
['Independent lines', 'Last updated date']

>>> type(il_ole_dat['Independent lines'])
dict
>>> list(il_ole_dat['Independent lines'].keys())[-5:]
['Seaton Tramway',
 'Sheffield Supertram',
 'Snaefell Mountain Railway',
 'Summerlee, Museum of Scottish Industrial Life Tramway',
 'Tyne & Wear Metro']