time_map {traveltimeR} | R Documentation |
Isochrones (Time Map)
Description
Given origin coordinates, find shapes of zones reachable within corresponding travel time. Find unions/intersections between different searches
Usage
time_map(
departure_searches = NULL,
arrival_searches = NULL,
unions = NULL,
intersections = NULL,
format = NULL
)
Arguments
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 |
format |
time-map response format. See https://docs.traveltime.com/api/reference/isochrones#Response-Body for details. |
Details
See https://docs.traveltime.com/api/reference/isochrones/ for details
Value
API response parsed as a list and as a raw json
Examples
## 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 = TRUE, 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)
[Package traveltimeR version 1.2.1 Index]