Electrification.fetch_independent_lines_codes

Electrification.fetch_independent_lines_codes(update=False, dump_dir=None, verbose=False, **kwargs)[source]

Fetch OLE section codes for independent lines.

Parameters:
  • update (bool) – Whether to check for updates to the package data; defaults to False.

  • dump_dir (str | None) – Path to a directory where the data file will be saved; defaults to None.

  • verbose (bool | int) – Whether to print relevant information to the console; defaults to False.

Returns:

A dictionary of OLE section codes for independent lines.

Return type:

dict

Examples:

>>> from pyrcs.line_data import Electrification  # from pyrcs import Electrification

>>> elec = Electrification()

>>> indep_lines_codes = elec.fetch_independent_lines_codes()

>>> type(indep_lines_codes)
dict
>>> list(indep_lines_codes.keys())
['Independent lines', 'Last updated date']

>>> indep_lines_codes_dat = indep_lines_codes['Independent lines']
>>> type(indep_lines_codes_dat)
dict
>>> len(indep_lines_codes_dat)
24
>>> list(indep_lines_codes_dat.keys())
['Beamish Tramway',
 'Birkenhead Tramway',
 'Black Country Living Museum [Tipton]',
 'Blackpool Tramway',
 "Brighton and Rottingdean Seashore Electric Railway [Magnus Volk's 'Daddy Long Leg...
 'Channel Tunnel',
 'Conwy Valley Railway Museum',
 'Croydon Tramlink',
 'East Anglia Transport Museum [Lowestoft]',
 'Edinburgh Tramway',
 'Heath Park Tramway [Cardiff]',
 'Heaton Park Tramway [Manchester]',
 'Iarnród Éireann',
 'Luas [Dublin]',
 'Manchester Metrolink',
 'Manx Electric Railway',
 'Nottingham Express Transit',
 'Seaton Tramway',
 'Sheffield Supertram',
 'Snaefell Mountain Railway',
 'Summerlee, Museum of Scottish Industrial Life Tramway',
 'Tyne & Wear Metro',
 'West Midlands Metro [West Midlands]',
 'SPL Powerlines']

>>> indep_lines_codes_dat['Beamish Tramway']
{'Codes': None, 'Notes': 'Masts do not appear labelled.'}