Open transport planning and booze.
What a joy it is to celebrate a field where the UK is among the best in the world.
It’s not even arguable, we are really good at open public transport data. And also Whisk(e)y.
This means that I can ask Google for a public transport itinerary from Northern Ireland’s largest Whiskey distillery, in Bushmills, to Wales’ largest Whisky distillery, in Penderyn, and it will tell me.
A bus to Coleraine, a train to Belfast, a coach on a boat to Edinburgh via Cairnryan, a train to Birmingham, a train to Cardiff, a train to Aberdare, then a bus to Penderyn. A trip across all four countries of the UK.
The map data may be Copyright Google, and the algorithm for calculating the itinerary is Google’s secret, but the public transport timetable data that makes it work is almost all open.
Open means that Google can take the timetables and use them on their maps as part of a tool that makes them a profit without asking for permission. Open means that other companies can do the same. Google are just one of many companies that use open data to offer us a fantastic service, for free, on our computers and smartphones.
We shouldn’t take this for granted. You will not get the same quality of results across such a wide variety of services in much of the rest of the world. Fantastic work continues in countries like France, but the data experience for users remains behind what we have enjoyed for a decade in the UK.
Where is the open data?
You can get the UK’s public transport open data for yourself if you want. Translink publishes open data on public transport in Northern Ireland. Traveline publishes open data on public transport for everything except trains in Great Britain. The Rail Delivery Group publishes the train timetables for GB separately.
The data isn’t perfect. It’s often hidden behind a need to register (just put it on the web please), there are licences to consent to (if it’s just an Open Government Licence you don’t need me to sign it), and stored within strange formats (TransXChange and CIF) that are hard for anyone outside of a small part of the UK transport industry to work with.
But the data exists, it is comprehensive, and it is high quality.
From open data to useful open data
One of the biggest obstacles to using the UK’s open data on public transport is that the formats, TransXChange and CIF, are different from the de facto global standard GTFS that most analysis tools expect.
Once we have public transport data in GTFS format, we can combine it with maps (the open option is Open Street Map, made available for download most easily by Geofabrik ) so that we can plan routes involving walking, driving, and cycling. The most used tool for doing this planning is probably Open Trip Planner.
But first we need GTFS format timetables.
What work has been done?
Where there’s value, there’s often people willing to do the work. And for years people have been writing and maintaining conversion software from the UK’s obscure formats into more common ones and then building tools on top of that.
- The team at traveltime.com use the UK’s public transport open data to build a fantastic service for calculating accessibility in the UK.
- The team at Tracc by Basemap sell their widely-used tool that can work with all of the UK’s public transport and mapping standards to explore and analyse public transport data.
- Google work with ITOWorld to integrate the UK’s public transport open data into Google Maps which we can all use for free. Google also make this data available via their Maps API which you can use if you pay, though there is a free trial.
- Many other organisations including at least Navitia, Passenger, Transport API, and Here Maps access, improve, and make the data available for others to use in a variety of ways.
- ODILeeds publish open-source conversion tools from TransXChange and CIF to GTFS.
- The Office for National Statistics in Newport, Wales have contributed to improvements to the ODILeeds converters above and used them to study transport accessibility in Wales. Their PropeR tool, built on top of Open Trip Planner , helps people to study public transport networks in R, a popular open source programming language.
- Malcolm Morgan at the Institute for Transport Studies (ITS) in Leeds has created what is probably the best-maintained and most up to date suite of open-source tools for analysing the UK’s public transport data. His UK2GTFS project on GitHub is an excellent convertor written in R of both TransXChange and CIF formats to GTFS, though I think it is more GB2GTFS than UK2GTFS. On top of that his R code for setting up and working with Open Trip Planner , building on the work of Marcus Young previously of the ITS, is excellent.
- As of very recently the Department for Transport in collaboration with ITOWorld publish Great Britain public transport (for all modes except trains) in GTFS format as open data .
And I’ve probably missed off lots of great work in that summary.
But what are people using this stuff for?
What questions does open transport data let us answer?
The most obvious use is trip planning. Open Trip Planner maintains a list of transport agencies around the world that maintain instances of their software for official trip planning. There are many more that they don’t know about.
Once you have a trip planner, you can do clever things with it such as,
- Plan all possible journeys from a place and see how far you can get in a given amount of time. These are called isochrones or isolines.
- Use isochrones to help people choose where to live so that they can commute to work within a certain amount of time.
- Use isochrones to decide where to put distribution centres so that you can make deliveries to the most people most quickly.
- Combine data on where people live and work so that you can calculate the number of jobs available within a certain travel time for every place on a map.
- Explore how public transport timetables change at different times to see how accessibility changes between peak times and off-peak times to model the economic cost of congestion.
These techniques and many more are all already used within the UK.
For example, the ease with which centres of employment can be reached by car, public transport, and bicycle from places is a component of their eligibility for public investment in levelling up.
Once you are in control of your data and your tools for analysing that data you can do even more.
The effect of new roads or road closures, of new cycle paths, of new bus routes and tram lines can be modelled quickly. Business cases for investment can be made. The impact of closing fire stations, hospitals, police stations, etc… can be modelled to increase efficiency or safeguard essential services against cuts.
Increasingly, open data and open tools are reducing the cost of analysing accessibility where we live. They are informing new discussions about 15-minute neighbourhoods, saving the high street, and low-traffic neighbourhoods. And because the data and the tools are open and built for the web, they are easier than ever to share, discuss, and improve.
But there are some concerns about this progress that we should not dismiss.
The following examples come from the Open Trip Planner for Great Britain project that we maintain at ODILeeds. We’re sharing more about that later this week.
Isn’t open data more likely to be wrong?
Open data is often right, but sometimes wrong. The open methods used to analyse open data are great, but they sometimes have flaws.
Just as one example, I used Open Trip Planner to calculate the 30-minute accessibility of central Stranraer by car. Locals quickly pointed out that while the isochrone coming from the North and East looked fine, the isochrone coming from the South was far too conservative.
Because the data and the analysis are open, we could quickly find the problem. Parts of the A716 South from Stranraer did not have a speed limit set on Open Street Map (the source of our roads data). Open Trip Planner was only allowing travel at 30mph on this section, its default for unlabelled roads.
This information has now been added to Open Street Map. The fix is available to everyone. It will be live in the next compile of our accessibility tools. And the improvement will spread to hundreds of other tools all around the world, both open and closed, that use this dataset.
By comparison, fixes that have been made to Google Maps, Apple Maps, TravelTime.com, Here Maps, etc… to make them better often stay within their apps and do not contribute to wider improvements. We could imagine that this closed data would be better than open data, especially where very large companies are investing a lot of money in improvements. But is this true?
To test that, we calculated journey times from 269 LSOAs (small areas) of Greater Manchester to The Co-operative Academy of Manchester to arrive at 08:30am using two methods. Once using open data and Open Trip Planner. And then again using Google Maps and their API.
The agreement is excellent, and we get similar results in other tests.
Open data and open methods, especially thanks to the power of many people finding problems, fixing them, and sharing the results, seem to offer a product close to as good as closed solutions.
Why didn’t this happen earlier?
People have been working on these problems for decades, but two of the biggest steps forward happened within a year of each other.
In 2004, Open Street Map was started in the UK. Today it provides mapping data in a consistent open format for the whole world and at a quality that rivals or beats national mapping agencies. It powers the walk, cycle, and driving parts of open route planners.
In late 2005 Google started working on Transit features for Google Maps, a product which had launched at the start of that year.
Building on work from TriMet, the transport authority for Portland, Oregon, USA they helped to make GTFS (at the time Google Transit Feed Specification) the de facto standard for public transport interchange. The deal was that if a public transport feed was available in GTFS format, on the web, in a way that Google could access, with a licence that allowed Google to use it in Maps, it would become part of Google Maps.
Today the GTFS standard is maintained and promoted by MobilityData, a non-profit based in Montréal, Canada, funded by a large coalition of tech companies (the largest being Apple and Google), governments (the largest being the state of California), transport companies, and transit authorities from all around the world.
Having a widely-used open standard for maps and for public transport data has allowed some fantastic technical innovations in transport planning in the past 15 years. In the next blog post I’ll be sharing what we’ve been doing with some of them, taking advantage of the UK’s excellent record in open public transport data.