Stringlines are a time & distance chart which illustrate the movement of trains between stations over time. Stringlines are an easy method to visualize operational problems that affect rail service; such as delays, train bunching and gaps in service. Each train trip appears as a string moving diagonally across the chart. This tool was inspired by a NYCT paper describing the creation of their in house stringline tools and is intended to be a free and public equivalent.
Click on a route and move the sliders below to adjust the stringline.
End date: Today
End time: Now
Number of hours: 3
Click here for a CSV of the raw trip data in this chart.
To support 3rd party transit applications, the MTA make available GTFS RT feeds which contain train arrival predictions, schedule changes and alert information. With some exceptions, the GTFS RT feeds are based on the same data used by the in station countdown clocks. Through controlled scraping of the prediction feeds, actual train movements can be discerned from predicted movements.
A Python script fetches the latest update from the MTA feeds, parses trip update information and saves the train movements into a SQLite database. To draw the stringlines, train movements are fetched from the database and passed through a data cleaning step to remove erroneous updates. The movements are then combined with schedule information and the chart is rendered.