get_locations: get_locations

Description Usage Arguments Value Examples

View source: R/get_locations.R

Description

Function to query data from the CTA locations API. The function can provide a list of all trains and their locations and attributes by calling 'get_locations()' or limited estimations by route/line.

Usage

1
get_locations(route = NULL, key = Sys.getenv("ctar_api_key"))

Arguments

route

The route or "line" for which you want data. Options are red, blue, brown, pink, green, orange, purple, or yellow. This parameter will match the argument to one of these lines.

key

The Chicago Transit Authority developer API key either entered as a string or saved to the environment object 'ctar_api_key'

Value

returns a dataframe of locations data associated with the route/line specified

Examples

1
2
3
4
## Not run: 
get_locations(route = "red", key = Sys.getenv("ctar_api_key"))

## End(Not run)

willdebras/ctar documentation built on Nov. 5, 2019, 12:20 p.m.