Returns a list of nearby station entrances based on latitude, longitude, and radius (meters). Omit search parameters to return all station entrances.

rail_entrance(Lat = NULL, Lon = NULL, Radius = NULL, api_key = wmata_key())

Format

A tibble 1 row per entrance with 7 variables:

Name

Name of the entrance (usually the station name and nearest intersection).

StationCode

The station code associated with this entrance. Use this value in other rail-related APIs to retrieve data about a station.

StationTogether

For stations containing multiple platforms (e.g.: Gallery Place, Fort Totten, L'Enfant Plaza, and Metro Center), the other station code (previously StationCode2).

Description

Additional information for the entrance, if available. Currently available data usually shows the same value as the Name element.

Lat

Latitude.

Lon

Longitude.

Distance

Distance (meters) of the entrance from the provided search coordinates. Calculated using geodist::geodist() and the "cheap ruler" method.

Arguments

Lat

(Optional) Center point Latitude, required if Longitude and Radius are specified.

Lon

(Optional) Center point Longitude, required if Latitude and Radius are specified.

Radius

(Optional) Radius (meters) to include in the search area, required if Latitude and Longitude are specified.

api_key

Subscription key which provides access to this API. Defaults Sys.getenv("WMATA_KEY") via wmata_key().

Value

A data frame of station entrances.

Examples

if (FALSE) {
rail_entrance(38.8895, -77.0353)
}