Description Usage Arguments Value Examples
View source: R/get_locations.R
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.
1 | get_locations(route = NULL, key = Sys.getenv("ctar_api_key"))
|
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' |
returns a dataframe of locations data associated with the route/line specified
1 2 3 4 | ## Not run:
get_locations(route = "red", key = Sys.getenv("ctar_api_key"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.