Electrification.fetch_elec_codes¶
-
Electrification.
fetch_elec_codes
(update=False, pickle_it=False, data_dir=None, verbose=False)¶ Fetch OLE section codes in electrification catalogue.
- Parameters
update (bool) – whether to do an update check (for the package data), defaults to
False
pickle_it (bool) – whether to save the data as a pickle file, defaults to
False
data_dir (str or None) – name of a folder where the pickle file is to be saved, defaults to
None
verbose (bool or int) – whether to print relevant information in console, defaults to
False
- Returns
section codes for overhead line electrification (OLE) installations
- Return type
dict
Example:
>>> from pyrcs.line_data import Electrification >>> elec = Electrification() >>> # electrification_codes = elec.fetch_elec_codes(update=True, verbose=True) >>> electrification_data = elec.fetch_elec_codes() >>> type(electrification_data) dict >>> list(electrification_data.keys()) ['Electrification', 'Last updated date'] >>> print(elec.Key) Electrification >>> electrification_codes = electrification_data[elec.Key] >>> type(electrification_codes) dict >>> list(electrification_codes.keys()) ['National network energy tariff zones', 'Independent lines', 'National network', 'National network neutral sections']