Electrification

class elec.Electrification(data_dir=None, update=False)[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

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

Electrification.cdd_elec(*sub_dir, **kwargs)

Change directory to package data directory and sub-directories (and/or a file).

Electrification.collect_etz_codes([…])

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

Electrification.collect_indep_lines_codes([…])

Collect OLE section codes for independent lines from source web page.

Electrification.collect_national_network_codes([…])

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

Electrification.collect_ohns_codes([…])

Collect codes for overhead line electrification neutral sections (OHNS) from source web page.

Electrification.fetch_elec_codes([update, …])

Fetch OLE section codes in electrification catalogue.

Electrification.fetch_etz_codes([update, …])

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

Electrification.fetch_indep_lines_codes([…])

Fetch OLE section codes for independent lines from local backup.

Electrification.fetch_national_network_codes([…])

Fetch OLE section codes for national network from local backup.

Electrification.fetch_ohns_codes([update, …])

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

Electrification.get_indep_line_names()

Get names of independent lines.