Electrification.collect_indep_lines_codes
- Electrification.collect_indep_lines_codes(confirmation_required=True, verbose=False)
Collect OLE section codes for independent lines from source web page.
- Parameters
confirmation_required (bool) – whether to confirm before proceeding, defaults to
True
verbose (bool or int) – whether to print relevant information in console, defaults to
False
- Returns
OLE section codes for independent lines
- Return type
dict or None
Examples:
>>> from pyrcs.line_data import Electrification # from pyrcs import Electrification >>> elec = Electrification() >>> indep_lines_codes = elec.collect_indep_lines_codes() To collect section codes for OLE installations: independent lines ? [No]|Yes: yes >>> type(indep_lines_codes) dict >>> list(indep_lines_codes.keys()) ['Independent lines', 'Last updated date'] >>> elec.KEY_TO_INDEPENDENT_LINES 'Independent lines' >>> indep_lines_codes_dat = indep_lines_codes[elec.KEY_TO_INDEPENDENT_LINES] >>> type(indep_lines_codes_dat) dict >>> len(indep_lines_codes_dat) 22 >>> 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 Legs'... 'Channel Tunnel', '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', 'Midland Metro [West Midlands]', 'Nottingham Express Transit', 'Seaton Tramway', 'Sheffield Supertram', 'Snaefell Mountain Railway', 'Summerlee, Museum of Scottish Industrial Life Tramway', 'Tyne & Wear Metro'] >>> indep_lines_codes_dat['Beamish Tramway'] {'Codes': None, 'Notes': 'Masts do not appear labelled.'}