Electrification.collect_national_network_codes

Electrification.collect_national_network_codes(confirmation_required=True, verbose=False)

Collect OLE section codes for national network from source web page.

Parameters
  • confirmation_required (bool) – whether to confirm before proceeding, defaults to True

  • verbose (bool or int) – whether to print relevant information in console, 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()
To collect section codes for OLE installations: national network? ... yes

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

>>> print(elec.NationalNetworkKey)
National network

>>> national_network_codes = nn_dat[elec.NationalNetworkKey]

>>> type(national_network_codes)
dict
>>> list(national_network_codes.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']