Bridges.fetch_codes(update=False, dump_dir=None, verbose=False)[source]

Fetch codes of railway bridges.

  • 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


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.fetch_codes()

>>> 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'}