- Notifications
You must be signed in to change notification settings - Fork0
R package to make it easier to get started with travel time analyses in bits of Britain
License
NotificationsYou must be signed in to change notification settings
stupidpupil/parochial
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A R package to make it easier to get started with travel time analyses in bits of Britain.
parochial will download:
- OpenStreetMap data from geofabrik.de
- Welsh and Scottish bus etc. data from Traveline (requires registration)
- "heavy" rail data from data.atoc.org (requires registration)
- English bus etc. and Transport for London open data fromDfT BODS GOV.UK
- Terrain elevation data from Ordnance Survey
parochial
- processes TransXChange and CIF timetables to GTFS using{UK2GTFS}
- crops maps, usingosmium, and timetables to a particular geospatial area and period in time
- buffers geospatial bounds where appropriate to ensure adequate coverage
- fits public transport routes to roads and railways usingpfaedle
- merges and compress GTFS timetables usinggtfstidy
parochial can prepare:
- OpenTripPlanner network graphs, good for planning single journeys
- {r5r} network graphs, good for producing many-to-many multimodal public transport travel time matrices
- OSRM network graphs, good for producing many-to-many driving travel time matrices
- Includes a GitHub Actions workflow with extensive parallelisation
- Supports caching of downloads and outputs, both when run as a GitHub Action and when run locally
- Writes metadata alongside outputs, including licensing and coverage info
- R
- osmium
- Support for symlinks (e.g. macOS, Linux includingWindows Subsystem for Linux)
devtools::install_github("stupidpupil/parochial")library(parochial)# Complete config.ymlcheck_config_and_environment()download_atoc()prepare_atoc_gtfs()download_tnds()prepare_tnds_gtfs()download_and_prepare_bods_gtfs()download_and_prepare_osm()# If you want to include elevation data (e.g. for walking, cycling)download_terrain50()prepare_terrain50()# If you've got gtfstidy and pfaedle installedif(gtfstidy_is_available()& pfaedle_is_available()){ prepare_merged_gtfs()}# OpenTripPlanner# (Requires JDK 17)download_otp()prepare_street_graph()prepare_transport_graph()# output/opentripplanner/ should now contain graph.obj# r5r# (Requires JDK 11)prepare_r5r_network_dat()# output/r5r/ should now contain network.dat# OSRMif(osrm_is_available()){ prepare_osrm_graph()}# output/osrm/ should now contain OSRM graph files
Outputs include data derived from the following sources:
Data | License | Source |
---|---|---|
ATOC Heavy Rail Timetables | CC-BY-2.0 | RSP Limited (Rail Delivery Group) |
DfT Bus Open Data Service (BODS) | OGL-UK-3.0 | Department for Transport (UK Government) |
Traveline National Data Set (TNDS) | OGL-UK-3.0 | Traveline |
OpenStreetMap data | ODbL-1.0 | OpenStreetMap contributors, Geofabrik.de |
Terrain 50 elevation data | OGL-UK-3.0 | Ordnance Survey |
This project developed out of aNHS Welsh Modelling Collaborative hackathon, with the support of colleagues across NHS Wales including James Cooke of the Welsh Ambulance Service.
Important inspiration included thegraphite project produced as part ofa piece of work by the ONS Data Campus. Also of note is theOTP4GB project andother work by ODI Leeds.
About
R package to make it easier to get started with travel time analyses in bits of Britain