time_map | R Documentation |
Given origin coordinates, find shapes of zones reachable within corresponding travel time. Find unions/intersections between different searches
time_map( departure_searches = NULL, arrival_searches = NULL, unions = NULL, intersections = NULL )
departure_searches |
One or more objects created by |
arrival_searches |
One or more objects created by |
unions |
One or more objects created by |
intersections |
One or more objects created by |
See https://traveltime.com/docs/api/reference/isochrones for details
API response parsed as a list and as a raw json
## Not run: dateTime <- strftime(as.POSIXlt(Sys.time(), "UTC"), "%Y-%m-%dT%H:%M:%SZ") departure_search1 <- make_search(id = "public transport from Trafalgar Square", departure_time = dateTime, travel_time = 900, coords = list(lat = 51.507609, lng = -0.128315), transportation = list(type = "public_transport"), properties = list('is_only_walking')) departure_search2 <- make_search(id = "driving from Trafalgar Square", departure_time = dateTime, travel_time = 900, coords = list(lat = 51.507609, lng = -0.128315), transportation = list(type = "driving")) arrival_search <- make_search(id = "public transport to Trafalgar Square", arrival_time = dateTime, travel_time = 900, coords = list(lat = 51.507609, lng = -0.128315), transportation = list(type = "public_transport"), range = list(enabled = T, width = 3600)) union <- make_union_intersect(id = "union of driving and public transport", search_ids = list('driving from Trafalgar Square', 'public transport from Trafalgar Square')) intersection <- make_union_intersect(id = "intersection of driving and public transport", search_ids = list('driving from Trafalgar Square', 'public transport from Trafalgar Square')) result <- time_map( departure_searches = c(departure_search1, departure_search2), arrival_searches = arrival_search, unions = union, intersections = intersection ) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.