Electrification
- class pyrcs.line_data.elec.Electrification(data_dir=None, update=False, verbose=True)
A class for collecting section codes for overhead line electrification (OLE) installations.
- Parameters
data_dir (str or None) – name of data directory, defaults to
None
update (bool) – whether to do an update check (for the package data), defaults to
False
verbose (bool or int) – whether to print relevant information in console, defaults to
True
- Variables
catalogue (dict) – catalogue of the data
last_updated_date (str) – last update date
data_dir (str) – path to the data directory
current_data_dir (str) – path to the current data directory
Examples:
>>> from pyrcs.line_data import Electrification # from pyrcs import Electrification >>> elec = Electrification() >>> elec.NAME 'Section codes for overhead line electrification (OLE) installations' >>> elec.URL 'http://www.railwaycodes.org.uk/electrification/mast_prefix0.shtm'
Attributes
Key of the dict-type data
Key of the dict-type data of the 'UK railway electrification tariff zones'
Key of the dict-type data of the 'independent lines'
Key of the data of the last updated date
Key of the dict-type data of the 'national network'
Key of the dict-type data of the 'overhead line electrification neutral sections (OHNS)'
Name of the data
URL of the main web page of the data
Methods
collect_etz_codes
([confirmation_required, ...])Collect OLE section codes for national network energy tariff zones from source web page.
collect_indep_lines_codes
([...])Collect OLE section codes for independent lines from source web page.
Collect OLE section codes for national network from source web page.
collect_ohns_codes
([confirmation_required, ...])Collect codes for overhead line electrification neutral sections (OHNS) from source web page.
fetch_codes
([update, dump_dir, verbose])Fetch OLE section codes listed in the Electrification catalogue.
fetch_etz_codes
([update, dump_dir, verbose])Fetch OLE section codes for national network energy tariff zones.
fetch_indep_lines_codes
([update, dump_dir, ...])Fetch OLE section codes for independent lines.
fetch_national_network_codes
([update, ...])Fetch OLE section codes for national network.
fetch_ohns_codes
([update, dump_dir, verbose])Fetch codes for overhead line electrification neutral sections (OHNS).
get_indep_line_catalogue
([update, verbose])Get a catalogue for independent lines.