Live Tube & Rail vehicles
Estimate train positions from TfL's slow arrivals feed, then interpolate between polls on the Tube & Rail map.
Estimate train positions from TfL's slow arrivals feed, then interpolate between polls on the Tube & Rail map.
Estimate train positions from TfL's slow arrivals feed, then interpolate between polls on the Tube & Rail map.
TfL provides arrival predictions, not live train coordinates. Positions are estimates from the reported location, feed timestamps and station order. The Unified API updates about every 30 seconds and is often around 45 seconds old when it arrives — the tracker fits recent observations along the track, learns inter-station run times, and interpolates smoothly between those coarse polls.
const tracker = new RailTrainTracker()
// Keep the same tracker across updates.
const vehicles = tracker.ingest(arrivals, receivedAt)On this docs site the shared key follows a few lines at a time. Add your own TfL API key in the sidebar to follow more lines against your quota.
Trains are drawn on the Tube & Rail map at their estimated positions, each direction on its own side of the line. A train is drawn at its real length against the map, with a window at the front. When you zoom out far enough that a train would be smaller than a few pixels, it stops shrinking.
Trains slow down or wait when a new estimate falls behind the displayed position. Delayed or missing reports can still leave a train in the wrong place. Pause to inspect; with reduced motion, trains move only when a new estimate arrives.
TfL provides arrival predictions, not live train coordinates. Positions are estimates from the reported location, feed timestamps and station order. The Unified API updates about every 30 seconds and is often around 45 seconds old when it arrives — the tracker fits recent observations along the track, learns inter-station run times, and interpolates smoothly between those coarse polls.
const tracker = new RailTrainTracker()
// Keep the same tracker across updates.
const vehicles = tracker.ingest(arrivals, receivedAt)On this docs site the shared key follows a few lines at a time. Add your own TfL API key in the sidebar to follow more lines against your quota.
Trains are drawn on the Tube & Rail map at their estimated positions, each direction on its own side of the line. A train is drawn at its real length against the map, with a window at the front. When you zoom out far enough that a train would be smaller than a few pixels, it stops shrinking.
Trains slow down or wait when a new estimate falls behind the displayed position. Delayed or missing reports can still leave a train in the wrong place. Pause to inspect; with reduced motion, trains move only when a new estimate arrives.