LocationIdentifiers.fetch_other_systems_codes¶
-
LocationIdentifiers.
fetch_other_systems_codes
(update=False, pickle_it=False, data_dir=None, verbose=False)¶ Fetch data of other systems’ codes from local backup.
- Parameters
update (bool) – whether to do an update check (for the package data), defaults to
False
pickle_it (bool) – whether to save the data as a pickle file, defaults to
False
data_dir (str or None) – name of a folder where the pickle file is to be saved, 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
Example:
>>> from pyrcs.line_data import LocationIdentifiers >>> lid = LocationIdentifiers() >>> # os_dat = lid.fetch_other_systems_codes(update=True, verbose=True) >>> os_dat = lid.fetch_other_systems_codes() >>> type(os_dat) dict >>> list(os_dat.keys()) ['Other systems', 'Last updated date'] >>> print(lid.OtherSystemsKey) Other systems >>> os_codes = os_dat[lid.OtherSystemsKey] >>> type(os_codes) dict >>> list(os_codes.keys()) ['Córas Iompair Éireann (Republic of Ireland)', 'Crossrail', 'Croydon Tramlink', 'Docklands Light Railway', 'Manchester Metrolink', 'Translink (Northern Ireland)', 'Tyne & Wear Metro']