Stations¶
-
class
station.
Stations
(data_dir=None, verbose=True)[source]¶ A class for collecting railway station data.
- Parameters
data_dir (str, None) – name of data directory, defaults to
None
verbose (bool or int) – whether to print relevant information in console as the function runs, defaults to
True
- Variables
Name (str) – name of the data
Key (str) – key of the dict-type data
HomeURL (str) – URL of the main homepage
SourceURL (str) – URL of the data web page
LUDKey (str) – key of the last updated date
LUD (str) – last updated date
Catalogue (dict) – catalogue of the data
DataDir (str) – path to the data directory
CurrentDataDir (str) – path to the current data directory
StnKey (str) – key of the dict-type data of railway stations
StnPickle (str) – name of the pickle file of railway station data
BilingualKey (str) – key of the dict-type data of bilingual names
SpStnNameSignKey (str) – key of the dict-type data of sponsored station name signs
NSFOKey (str) – key of the dict-type data of stations not served by SFO
IntlKey (str) – key of the dict-type data of UK international railway stations
TriviaKey (str) – key of the dict-type data of UK railway station trivia
ARKey (str) – key of the dict-type data of UK railway station access rights
BarrierErrKey (str) – key of the dict-type data of railway station barrier error codes
Example:
>>> from pyrcs.other_assets import Stations >>> stn = Stations() >>> print(stn.Name) Railway station data >>> print(stn.SourceURL) http://www.railwaycodes.org.uk/stations/station0.shtm
Methods
collect_station_data_by_initial
(initial[, …])Collect railway station data for the given
initial
letter.extended_info
(info_dat, name)Get extended information of the owners/operators.
fetch_station_data
([update, pickle_it, …])Fetch railway station data from local backup.
get_station_data_catalogue
([update, verbose])Get catalogue of railway station data.