Electrification.fetch_national_network_codes¶
-
Electrification.
fetch_national_network_codes
(update=False, pickle_it=False, data_dir=None, verbose=False)[source]¶ Fetch OLE section codes for national network from local backup.
- Parameters
update (bool) – whether to check on update and proceed to update the package data, defaults to
False
pickle_it (bool) – whether to replace the current package data with newly collected data, defaults to
False
data_dir (str or None) – name of package data folder, defaults to
None
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_ole_dat = elec.fetch_national_network_codes(update=True, verbose=True) >>> nn_dat = elec.fetch_national_network_codes() >>> 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']