Description Usage Arguments Value Author(s) Examples
View source: R/get_travel_time.R
Computes estimated travel time between two points using public transport.
If time
and time_type
are not specified, time of travel will be assumed
to be the same time at which the request is made.
1 2 3 4 5 6 7 | get_travel_time(
start_coord,
end_coord,
time = NULL,
time_type = NULL,
api_token = Sys.getenv("CITYMAPPER_API_TOKEN")
)
|
start_coord |
Geographical coordinates of the start point in WGS84 '<latitude>,<longitude>' format. |
end_coord |
Geographical coordinates of the arrival point in WGS84 '<latitude>,<longitude>' format. |
time |
A date & time in ISO-8601 format (e. If omitted, it will be computed by the endpoint. |
time_type |
Required if 'time' is provided. At the moment the only defined type is 'arrival', it computes the travel time for arriving at 'end_coord' at the given time. |
api_token |
Citymapper's api key (chr). |
Estimated travel time in minutes (int).
Andrea Dodet, an.dodet@gmail.com
1 2 3 4 5 | ## Not run:
get_travel_time(start_coord = "45.448643,9.207645",
end_coord = "45.452349,9.180225")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.