Electrification.collect_national_network_codes

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

Collect OLE section codes for national network 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 National network

Return type

dict or None

Example:

>>> from pyrcs.line_data import Electrification

>>> elec = Electrification()

>>> nn_dat = elec.collect_national_network_codes(confirmation_required=False)

>>> type(nn_dat)
dict
>>> list(nn_dat.keys())
['National network', 'Last updated date']

>>> type(nn_dat['National network'])
dict
>>> list(nn_dat['National network'].keys())
['Traditional numbering system distance and sequence',
 'New numbering system km and decimal',
 'Codes not certain confirmation is welcome',
 'Suspicious data',
 'An odd one to complete the record',
 'LBSC/Southern Railway overhead system',
 'Codes not known']