LocationIdentifiers.fetch_other_systems_codes
- LocationIdentifiers.fetch_other_systems_codes(update=False, dump_dir=None, verbose=False)
Fetch data of other systems’ station codes.
- Parameters
update (bool) – whether to do an update check (for the package data), defaults to
False
dump_dir (str or None) – pathname of a directory where the data file is dumped, defaults to
None
verbose (bool or int) – whether to print relevant information in console, defaults to
False
- Returns
codes of other systems
- Return type
dict
Examples:
>>> from pyrcs.line_data import LocationIdentifiers >>> # from pyrcs import LocationIdentifiers >>> lid = LocationIdentifiers() >>> os_codes = lid.fetch_other_systems_codes() >>> type(os_codes) dict >>> list(os_codes.keys()) ['Other systems', 'Last updated date'] >>> lid.KEY_TO_OTHER_SYSTEMS 'Other systems' >>> os_codes_dat = os_codes[lid.KEY_TO_OTHER_SYSTEMS] >>> type(os_codes_dat) collections.defaultdict >>> list(os_codes_dat.keys()) ['Córas Iompair Éireann (Republic of Ireland)', 'Crossrail', 'Croydon Tramlink', 'Docklands Light Railway', 'Manchester Metrolink', 'Translink (Northern Ireland)', 'Tyne & Wear Metro']