Description Usage Arguments Value Note See Also
Returns scheduled arrival and departure times for a direction and rotue for a particular stop.
1 2 3 | Tschedulebystop(stop_id, route_id,
direction = NULL, datetime = Sys.time(), max_time = 60, max_trips = 5,
api_key)
|
stop_id |
GTFS-compatible stop_id value for which schedule should be returned. Example: "Back Bay" |
route_id |
GTFS-compatible route_id value on the stop for which schedule should be returned. If not included then schedule for all routes serving the stop will be returned. Example: "CR-Providence" |
direction |
GTFS-compatible direction_id value on route of the stop for which schedule should be returned. Bit (0 or 1). If included then route must also be included. If not included then schedule for all directions of the route serving the stop will be returned. Example: "0" |
datetime |
Epoch time after which schedule should be returned. If included then must be within the next seven (7) days. If not included then schedule starting from the current datetime will be returned. Example: "1361989200" |
max_time |
Defines maximum range of time (in minutes) within which trips will be returned. Integer between 1 and 1440 (24 hours). If not included defaults to 60. Example: "120" |
max_trips |
Defines number of trips to return. Integer between 1 and 100. If not included defaults to 5. Example: "100" |
api_key |
API key for MBTA API. To obtain one, visit the MBTA Developer Portal (http://realtime.mbta.com/Portal/) |
stop_id |
The GTFS-compatible unique identifier for the stop for which the schedule is returned. Example: "Back Bay" |
stop_name |
The GTFS-compatible name for the stop for which the schedule is returned. Example: "Back Bay" |
route_type |
The GTFS-compatible identifier for the type of service (mode). Example: "2" |
mode_name |
The human-readable name for the type of service (mode). Example: "Commuter Rail" |
route_id |
The unique GTFS-compatible identifier for the route. Example: "CR-Providence" |
route_name |
The human-readable name for the route. Example: "Providence/Stoughton Line" |
direction_id |
The GTFS-compatible identifier for the direction. Example: "0" |
direction_name |
The human-readable name for the direction. Example: "Outbound" |
trip_id |
The unique GTFS-compatible identifier for the trip. Example: "CR-Providence-CR-Weekday-815" |
trip_name |
The human-readable name for the trip. Example: "815 (4:35 pm from South Station)" |
sch_arr_dt |
Scheduled arrival time at the stop for the trip, in epoch time. Example: "1361986080" |
sch_dep_dt |
Scheduled departure time at the stop for the trip, in epoch time. Example: "1361986080" |
If the GTFS-compatible stop_id value in the stop parameter in the request is for a parent station then all routes that serve that parent station are returned.
Tpredictionsbystop
Tschedulebyroute
Tschedulebytrip
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.