ELRMileages
- class pyrcs.line_data.elr_mileage.ELRMileages(data_dir=None, update=False, verbose=True)
A class for collecting data of Engineer’s Line References (ELRs).
- Parameters
data_dir (str or None) – name of 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
- 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 ELRMileages # from pyrcs import ELRMileages >>> em = ELRMileages() >>> em.NAME "Engineer's Line References (ELRs)" >>> em.URL 'http://www.railwaycodes.org.uk/elrs/elr0.shtm'
Attributes
Key of the dict-type data
Key of the data of the last updated date
Name of the data
URL of the main web page of the data
Methods
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.