This post is about the Timetable Changes tool I built to help understand how upcoming changes to the train timetables in the UK would affect me.
The May 20th changes
From Sunday 20th May 2018 a lot of the timetables for rail services in the UK are changing. For some routes the changes are small. For others, particularly in the South-East, the changes are more dramatic. Great Northern, Thameslink and Southern services are all changing as part of the Thameslink Program.
For Great Northern (the service I use), this means that all services have been re-timed and many trains will now go through St Pancras and Central London rather than terminating at Kings Cross.
As someone who uses trains almost every day, I wanted to see how the journeys I make would be affected. I tried looking up the new services using a journey planner and on the hard to follow PDF timetables but neither gave me the insight I wanted to know- I didn’t care if the 7:46 morning service departed 3 minutes later, what I did care about was how the general frequency and journey time of the new services compared to what they were like now.
I remembered seeing graphical displays of train schedules in Edward Tufte’s The Visual Display of Quantitative Information. This style of diagram was first used by E.J Marey to display train services in the 1880s.
This diagram lets you compare the arrival and departures times of many services at a glance. The slope of each line also gives an indication of the relative speed of a service. More recently Marey-style diagrams have been used to visualize data from the Boston Subway and to help investigate a problem with a train on Singapore’s MRT.
Showing the services
Taking inspiration from Marey, I was able to display the timetables in the way that I wanted. I retrieved the timetable data I needed from the transportapi service and used D3.js to display it. By drawing the chart for the new timetable below the current one I made it easier to compare the two.
I choose to grey-out services that were overtaken since you would normally wait for next faster service rather than travelling on them.
The new chart shows me exactly what I want, and I can begin to see patterns in the service which weren’t obvious before. For instance, the worst time to get to Kings Cross/St Pancras would be after the 17:54 service has departed since it has the longest gap until the next one.