LocationIdentifiers.collect_other_systems_codes

LocationIdentifiers.collect_other_systems_codes(confirmation_required=True, verbose=False)[source]

Collect data of other systems’ station codes from source web page.

Parameters:
  • confirmation_required (bool) – Whether to confirm before proceeding; defaults to True.

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

Returns:

Codes of other systems.

Return type:

dict | None

Examples:

>>> from pyrcs.line_data import LocationIdentifiers
>>> # from pyrcs import LocationIdentifiers
>>> lid = LocationIdentifiers()
>>> os_codes = lid.collect_other_systems_codes()
To collect data of Other systems
? [No]|Yes: yes
>>> 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']