Stations

class station.Stations(data_dir=None, update=False)[source]

A class for collecting railway station data.

Parameters
  • data_dir (str, 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.other_assets import Stations

>>> stn = Stations()

>>> print(stn.Name)
Stations

>>> print(stn.SourceURL)
http://www.railwaycodes.org.uk/stations/station0.shtm

Methods

Stations.cdd_stn(*sub_dir, **kwargs)

Change directory to package data directory and sub-directories (and/or a file).

Stations.collect_railway_station_data_by_initial(initial)

Collect railway station data for the given initial letter.

Stations.fetch_railway_station_data([…])

Fetch railway station data from local backup.

Stations.parse_current_operator(x)

Parse ‘Operator’ column