How bus.me.uk tracks 24,000 buses in realtime
Our sister post on the rail map blog introduced what bus.me.uk does — find your bus, anywhere in the UK. This post is the other half of the story: what's actually happening behind the little yellow route badges sliding across the map.
Where the live positions come from
Every minute, our server asks the Department for Transport's Bus Open Data Service for the position of every bus in Great Britain. It answers in SIRI-VM, an XML format that most people will never see, describing roughly 24,000 vehicles — where each one is, which way it's pointing, what route it's working and when it was due to leave its first stop.
Two things happen to that data. The first is obvious: one row per bus is kept permanently up to date, and that's what the map draws. The second is the interesting one — every genuinely new observation is also appended to a history log, which now grows by millions of rows a week. That's what turns "where is my bus?" into "where has this bus been, and was it on time?"
The hard part: matching a moving bus to a timetable
A live feed tells you a bus exists at a location. It doesn't tell you which stops it will call at, or whether it's running late. For that you need timetables — and the UK publishes those separately, in several formats, from several places. We load all of them:
- England — the national Bus Open Data timetable set
- Scotland, Wales and London — the Traveline National Dataset
- Northern Ireland — Translink's Ulsterbus and Goldline data, which isn't in the GB datasets at all
- Coaches — the national coach network, so National Express, Flixbus and Scottish Citylink appear too
- Stops — NaPTAN, the national database of every bus stop: over 385,000 of them
Together that's roughly 90 million individual stop times. Matching a live vehicle to the right one of those journeys is fiddly: operators identify their journeys inconsistently, so the reliable common thread turns out to be the scheduled departure time from the route's first stop. Match that, and suddenly a dot on a map becomes "the 09:42 to Halifax, calling at 34 stops, currently two minutes down."
Early, late — and what happens at a timing point
Working out lateness sounds like subtraction, but buses don't behave like that. Timetables contain timing points: stops where a bus that's running early is required to wait. So we don't just apply one delay to the rest of the journey. Instead the delay is carried forward stop by stop — an early bus is "held" at the next timing point and returns to schedule, while a late bus can quietly claw back time by not waiting where it otherwise would have.
And for the stops your bus has already passed, we don't estimate at all. We look up where the vehicle actually was in our position history and show the real time it went by, alongside how that compared to the timetable.
Try it: tap any moving bus on the live map. You'll get its full stop list, actual times for the stops it's passed, expected times for the ones ahead, a button to highlight its whole route in red, and a 🔔 on any stop to be alerted when the bus gets near it.
Honest about the gaps
England is comprehensively covered because publishing live location data there is a legal requirement. Scotland, Wales and Northern Ireland are not — those nations' operators publish patchily or not at all, so you'll see full timetables but far fewer moving buses. We're working on additional feeds nation by nation, and riders can now opt in to contribute anonymous journey traces from the buses they're on, which helps most exactly where the official data is thinnest.
Built to be shared
Every stop, route, operator and region has its own address — /map/stop/45010042/ or
/map/route/HRGT/36/ — so you can bookmark your morning bus or send a friend a link that opens
zoomed to your stop with live departures already on screen. Add the site to your phone's home screen and it
behaves like an app, including alerts that reach you with the screen locked.
Travelling by train too? Our sister site map.nationalrail.me.uk does the same job for the railway — and its blog has the original introduction to bus.me.uk.
