Tschedulebyroute: Query the schedule by route

Description Usage Arguments Value See Also

Description

Returns the scheduled arrivals and departures in a direction for a particular route.

Usage

1
2
 Tschedulebyroute(route_id, direction = NULL,
datetime = Sys.time(), max_time = 60, max_trips = 5, api_key) 

Arguments

route_id

GTFS-compatible route_id value for which schedule should be returned. Example: "CR-Providence"

direction

GTFS-compatible direction_id value on route for which schedule should be returned. If not included then schedule for all directions of the route 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/)

Value

route_id

The unique GTFS-compatible identifier for the route for which the schedule is returned. Example: "CR-Providence"

route_name

The human-readable name for the route for which the schedule is returned. 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)"

stop_sequence

Identifies where the stop comes in the sequence of stops for this trip. Example: "2"

stop_id

The GTFS-compatible unique identifier for the stop. Example: "Back Bay"

stop_name

The GTFS-compatible name for the stop. Example: "Back Bay"

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"

See Also

Tpredictionsbyroute Tschedulebystop Tschedulebytrip


MBTAr documentation built on May 2, 2019, 6:59 a.m.