Description Usage Arguments Value Examples
Function to query data from the CTA arrivals API. The function can give all estimated arrival times by simply calling 'get_arrivals()' or limited estimations by station, route, or a combination of both.
1 2 | get_arrivals(route = NULL, station = NULL, stop = 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. |
station |
The station, or parent stop, ID. These uniquely identify a station. Call 'stop_ids()' for reference |
stop |
The stop ID. These uniquely identify a station and direction. Call 'stop_ids()' for reference |
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, estimated arrivals, and reference data.
1 2 3 4 | ## Not run:
get_arrivals(route = "pink", stop = 30132, 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.