Using the Office of Road and Rail (ORR) Financial Year 2018/19 to 2022/23 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.
Individual animated station flows for the five financial-years and 2 579 stations on the mainline British rail network here. This is now in a one column format.
This is an update following the additional publication of passenger flow data by the ORR. The original FY2021/22 README and two 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 |
---|---|
All data used on the basis that it under open or permissive license
- The base map of mainland Britain is derived from the WorldPop base maps under CC 4.0 by deed retrieved 2023-09-07.
- The centre-line track-model is hosted by OpenRailData under the Open Government License by Network Rail, retrieved 2023-07-11.
- The Origin Destination Matrix data, for example ODM 2022-23, were 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 data 2024-02-22 as local
bzip2
compressed copies. - The Station Attributes for All-Mainline Stations was publised by the Office of Road and Rail under the Open Government License. Retrieved 2024-02-18.
- The Network Rail CORPUS dataset is an open data feed which is released under a OGL. Retrieved 2023-11-29 as a local copy.
- The National Public Transport Access Network NaPTAN under OGL, and is updated each time the scripts are run.
- While this implementation now uses NaPTAN and CORPUS to validate and identify six closed stations, the 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.
This is likely to only be of interest if you were interested in recreating the repository yourself
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.
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 localvenv
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 579
GeoPKG
files for each station on the mainland network in theoutput
directory, - create a
journeys-all.gpkg
file with an aggregated total for all network segments in the model, - create 12 895 (5 x 2 579)
PNG
image files for each station in a heirachy of directories in theimage
directory - create 2 579 animated
GIF
image files for each station in a heirachy of directories in theimage
directory - create a one-column
station.md
markdown file with a link to each image file
The original travel data was kindly provided by Alasdair Rae, with the centre-line track-model by Peter Hicks through #OpenRailData.
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 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.