bus_departs {metro} | R Documentation |
Bus Schedule at Stop
Description
Returns a set of buses scheduled at a stop for a given date.
Usage
bus_departs(StopID, Date = NULL, api_key = wmata_key())
Arguments
StopID |
7-digit regional stop ID. |
Date |
(Optional) Date for which to retrieve route and stop information. |
api_key |
Subscription key which provides access to this API. Defaults
|
Format
A tibble with 1 row per bus departure and 8 variables:
- StopID
7-digit regional ID which can be used in various bus-related
- ScheduleTime
Date and time (UTC) when the bus is scheduled to stop at this location.
- DirectionNum
Denotes a binary direction (0 or 1) of the bus. There is no specific mapping to direction, but a different value for the same route signifies that the buses are traveling in opposite directions. Use the
TripDirectionText
column to show the actual destination of the bus.- StartTime
Scheduled start date and time (UTC) for this trip.
- EndTime
Scheduled end date and time (UTC) for this trip.
- RouteID
Bus route variant identifier (pattern). This variant can be used in several other bus methods which accept variants. Note that customers will never see anything other than the base route name, so variants 10A, 10Av1, 10Av2, etc. will be displayed as 10A on the bus.
- TripDirectionText
General direction of the trip (e.g.: NORTH, SOUTH, EAST, WEST).
- TripHeadsign
Destination of the bus.
- TripID
Trip identifier. This can be correlated with the data in our bus schedule information as well as bus positions.
Value
Data frame containing scheduled arrival information.
See Also
Other Bus Route and Stop Methods:
bus_path()
,
bus_position()
,
bus_routes()
,
bus_schedule()
,
bus_stops()
Examples
## Not run:
bus_departs(1001195, Sys.Date())
## End(Not run)