Every bus in New York City on one map. Each bus is a little colored capsule on its route, moving as the MTA reports it. Click a stop for its next arrivals, or a bus for where it’s headed, how late it is and where it stops next.
Behind the map is a small streaming system. The MTA’s realtime feed goes into Kafka, a stop-events service works out when each bus actually reached each stop, and everything lands in Postgres. Arrival predictions come from the bus’s last position, the distance left along its route and how fast it has really been moving over the last fifteen minutes, stops included.
Those stop arrivals add up to Bus Stats: a report card for the whole system and every route. How many arrivals are on time, how often you wait longer than the schedule promises, how often buses bunch up, the typical delay and the real average speed. Lately it’s been about 8 miles an hour.
It also has health checks every two minutes, alerts when buses stop arriving, nightly backups and a weekly refresh of the MTA’s schedule.



