bus_stops {metro} | R Documentation |
Bus Stop Search
Description
Returns a list of nearby bus stops based on latitude, longitude, and radius. Omit all parameters to retrieve a list of all stops.
Usage
bus_stops(Lat = NULL, Lon = NULL, Radius = NULL, api_key = wmata_key())
Arguments
Lat |
Center point Latitude, required if |
Lon |
Center point Longitude, required if |
Radius |
Radius (meters) to include in the search area, required if
|
api_key |
Subscription key which provides access to this API. Defaults
|
Format
A tibble with 1 row per stop and 6 variables:
- StopID
String array of route variants which provide service at this stop. Note that these are not date-specific; any route variant which stops at this stop on any day will be listed.
- Name
Stop name. May be slightly different from what is spoken or displayed in the bus.
- Lat
Latitude.
- Lon
Longitude.
- Distance
Distance (meters) of the stop from the provided search coordinates. Calculated using
geodist::geodist()
and the "cheap ruler" method.- Routes
Character string of route variants which provide service at this stop. Note that these are not date-specific; any route variant which stops at this stop on any day will be listed.
Value
Data frame containing stop information
See Also
Other Bus Route and Stop Methods:
bus_departs()
,
bus_path()
,
bus_position()
,
bus_routes()
,
bus_schedule()
Examples
## Not run:
bus_stops(38.8895, -77.0353, 500)
## End(Not run)