class pyrcs.line_data.ELRMileages(data_dir=None, update=False, verbose=True)[source]

A class for collecting data of Engineer’s Line References (ELRs).

  • data_dir (str or None) – The name of a folder for the data directory, defaults to None.

  • update (bool) – Whether to do an update check (for the package data), defaults to False.

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

  • catalogue (dict) – The catalogue of the data.

  • last_updated_date (str) – The last updated date.

  • data_dir (str) – An absolute path to the data directory.

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

  • measure_headers (list) – A list of possible headers for different measures.


>>> from pyrcs.line_data import ELRMileages  # from pyrcs import ELRMileages

>>> em = ELRMileages()

>>> em.NAME
"Engineer's Line References (ELRs)"

>>> em.URL



str: Key of the dict-type data.


str: Key of the data of the last updated date.


str: Name of the data.


str: URL of the main web page of the data.


collect_elr_by_initial(initial[, update, ...])

Collect Engineer's Line References (ELRs) for a given initial letter from source web page.

collect_mileage_file(elr[, parsed, ...])

Collect mileage file for the given ELR from source web page.

fetch_elr([update, dump_dir, verbose])

Fetch data of ELRs and their associated mileages.

fetch_mileage_file(elr[, update, dump_dir, ...])

Fetch the mileage file for a given ELR.

get_conn_mileages(start_elr, end_elr[, update])

Get a connection point between two ELR-and-mileage pairs.

search_conn(start_elr, start_em, end_elr, end_em)

Search for connection between two ELR-and-mileage pairs.