The Regional Express 1 train line is frequently used by commuters travelling to and from Berlin. FHP students that live in Berlin will likely have made experience with the line in the past.
In december 2023 the lines ownership was transferred to ODEG, a private rail transportation company. The transfer sparked hope that it's problems around capacity and delays would get solved. At least in the beginning, ODEG wasn't able to live up to it's expecations, as RBB reported.
I often travel on RE1 myself, so I gathered extensive experience with its delays. One day when I was in a particularly big hurry I realised I'd like to understand better how exactly the train is late.
- Is it more often late on weekdays vs. the weekend?
- Is it mostly late on rush hour or is the delay equally distributed throughout the day?
- On which parts of the line does the train typically accumulate delay and where is it able to get some time back?
For that I decided to start gathering the necessary information in an automatic fashion. For the past two years, my server collected
- every minute
- for every RE1 train currently running on the line
- how late it is compared to it's schedule
This allows us to visualise, how late a given train is on any point of its journey. In the diagram below, each black line is a train running through space (vertical) and time (horizontal). The red area attached to some lines shows the deviation from schedule that a train had at a given point in space and time.
For the displayed day we can observe that
- the late trains running through the night until shortly before 3AM are very punctual
- there was one early morning train starting in Burg (bei Magdeburg) that started with around 15min delay and managed to slowly catch on until it arrived in Frankfurt (Oder).
- besides this one example, trains tend to accumulate delay, but rarely shed it off until they reach their destination

As the application was intended for mobile devices from the beginning, the information density of the visualisation posed to be a challenge.
Showing delay data for an entire week would have been way too much, so I decided to display a week as a heatmap, basically summarising the density of red ink in any given point of time/space.
Here we can see that
- friday morning was a particular bad time
- wednesday was bad only if you travelled eastwards from Potsdam
- weekend and the current week seems to be going smooth so far

The finished product intends to be used by commuters so it's showing real-time data without requiring a page reload. Ideally it can serve as some kind of “weather check” before starting a journey, so that users can figure out how bad the delay situation currently is.
The website is built as a Progressive web app, so when you open it on your phone your browser should allow you to “install” it on your home screen, which will provide a more pleasant experience for checking it while in commute.
Source code is publicly available and can be found here. I built this software with stability in mind. It ran pretty carefree for the past two years and I intend to maintain it at least for the next three years to come.