Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anisotropi4/tpr
A scrape of the Network Rail Timetable Planning Rules
https://github.com/anisotropi4/tpr
Last synced: 3 days ago
JSON representation
A scrape of the Network Rail Timetable Planning Rules
- Host: GitHub
- URL: https://github.com/anisotropi4/tpr
- Owner: anisotropi4
- License: apache-2.0
- Created: 2023-12-22T13:47:50.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-22T21:59:38.000Z (about 1 year ago)
- Last Synced: 2024-11-05T05:26:11.411Z (about 2 months ago)
- Language: Python
- Size: 8.55 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TPR
A scrape of the Network Rail Timetable Planning Rules (TPR)## The Rail Timetable Planning Rules (TPR) for the British rail network
The Network Rail [Timetable Planning Rules](https://www.networkrail.co.uk/industry-and-commercial/information-for-operators/operational-rules/) are used to regulate the standard timings between stations and junctions together with other matters enabling trains to be scheduled into the working timetable for the various parts of the main rail network. However, as this consists of ~10 PDF file for each calendar year, their use is significantly restricted.This repository uses scripts in `shell`, `python` and the [`Tabula`](https://github.com/tabulapdf) project to liberate data and tables trapped inside these PDF files for a given year.
With all data extracted to unstructured text files and the tabular data into Tab Separated Variable (TSV) files.
## Data Extract
To extract the data1. download the set of TPR PDF files for the year of interest.
2. execute the bundled data extract scripts:```{bash}
$ ./run.sh
```This creates unstructure text files named `-.txt` in the `txt` directory, and TSV files named `-.tsv`in the `lattice` directory.
## Data
A link to the raw text is [here](TPR-txt.md), and a markdown representation of the TSV files is [here](TPR-tsv.md)
## Acknowledgment
The data is copyright © 2023 Network Rail, and used with thanks to Network Rail for making this data available.