
Second in the series. This one started on a platform in Hungary, in the dark, staring at a board that said a train was due and a track that disagreed.
The idea
Vonatkém (TrainSpy HU on the App Store) puts every passenger train currently running in Hungary on a map, coloured by how late it is, and lets you tap one to see where it has been, where it is going next, and when it is expected. It runs on publicly available data, and it is not affiliated with the railway in any way. There is no editorialising in the app. It shows you the trains and lets you draw your own conclusions.
The lock screen is the app
The feature I am fondest of is the one you barely open the app for. Track a train and it appears as a Live Activity on the lock screen: the train number, the next stop, whether it is on time, and a countdown that keeps moving while your phone is in your pocket.
Nobody wants to hold a train tracker up to their face for forty minutes. They want to glance at it.
Getting an activity to update itself while the app is closed means something outside the phone has to notice that the train moved and tell it so. There is a small service of my own doing exactly that, and I will write about the parts worth explaining separately. The short version is that the app does not poll in the background, because a phone cannot, and pretending otherwise is how you end up with an activity that says a train is nine minutes away for half an hour.

The same machinery does arrival alerts. Ask to be told when the train reaches its destination and you get told, even with the app closed.
Search, favourites, and three languages
The map is the front page, but most journeys are the same handful of trains, so there is a search over origin, destination and train number, and a favourites list for the ones you take every week. Delays are shown in the list rather than hidden a tap deeper, since a list of trains where you cannot see which are late is just a timetable again.
The app is in English, Hungarian and Ukrainian, and it runs on iPhone, iPad and the Mac.
Making the data make sense
Most of the work in an app like this is not fetching the data. It is deciding how to present it to a person.
The raw feed is an operational one, written for systems rather than passengers. Trains occasionally report positions that cannot be right, updates stop arriving for a while, and a delay can come through as a negative number. Passed straight to the screen, that produces an app the user cannot trust and cannot act on.
So the app decides what each of those cases means for someone standing on a platform. A delay is shown as on time or late by a number of minutes, not as a raw value. A train that has stopped reporting says when it was last seen rather than pretending the old position is current. Anything the app cannot make sense of is left out rather than drawn on the map. The aim is that everything on screen is something you can act on.
Where to get it
Vonatkém is on the App Store, and there is a public beta if you like living slightly closer to the edge.
Next in the series: London buses, and the small matter of whether you can get to the stop before the bus does.

