So, at about 5:15 each day, about everyone who works in our office start looking for the departures from the local TFL overground station. Via the National Rail website, this information can be found, although gives you a lot of options which wont be relevant to the regular commutor
Via national rail, the actual information occupies probably less than half of the screen space. If you are viewing this on a mobile device its very small. If you are viewing this on any device, and suspect you are about to miss a train this is also very inconvenient!
When you arrive at the train station however, they seem to have got (usually) the array of information about right. Although our station has a low canopy and little platform space (for the patronage), you aren’t offered endless options on-screen for services you don’t want. Therefore:
Why cant we have a simple display in the office?
Maybe… Something like this?
Ok, so I’ve answered this question for myself already, with the live departure board I setup for my old house, however the application remains the same – How can I get live departure information displayed in a custom format?
Fortunately National Rail have already thought about this. They provide a number of ways to access their live running information, in an API nobody knows much about. Railalefan has created a class to attempt to simplify calls to the API, this is extremely useful. However doesn’t solve the issue of field keys changing dynamically, without any documentation. This makes any UI written look extremely buggy over time, with most errors occurring either at the beginning or end of the day (When there are less trains around), or when there are delays and cancellations (When additional fields appear, or disappear).
The process of identifying which fields appear and disappear has therefore been mainly trial and error, most of which was done whilst making the predecessor system to this one, which was used at home.
Adding in TFL Updates
Unfortunately, for whatever political reason (probably) the live running information at Gunnersbury seems to be a little unreliable
So, for our departure board in the office to be any use, it also needs to show TFL’s live running information to stand any chance of showing line suspensions when DARWIN hasn’t been updated.
TFL provide a variety of information via their API, which is a little better documented here. The Line Status response which we are interested in is provided in XML, and include some useful fields which can be used in conjunction with CSS to change how the page is displayed based upon how tube lines are performing.