LocationIdentifiers¶
-
class
loc_id.
LocationIdentifiers
(data_dir=None, update=False)[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
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
Create a replacement dictionary for location name amendments.
LocationIdentifiers.cdd_lc
(*sub_dir, **kwargs)Change directory to package data directory and sub-directories (and/or a file).
Collect note about CRS code from source web page.
Collect CRS, NLC, TIPLOC, STANME and STANOX codes for a given
initial
letter.Collect data of other systems’ codes from source web page.
Fetch multiple station codes explanatory note from local backup.
Fetch CRS, NLC, TIPLOC, STANME and STANOX codes from local backup.
Fetch data of other systems’ codes from local backup.
LocationIdentifiers.make_loc_id_dict
(keys[, …])Make a dict/dataframe for location code data for the given
keys
.LocationIdentifiers.parse_note_page
(note_url)Parse addition note page.