LocationIdentifiers.collect_loc_codes_by_initial¶
-
LocationIdentifiers.
collect_loc_codes_by_initial
(initial, update=False, verbose=False)[source]¶ Collect CRS, NLC, TIPLOC, STANME and STANOX codes for a given
initial
letter.- Parameters
initial (str) – initial letter of station/junction name or certain word for specifying URL
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
False
- Returns
data of location codes for the given
initial
letter; and date of when the data was last updated- Return type
dict
Example:
>>> from pyrcs.line_data import LocationIdentifiers >>> lid = LocationIdentifiers() >>> location_codes_a = lid.collect_loc_codes_by_initial(initial='a') >>> type(location_codes_a) <class 'dict'> >>> print(list(location_codes_a.keys())) ['A', 'Additional notes', 'Last updated date']