Description Usage Arguments Details Value Examples
This function is one of two that interacts with the Follow the Train API. It provides data on the future route of a single train.
1 | get_train(run_number = NULL, key = Sys.getenv("ctar_api_key"))
|
run_number |
This is a run number associated with a single train. These change daily. 'get_arrivals()' or 'get_locations()' will provide info on run number. |
key |
The Chicago Transit Authority developer API key either entered as a string or saved to the environment object 'ctar_api_key' |
This API tends to be finicky and fail. The 'get_arrivals()' function tends to be more precise and can be filtered by run number.
Returns a dataframe of future positions and arrival times for a single train.
1 2 3 4 | ## Not run:
get_train(110, 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.