Bridges

class pyrcs.line_data.bridge.Bridges(data_dir=None, verbose=True)

A class for collecting data of railway bridges.

Parameters
  • data_dir (str or None) – name of data directory, defaults to None

  • verbose (bool or int) – whether to print relevant information in console, defaults to True

Variables
  • catalogue (dict) – catalogue of the data

  • last_updated_date (str) – last update date

  • data_dir (str) – path to the data directory

  • current_data_dir (str) – path to the current data directory

Examples:

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

>>> bdg = Bridges()

>>> bdg.NAME
'Railway bridges'

>>> bdg.URL
'http://www.railwaycodes.org.uk/bridges/bridges0.shtm'

Attributes

KEY

Key of the dict-type data

KEY_TO_LAST_UPDATED_DATE

Key of the data of the last updated date

NAME

Name of the data

URL

URL of the main web page of the data

Methods

collect_codes([confirmation_required, verbose])

Collect codes of railway bridges from source web page.

fetch_codes([update, dump_dir, verbose])

Fetch codes of railway bridges.