Dystonse

probability, public transport and open data
2020-10-01 / Kirstin Rohwer / CC BY-SA 4.0 / software, de, en, fav

(deutsche Version weiter unten)

I spent most of the summer of 2020 working on this open source software project together with Lena Schimmel, because we were lucky and got some funding for it through the Prototype Fund.

Dystonse is a software stack that operates on data feeds provided by public transport networks (in GTFS and GTFS-realtime formats) to make predictions about the delay of public transport vehicles, based on statistics from similar trips in the past. These predictions are represented as a curve of probability for different amounts of delay, instead of just a single value – this probability-based approach is something that hasn’t been done before (as far as we know) and can be really helpful to visualize the uncertainties that people usually have to consider in their decisions about which connection to take.

At first, we aimed to create a fully automated routing algorithm (plus frontend) that operates on these probability curves for evaluating the quality of a connection. Lena made a quick prototype of this routing algorithm before we applied for the funding, to show that it is possible although it hadn’t been done before.

We didn’t get to finish the routing algorithm before the end of the funding period. Instead, we decided to make a different kind of frontend first: A website (“Erweiterter Abfahrtsmonitor”, i.e. extended departure display) that shows the next departures at a chosen bus/train/etc. station along with a visual representation of the probability curve for the actual departure time. The user can then click on a trip to see the next stops of that trip, click on a future stop and see the probability that they will get a connecting trip there, and so on…

This web frontend is currently only in german, for several public transport networks in different german regions. You can see the most long-running instance, using data from the VBN (Bremen & Lower Saxony public transport network), at https://monitor.dystonse.org. If you understand german, there is also a help page with detailed instructions.

The backend software was developed in Rust, which we learned for this project and think it was a good choice. The whole stack can be set up on a new server easily, using docker and docker-compose.

The web frontend is generated by our server software and consists of static HTML and CSS only, no Javascript required!

More info about the project can be found on our website (german), development blog (german), code and technical documentation on GitHub (english), and our presentation blog post on the Prototype Fund website (german).

Ein Foto von Lena und mir vor einer U-Bahn, mit dem dystonse-Logo im Bild

Deutsche Version:

Im Sommer 2020 habe ich einen Großteil meiner Zeit damit verbracht, gemeinsam mit Lena Schimmel an diesem Open Source Softwareprojekt zu arbeiten, da wir das Glück hatten, vom Prototype Fund dafür gefördert zu werden.

Dystonse ist ein Softwarepaket für wahrscheinlichkeitsbasierte ÖPNV-Routenplanung. Ein Anwendungsbeispiel ist unter https://monitor.dystonse.org zu sehen: dort werden die nächsten Abfahrten an der gewählten Haltestelle angezeigt und durch Klick auf die einzelnen Zeilen lässt sich eine Reiseroute zusammenstellen, bei der automatisch die Wahrscheinlichkeit berechnet wird, dass alle Anschlüsse erreicht werden. Mehr Info dazu gibt es direkt auf der Seite unter Hilfe.

Das Backend, was die Daten der Fahrten sammelt und verarbeitet, ist in Rust programmiert, und die Erweiterter Abfahrtsmonitor-Website wird als statisches HTML und CSS vom Server generiert - komplett ohne Javascript!

Mehr Infos zu Dystonse gibt es in unserem Präsentations-Blogpost auf der Website des Prototype-Fund, auf unserem Entwickler-Blog, unserer Website, und den Code gibt es auf GitHub.


Comments?

Toot to @flauschzelle@chaos.social or e-mail me at mail@metakiki.net.
Also, if you enjoyed this, you might want to buy me a (metaphorical) coffee or donate via PayPal to show your support :)