LOR

class lor_code.LOR(data_dir=None, update=False, verbose=True)[source]

A class for collecting PRIDE/LOR codes.

  • PRIDE: Possession Resource Information Database

  • LOR: Line Of Route

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

  • update (bool) – whether to check on update and proceed to update the package data, defaults to False

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

Example:

>>> from pyrcs.line_data import LOR

>>> lor = LOR()

>>> print(lor.Name)
Possession Resource Information Database (PRIDE)/Line Of Route (LOR) codes

>>> print(lor.SourceURL)
http://www.railwaycodes.org.uk/pride/pride0.shtm

Methods

collect_elr_lor_converter([…])

Collect ELR/LOR converter from source web page.

collect_lor_codes_by_prefix(prefix[, …])

Collect PRIDE/LOR codes by a given prefix.

fetch_elr_lor_converter([update, pickle_it, …])

Fetch ELR/LOR converter from local backup.

fetch_lor_codes([update, pickle_it, …])

Fetch PRIDE/LOR codes from local backup.

get_keys_to_prefixes([prefixes_only, …])

Get key to PRIDE/LOR code prefixes.

get_lor_page_urls([update, verbose])

Get URLs to PRIDE/LOR codes with different prefixes.

update_catalogue([confirmation_required, …])

Update catalogue data including keys to prefixes and LOR page URLs.