Electrification

class elec.Electrification(data_dir=None, update=False, verbose=True)[source]

A class for collecting section codes for OLE installations.

Parameters
  • data_dir (str or None) – name of data directory, defaults to None

  • update (bool) – whether to check on update and proceed to update the package data, defaults to False

  • verbose (bool or int) – whether to print relevant information in console as the function runs, defaults to True

Variables
  • Name (str) – name of the data

  • Key (str) – key of the dict-type data

  • HomeURL (str) – URL of the main homepage

  • SourceURL (str) – URL of the data web page

  • LUDKey (str) – key of the last updated date

  • LUD (str) – last updated date

  • Catalogue (dict) – catalogue of the data

  • DataDir (str) – path to the data directory

  • CurrentDataDir (str) – path to the current data directory

  • NationalNetworkKey (str) – key of the dict-type data of national network

  • NationalNetworkPickle (str) – name of the pickle file of national network data

  • IndependentLinesKey (str) – key of the dict-type data of independent lines

  • IndependentLinesPickle (str) – name of the pickle file of independent lines data

  • OhnsKey (str) – key of the dict-type data of OHNS

  • OhnsPickle (str) – name of the pickle file of OHNS data

  • TariffZonesKey (str) – key of the dict-type data of tariff zones

  • TariffZonesPickle (str) – name of the pickle file of tariff zones data

Example:

>>> from pyrcs.line_data import Electrification

>>> elec = Electrification()

>>> print(elec.Name)
Electrification masts and related features

>>> print(elec.SourceURL)
http://www.railwaycodes.org.uk/electrification/mast_prefix0.shtm

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_national_network_codes([…])

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_elec_codes([update, pickle_it, …])

Fetch OLE section codes in electrification catalogue.

fetch_etz_codes([update, pickle_it, …])

Fetch OLE section codes for national network energy tariff zones from source web page.

fetch_indep_lines_codes([update, pickle_it, …])

Fetch OLE section codes for independent lines from local backup.

fetch_national_network_codes([update, …])

Fetch OLE section codes for national network from local backup.

fetch_ohns_codes([update, pickle_it, …])

Fetch codes for overhead line electrification neutral sections (OHNS) from local backup.

get_indep_line_names([verbose])

Get names of independent lines.