These travel time matrices show travel times between LSOA11 Trip-points in Wales and the borders and some hospital sites relevant to NHS Wales.
(LSOA-to-LSOA travel time matrices are available here.)
Hospital site locations are mostly derived from a combination of OpenStreetMap and Wikidata, and many should be accurate to within a few metres of hospitals' main entrances. (A very small number of sites might only be accurate to their postcode centroid.)
These times are generated using street map and public transport timetable data for Wales and bordering regions and the r5r library, which is built on top of the Rapid Realistic Routing on Real-world and Reimagined networks (R5) routing engine.
They are regenerated weekly.
library(tidyverse)
travel_time_lookup <- read_csv("https://raw.githubusercontent.com/stupidpupil/nhs_wales_travel_time_matrices/matrix-releases/Tue0800_Tue1200_public_p50.csv", comment="#")
The maximum walking distance is 1.5 kilometre. Walking speed is 3.6 km/h. This is likely a little faster than many people with impaired mobility.
The maximum trip duration is 3 hours.
Transfer "slack" time - the minimum time between alighting from one vehicle and boarding another - is believed to be 120 seconds. This is likely too short, particularly given issues with punctuality and reliability that are otherwise not accounted for. (Unfortunately, it is difficult to change this parameter in r5r/R5 at this time.)
Travel times are calculated seperately for travelling from LSOAs to hospital sites ("siteward-bound" trips) and to LSOAs back from hospital sites ("homeward-bound" trips.)
Travel times are currently calculated over the departure window from 08:00 to 16:00 on a Tuesday for siteward-bound trips, and for the window from noon until 20:00 for homeward-bound trips, and the median travel time for someone starting their journey at some time in those windows is taken. (A different approach, better reflecting travel-plus-waiting times for appointments, might be developed in the future for siteward-bound trips.)
Where the median travel time is under the maximum trip duration for both the siteward- and homeward-bound trips, then the two travel times are averaged together as the travel_time_minutes
field. If the median travel time for either leg is too high (or travel is not possible at all given other constraints) then the combination of LSOA and hospital site are excluded entirely.
In general, we suggest using the travel_time_minutes
field for most purposes.
These times are generated using OpenStreetMap (OSM) road network data and the Open Source Routing Machine (OSRM).
Drive-times are saved as a matrix with origins as rows and destinations as columns. The code below will download this matrix and transform it to a lookup table using tidyr::pivot_longer()
.
library(tidyverse)
travel_time_matrix <- read_csv("https://raw.githubusercontent.com/stupidpupil/nhs_wales_travel_time_matrices/matrix-releases/arrive_by_0900_driving.csv", comment="#")
travel_time_lookup <- travel_time_matrix %>% pivot_longer(-from_id, names_to='to_id', values_to='travel_time_minutes')
Car speeds are taken from the Department for Transport's Journey Time Statistics: Notes Definitions and reflect average traffic speeds on different types of roads in the "morning peak" between 7 and 10am in 2017.
The table below shows the speeds and how they're mapped on to OpenStreetMap's highway
tags in OSRM.
DfT Type of Road | OSM highway Tags |
km/h | mph |
---|---|---|---|
Motorway | motorway | 77.6 | 48.1 |
A road | trunk, primary | 43.2 | 26.8 |
B road | secondary | 41.9 | 26.0 |
Minor road | tertiary | 36.3 | 22.6 |
Local street | unclassified, residential | 18.3 | 11.4 |
Private road - restricted access |
service | 15.3 | 9.5 |
The travel times do not include any estimates for finding somewhere to park or the process of parking.
The travel time matrices produced by this repo are made available under the ODbL v1.0 by Adam Watkins. The work to enable this has been supported by my employer Improvement Cymru, part of Public Health Wales, but this should not be taken as any implication of endorsement or warranty.
They are derived from other data, including:
- street map information obtained from OpenStreetMap contributors, via Geofabrik.de, under the ODbL v1.0,
- heavy rail timetable information obtained from RSP Limited (Rail Delivery Group) under the CC-BY v2.0, and
- bus and other public transport services timetable information obtained from Traveline and the UK Department for Transport under the OGL v3.0.
- LSOA11 Population-Weighted Centroids and LSOA11 Boundaries obtained from the ONS Open Geography Portal, under the OGL v3.0 and containing OS data (Crown copyright and database right 2021).
You might also be interested in this Census 2011 table, providing information on car or van availability by age, sex and LSOA of residence.