LocationIdentifiers

class loc_id.LocationIdentifiers(data_dir=None, update=False, verbose=True)[source]

A class for collecting location identifiers (including other systems station).

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 LocationIdentifiers

>>> lid = LocationIdentifiers()

>>> print(lid.Name)
CRS, NLC, TIPLOC and STANOX codes

>>> print(lid.SourceURL)
http://www.railwaycodes.org.uk/crs/CRS0.shtm

Methods

amendment_to_loc_names()

Create a replacement dictionary for location name amendments.

collect_explanatory_note([…])

Collect note about CRS code from source web page.

collect_loc_codes_by_initial(initial[, …])

Collect CRS, NLC, TIPLOC, STANME and STANOX codes for a given initial letter.

collect_other_systems_codes([…])

Collect data of other systems’ codes from source web page.

fetch_explanatory_note([update, pickle_it, …])

Fetch multiple station codes explanatory note from local backup.

fetch_location_codes([update, pickle_it, …])

Fetch CRS, NLC, TIPLOC, STANME and STANOX codes from local backup.

fetch_other_systems_codes([update, …])

Fetch data of other systems’ codes from local backup.

make_loc_id_dict(keys[, initials, …])

Make a dict/dataframe for location code data for the given keys.

parse_note_page(note_url[, parser, verbose])

Parse addition note page.