MTA bus stringlines
Stringlines are a time and distance chart showing the movement of buses along a route over time. They make operational problems easy to see, such as delays, bus bunching and gaps in service. Each bus trip appears as a string moving diagonally across the chart.
Click on a route and move the sliders below to adjust the stringline.
Choose a route Hide routes
Loading routes…
Click here for a CSV of the raw trip data in this chart.
How it works
The MTA publishes the Bus Time SIRI feed, which reports every bus’s GPS position along with its distance along the route to the next stop. A Python script polls the feed every 30 seconds for the whole fleet and saves each bus’s distance along its route into a SQLite database. Stop positions are learned from the same feed, so stop labels fill in as buses pass them.
To draw the stringlines, positions are fetched from the database and passed through a cleaning step that drops GPS readings where a bus appears to jump backwards and breaks a string at gaps longer than 15 minutes. Both directions share one axis: the opposite direction is plotted in reverse so that a place on the route sits at roughly the same height either way.
Bus data from MTA Bus Time. This site is not affiliated with or endorsed by the MTA. Times are New York time.