| rail_times {metro} | R Documentation |
Rail Station Timings
Description
Returns opening and scheduled first/last train times based on a given
StationCode. Omit the StationCode to return timing information for all
stations.
Usage
rail_times(StationCode = NULL, api_key = wmata_key())
Arguments
StationCode |
Station code. Use the |
api_key |
Subscription key which provides access to this API. Defaults
|
Format
A tibble 1 row per train with 8 variables:
- StationCode
Station code for this station. Use this value in other rail-related APIs to retrieve data about a station.
- StationName
Full name of the station.
- DestinationStation
Station code for the train's destination. Use this value in other rail-related APIs to retrieve data about a station.
- Weekday
Day of the week abbreviation. From list element names.
- OpeningTime
Station opening time. Converted to
hmsclass withhms::parse_hm(), representing seconds since midnight of thatWeekday.- FirstTime
First train leaves the station at this time (ET). Converted to
hmsclass withhms::parse_hm(), representing seconds since midnight of thatWeekday.- LastTime
Last train leaves the station at this time (ET). Converted to
hmsclass withhms::parse_hm(), representing seconds since midnight of thatWeekday. For times that were in the AM of the nextWeekday, time is greater than 24 hours.
Details
Note that for stations with multiple platforms (e.g.: Metro Center, L'Enfant
Plaza, etc.), a distinct call is required for each StationCode to retrieve
the full set of train times at such stations.
Value
A tidy data frame of station schedules. Combined from a nested list of weekday times.
See Also
Other Rail Station Information:
rail_destination(),
rail_entrance(),
rail_lines(),
rail_path(),
rail_stations(),
station_info()
Examples
## Not run:
rail_times("A01")
## End(Not run)