From Open Data to Moving Dots – Building a Live Helsinki Transit Tracker

I am fascinated by Helsinki’s public transit network. I use it almost every day and it is quite reliable. HSL the Helsinki Regional Transport Authority, makes its vehicle location data available openly, in real time, to anyone who wants it. That combination is an invitation. This project takes up that invitation: a live map showing the current positions of metro trains, trams, ferries, two train lines and a selection of buses across the city, updating continuously as the vehicles move. This is a seamless continuation from my previous open source data work, link below. I have used Anthropic’s Claude Code as I know nothing about coding.

The map is embedded below. Everything you see is live.

Note: I will pull the plug from the live ticker after approximately one week and replace it with a recording. I am not sponsored so I’ll try and keep my website costs low.

What data, from where?

HSL publishes vehicle positions via the Digitransit platform using the HFP v2 protocol (High-Frequency Positioning) over MQTT — position updates arrive in near real time directly from the vehicles. Subscribing to the correct MQTT topic gives you a stream refreshing in fractions of a second. The vehicles tracked here are metro, tram, ferry, the two airport train lines (I and P) and a selection of buses, the rest have been left out, as there are enough of them to make the map unreadable.

How it is built

This is broadly the same pipeline as the Helsinki traffic accident map, though the data model differs considerably: accident data is a static snapshot cleaned once, whereas transit positions are a continuous stream that must be handled as they arrive, dropped if stale, and rendered without blocking the UI. HSL’s raw feed carries more than the map shows, vehicle ID, route, direction, speed, heading, delay, but for this version the goal was legibility over density. A Helsinkian should be able to glance at it and immediately know where the metro is, where the trams are clustered, whether the ferry is mid-crossing.

Other Helsinki data projects

This is the second project in a short series using Helsinki open data as raw material. The traffic accident map visualises the city’s collision data and was built simultaneously as a trial of agent-driven coding. I have another work in the making using Helsinki’s urban tree data set, which is very intriguing, but since the planting dates of the trees is missing the data is not as strong as I’d like it to be.

Open data in urban space

Helsinki Region Infoshare brings together open datasets from the city and its partners, and Digitransit is the gateway on the transit side. Obtaining equivalent data in many other cities would require a licence, registration or a formal application. Here simply signing up, knowing what to ask for is enough – but of course you need to know how to use the data.

Data source

Real-time vehicle position data published by HSL via the Digitransit platform under an open licence. This tracker is an independent experiment, not affiliated with or endorsed by HSL or the City of Helsinki.

To be continued

This tracker in its current form is functional and intentionally plain. A second part to this post is planned: an artistic rendering of the live data — the city’s transit network as a piece of art.

Real-time artistic rendering of public transport

Below you can see and watch how different vehicle types draw a picture of Helsinki’s traffic. This is a first rendering, I have plenty of follow-up ideas but I hit my plan’s token limit ; ) Enjoy this for now.

To get this work, Claude Code suggested using fly.io which is a cloud hosting platform that runs the live tracker around the clock — think of it as the engine room that keeps the map alive on the internet. Rather than running on a laptop that gets closed or a server I have to physically maintain, the tracker lives on Fly.io’s infrastructure: it connects to Helsinki’s real-time transit feed every few seconds, processes the vehicle positions, and serves the interactive map to anyone who opens the page. The platform is designed for small, always-on web applications exactly like this one, which is why I chose it. In terms of cost, Fly.io operates on a pay-as-you-go model — the tracker runs on their smallest virtual machine (256 MB RAM, shared CPU), which comes to roughly €3–5 per month at current rates. There is no upfront commitment; if I ever shut the project down, billing simply stops. For a hobby project that is otherwise free to visit, that’s a pretty reasonable hosting bill.
Fly.io explained by Claude Code, Sonet 4.6.

Privacy Preference Center