Wiki source code of ArchiveData

Last modified by admin admin on 2024/07/24 06:33

Show last authors
1 = Archived MTA Bus Time data, Aug 2014- Oct 2014 =
2
3 As part of MTA's App Quest, 3 Months of MTA Bus Time data was released {{html}}<a href="https://web.mta.info/developers/MTA-Bus-Time-historical-data.html">here.</a>{{/html}}
4
5
6 = Archived B63 MTA Bus Time Data =
7
8 As requested by a number of developers on the {{html}}<a href="https://groups.google.com/group/mtadeveloperresources">MTA's Developer Resources list</a>{{/html}}, we have posted an extract of data archived by the MTA Bus Time system. This first extract contains historical records for the **B63** route in Brooklyn from April 3, 2011 through May 3, 2011. Each record in this data set contains, for a single bus, the time of observation, bus location, bus route, next stop, distance from that stop, and other variables described below.
9
10 Additional data from Staten Island are not yet available.
11
12 The data can be found {{html}}<a href="https://s3.amazonaws.com/MTABusTime/B63-2011-04-03_2011-05-03.zip">here</a>{{/html}}. This page describes caveats with respect to this data, and the format of the data itself.
13
14 The B63-only GTFS which powers MTA Bus Time and provides a reference baseline for this archive data is available {{html}}<a href="https://s3.amazonaws.com/MTABusTime/gtfs/google_transit_brooklyn.zip">here</a>{{/html}}
15
16 Because of the prototype nature of the MTA Bus Time pilot system, it takes some effort to generate these extracts. Future extracts will be posted if demand and applications for this first extract merit the effort.
17
18 = Caveats =
19
20
21 There are a number of caveats to this data set. MTA Bus Time on the B63 is a pilot project, where the gear on the bus and the backend server is exceedingly simple.
22
23 * **There is no formal integration with the schedule, so trip ID's in this data can not be used at any point to infer whether a bus was early or late**. The trip ID's only indicate a particular stopping pattern.
24 * The data itself, while voluminous, is not perfectly clean.
25 * This data does not indicate the particular time that a given bus served (or passed) a particular stop. It simply relates, for every observation the server received from a bus, the ID of the next stop on that bus' trip and the distance to that stop. To infer when a bus served a given stop, one can look at consecutive observations where the ID of the next stop changed.
26
27 We hope to fix all but the last of these issues in the forthcoming MTA Bus Time implementation on Staten Island (and beyond). Please let us know, via the email list, any issues you find.
28
29
30 = Documentation =
31
32
33 The data comes in a big zipped CSV file, with the following columns. As much as possible, these columns are named to match the corresponding GTFS values.
34
35 * **vehicle_id** - the 4-digit ID of the bus
36 * **timestamp** - the date and time of the observation
37 * **latitude** - the latitude of the bus
38 * **longitude** - the longitude of the bus
39 * **phase** - the phase of the bus in its duty cycle; current extract includes only observations when the bus is inferred to be IN_PROGRESS (i.e. driving on the route) or LAYOVER_DURING (i.e. waiting at a terminal for a trip to begin)
40 * **trip_id** - a GTFS trip_id representing the stopping pattern inferred for the given bus at the given time
41 * **direction_id** - the GTFS direction_id for the direction the bus is traveling
42 * **trip_headsign** - the GTFS destination sign value for the inferred representative trip
43 * **shape_dist_traveled** - the distance the bus has traveled (in meters) along the precise geographic route of the inferred representative trip
44 * **stop_id** - the GTFS stop_id of the next stop the bus will serve
45 * **stop_sequence** - the GTFS stop_sequence of the next stop the bus will serve
46 * **dist_from_stop** - the distance of the bus (in meters) from that next stop
47
48 For description and hints on how to work with CSV files, please see {{html}}<a href="https://en.wikipedia.org/wiki/Comma-separated_values">Wikipedia</a>{{/html}}, or this {{html}}<a href="https://www.imf.org/external/help/csv.htm">helpful guide</a>{{/html}}.