Bridges.collect_codes(confirmation_required=True, verbose=False)[source]

Collect codes of railway bridges from source web page.

  • 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


data of railway bridges and date of when the data was last updated

Return type:

dict or None


>>> from pyrcs.line_data import Bridges  # from pyrcs import Bridges

>>> bdg = Bridges()

>>> bdg_codes = bdg.collect_codes()
To collect data of railway bridges
? [No]|Yes: yes
>>> type(bdg_codes)
>>> list(bdg_codes.keys())
['East Coast Main Line',
 'West Coast Main Line',
 'Elizabeth Line',
 'London Overground',
 'London Underground',
 'Key to text presentation conventions']

>>> bdg_codes['Key to text presentation conventions']
{'Bold': 'Existing bridges',
 'Bold italic': 'Existing locations',
 'Light italic': 'Former/historical locations',
 'Red': 'Stations',
 'Deep red': 'Level crossings',
 'Brown': 'Ventilation shafts',
 'Purple': 'Junctions',
 'Black,grey': 'Bridges and culverts',
 'Green': 'Tunnel portals',
 'Bright blue': 'Viaducts',
 'Deep blue': 'Boundaries'}