Bus positions
Where MTA buses were. July 2017 to November 2024 from a public archive of the feed (a report per bus about every 2 minutes), and since October 2026 from our own collector (every 30 seconds).
- Rows
- 2,873,762,201
- Size
- 54.3 GB
- Covers
- July 2017 to November 2024 (with gaps), then October 2026 onward
- Updated
- Daily
- Source
- MTA bus GTFS-realtime vehicle positions
- License
- CC BY 4.0
https://data.transitlab.nyc/v1/bus_vehicle_positions/year=YYYY/month=MM/YYYY-MM-DD.parquetRows and size from catalog.json, 2026-10-08.
What a row is
Section titled “What a row is”One change to one bus: a bus appears, reports a new position, or drops out of the feed. Our collector fetches the MTA’s bus position feed twice a minute and keeps a row only when something changes. That keeps the table far smaller than every snapshot would be, with nothing lost.
Two sources
Section titled “Two sources”Every row has a source.
source | Rows | How they differ |
|---|---|---|
archive | 14 July 2017 to 4 November 2024, with gaps | From a public archive of the MTA bus feed. A bus has a row about every 2 minutes (the median gap is 2 minutes, the same from 2017 to 2024). observed_at equals vehicle_ts, because the archive keeps no fetch time. event is changed on every row. direction_id is null. row_id starts archive/bus/. |
collector | 2 October 2026 on | Our own collection. A bus has a row about every 30 seconds. Every column is filled and all four event values appear. |
Both have the same columns and types, so one query reads both. Take care when you compare years: our own collection sees a bus four times as often, so counts of rows or reports are not comparable. Speeds, paths and trips are.
The archive has no data for some stretches. These are the days it covers:
| Days | Count |
|---|---|
| 14 to 19 July 2017 | 6 |
| 3 to 29 August 2017 | 27 |
| 1 to 26 September 2017 | 26 |
| 1 October 2017 to 10 November 2019 | 771 |
| 24 May 2020 (a stub: 28 KB) | 1 |
| 11 October 2020 to 19 January 2021 | 101 |
| 18 to 23 March 2021 | 6 |
| 28 March 2021 to 8 December 2022 | 621 |
| 1 April 2023 to 4 November 2024 | 584 |
Between 8 December 2022 and 1 April 2023 the archive’s daily files are empty. We have nothing from 5 November 2024 to 1 October 2026, and 3 October 2026 is missing from our own collection. Some archive days are part days (for example 1 November 2017, 8 December 2022 and the first and last days of each stretch).
A few day files end in the middle of a row (one is cut off in the archive itself, for example 26 September 2017 and 1 November 2017). We drop that one row.
The archive’s other columns are not here: empty ones, ones that never changed (stop_status, occupancy_status, congestion_level) and speed (0 from 2017 to 2019, empty after).
Reading change events
Section titled “Reading change events”Every row has an event. The same scheme is used by bus predictions, service alerts and the elevator tables.
event | Meaning |
|---|---|
baseline | The bus as seen in the first snapshot of each UTC hour. Every hour starts with a full set, so you can read any hour on its own. |
added | The bus appeared in the feed. |
changed | It reported something new (here: a new vehicle_ts). |
removed | It dropped out of the feed. The row repeats its last known state. |
To rebuild the feed as it stood at a moment, take each bus’s latest row at or before that time and drop buses whose latest row is removed. For speeds and paths, use vehicle_ts (when the bus reported), not observed_at (when we fetched it).
Query it
Section titled “Query it”-- Where were M15 buses between 8 and 9 am on 2026-10-06?SELECT vehicle_id, vehicle_ts, lat, lon, direction_idFROM transitlab.bus_vehicle_positionsWHERE route_id = 'M15' AND vehicle_ts >= TIMESTAMP '2026-10-06 12:00:00' -- 8 am in New York AND vehicle_ts < TIMESTAMP '2026-10-06 13:00:00' AND event <> 'removed'QUALIFY row_number() OVER (PARTITION BY vehicle_id, vehicle_ts ORDER BY observed_at) = 1ORDER BY vehicle_id, vehicle_ts;Each day is its own file, so one day reads fast straight from its URL. A query on transitlab.bus_vehicle_positions opens every file (more than two thousand now), so for a few days name just those files, or send the query to the SQL API with from and to, which skips the rest:
SELECT route_id, count(DISTINCT vehicle_id) AS busesFROM 'https://data.transitlab.nyc/v1/bus_vehicle_positions/year=2026/month=10/2026-10-06.parquet'GROUP BY route_idORDER BY buses DESC;Columns
Section titled “Columns”row_idvarcharStable ID of the row. If a row appears twice, keep one.
observed_attimestampWhen we fetched the feed snapshot this row came from (UTC).
eventvarcharbaseline, added, changed or removed. See reading change events.
vehicle_idvarcharBus ID as the feed gives it, e.g. MTA NYCT_8721.
vehicle_tstimestampWhen the bus reported this position (UTC).
trip_idvarcharGTFS trip.
route_idvarcharMTA route.
direction_idintegerGTFS direction, 0 or 1. Null in archive rows.
start_datevarcharTrip start date, YYYYMMDD.
latdoubleLatitude.
londoubleLongitude.
bearingdoubleHeading in degrees.
stop_idvarcharStop the bus is at or heading to.
sourcevarchararchive for rows imported from the public archive (2017 to 2024), collector for rows from our own collector (2026 on).
Good to know
Section titled “Good to know”- A report can repeat at the top of each hour, once as
baselineand once as the change before it. TheQUALIFYline above keeps one per report. - Files are split by the UTC day of
observed_at, for both sources. - Row counts differ by source. A full weekday of the archive has about 1.4 to 1.9 million rows (a Sunday about 1 million, a part day less); a day of our own collection has about 4.9 million. Compare buses (
count(DISTINCT vehicle_id)), not rows, across the two. - Bus speeds explains how we turn positions into speeds; bus route speeds has the result.