LocationIdentifiers.collect_explanatory_note¶
- LocationIdentifiers.collect_explanatory_note(confirmation_required=True, verbose=False)[source]¶
Collects the explanatory note related to multiple station codes (CRS codes) from the source web page.
- Parameters:
confirmation_required – Whether user confirmation is required before proceeding; defaults to
True
.verbose (bool | int) – Whether to print relevant information to the console; defaults to
False
.
- Returns:
A dictionary containing the data of the multiple station codes explanatory note, or
None
if the note is not found or the collection is not performed.- Return type:
dict | None
Examples:
>>> from pyrcs.line_data import LocationIdentifiers >>> # from pyrcs import LocationIdentifiers >>> lid = LocationIdentifiers() >>> exp_note = lid.collect_explanatory_note() To collect data of Multiple station codes explanatory note ? [No]|Yes: yes >>> type(exp_note) dict >>> list(exp_note.keys()) ['Multiple station codes explanatory note', 'Notes', 'Last updated date'] >>> lid.KEY_TO_MSCEN 'Multiple station codes explanatory note' >>> exp_note_dat = exp_note[lid.KEY_TO_MSCEN] >>> type(exp_note_dat) pandas.core.frame.DataFrame >>> exp_note_dat.head() Location CRS CRS_alt1 CRS_alt2 0 Glasgow Central GLC GCL 1 Glasgow Queen Street GLQ GQL 2 Heworth HEW HEZ 3 Highbury & Islington HHY HII XHZ 4 Lichfield Trent Valley LTV LIF