SkillAgentSearch skills...

Kingfisher

ORR FY2018/19 to FY2023/24 passenger travel data projected onto the centre-line track-model

Install / Use

/learn @anisotropi4/Kingfisher
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

kingfisher

Using the Office of Road and Rail (ORR) Financial Year 2018/19 to 2024/25 passenger travel data projected onto a shortest-path network using the centre-line track-model this project looks to create visualisation for passenger journey numbers for the active rail stations across the British rail network.

Station Flow

Individual animated station flows for the five financial-years and 2 587 stations on the mainline British rail network here, now in a one column format.

Notes

This is an update following the additional publication of passenger flow data by the ORR. The original FY2021/22 README and one column format view is available here. As well as an OpenInnovations blog post and a Bloomberg article "Nine Maps Show How Britain Is on the Move"

Station locations may change as they are now based on the ORR Station Attributes for All-Mainline Stations.

|Aggregated Passenger Journeys|Aggregated Passenger Journeys| |---|---| ||| ||| ||| |||

Data

All data used on the basis that it under open or permissive license

  1. The base map of mainland Britain is derived from the WorldPop base maps under CC 4.0 by deed retrieved 2023-09-07.
  2. The centre-line track-model is derived from the railway-model railway-links layer (NWR Track Model) hosted by the Rail Data Marketplace under the Open Government License by Network Rail, retrieved 2024-10-12, and as a local copy as a GeoPKG format file.
  3. The Origin Destination Matrix data, for example ODM 2022-23, published by the Office of Road and Rail on the Rail Development Group Rail Data Market place, details under the Open Government License. Retrieved 2024-02-18, except FY2022/23 on 2024-02-22 and FY2023/24 on 2024-11-23, as local bzip2 compressed copies.
  4. The Station Attributes for All-Mainline Stations (Table 6329) was published by the Office of Road and Rail under the Open Government License. Retrieved 2024-11-18.
  5. The Network Rail CORPUS dataset is an open data feed which is hosted by the Rail Data marketplace released under a OGL. Retrieved 2024-11-24 as a gzip compressed local copy.
  6. The National Public Transport Access Network NaPTAN under the OGL, and is updated each time the scripts are run.
  7. While this implementation now uses NaPTAN and CORPUS to validate and identify a closed stations, the Isle of Wight ferry-link continues to use OpenStreetMap data, licensed under CC-BY-SA 2.0 through the OverPassAPI Turbo service, and is updated each time the scripts are run.

Implementation Detail

This is likely to only be of interest if you were interested in recreating the repository yourself

Running the Code

The repository has been updated with beta version of the code tested under Linux Mint 21.2 Victoria and python 3.11. This is then a set of details about some of the murky workings of how this hangs together.

Installation and Execution

To execute the code on a Linux Debian or similar environment with a working python3, run the run.sh script:

   $ ./run.sh

This takes quite a long time. On my old kit quite few hours to complete all the processing. It then carries out a number of steps which are meant to:

  • create the directory structure,
  • install required python dependencies in in a local venv virtual enviroment,
  • download additional data,
  • create a station location file work/odm-station.gpkg,
  • create a cache file work/odm-path.gpkg containing intermediate data layers,
  • create 2 595 parquet files for each station on the mainland network in the output directory,
  • create a journeys-all.gpkg file with an aggregated total for all network segments in the model,
  • create 15 522 (6 x 2 587) PNG image files for each station in a heirachy of directories in the image directory
  • create 2 593 animated GIF image files for each station in a heirachy of directories in the image directory
  • create a one-column station.md markdown file with a link to each image file

Acknowledgment

The original travel data was kindly provided by Alasdair Rae, with the original centre-line track-model by Peter Hicks through #OpenRailData.

License

The images in the image directory are under the CC BY 4.0 license The repository code and scripts are under the Apache 2.0 license

Thanks

Thanks is then given to WorldPop, Network Rail, the Office of Road and Rail, the Rail Delivery Group, the UK Department for Transport, the maintainers of the OverPassAPI, and all the contributors to OpenStreetMap for kindly providing their data for use in this project.

View on GitHub
GitHub Stars125
CategoryDevelopment
Updated3mo ago
Forks6

Languages

Python

Security Score

92/100

Audited on Dec 13, 2025

No findings