rail_entrance: Rail Station Entrances

View source: R/rail-entrance.R

rail_entranceR Documentation

Rail Station Entrances

Description

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

Usage

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

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().

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.

Value

A data frame of station entrances.

See Also

https://developer.wmata.com/docs/services/5476364f031f590f38092507/operations/5476364f031f5909e4fe330f

Other Rail Station Information: rail_destination(), rail_lines(), rail_path(), rail_stations(), rail_times(), station_info()

Examples

## Not run: 
rail_entrance(38.8895, -77.0353)

## End(Not run)

metro documentation built on Nov. 2, 2023, 6:06 p.m.