LocationIdentifiers.fetch_other_systems_codes

LocationIdentifiers.fetch_other_systems_codes(update=False, dump_dir=None, verbose=False, **kwargs)[source]

Fetches data of other systems’ station codes.

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

  • dump_dir (str | None) – The 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 containing station codes for 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']