View source: R/time_filter_postcode_districts.R
time_filter_postcode_districts | R Documentation |
Find districts that have a certain coverage from origin (or to destination) and get statistics about postcodes within such districts. Currently only supports United Kingdom.
time_filter_postcode_districts( departure_searches = NULL, arrival_searches = NULL )
departure_searches |
One or more objects created by |
arrival_searches |
One or more objects created by |
See https://traveltime.com/docs/api/reference/postcode-district-filter for details
API response parsed as a list and as a raw json
## Not run: departure_search <- make_search(id = "public transport from Trafalgar Square", departure_time = strftime(as.POSIXlt(Sys.time(), "UTC"), "%Y-%m-%dT%H:%M:%SZ"), travel_time = 1800, coords = list(lat = 51.507609, lng = -0.128315), transportation = list(type = "public_transport"), reachable_postcodes_threshold = 0.1, properties = list("coverage", "travel_time_reachable", "travel_time_all")) arrival_search <- make_search(id = "public transport to Trafalgar Square", arrival_time = strftime(as.POSIXlt(Sys.time(), "UTC"), "%Y-%m-%dT%H:%M:%SZ"), travel_time = 1800, coords = list(lat = 51.507609, lng = -0.128315), transportation = list(type = "public_transport"), reachable_postcodes_threshold = 0.1, properties = list("coverage", "travel_time_reachable", "travel_time_all")) result <- time_filter_postcode_districts( departure_searches = departure_search, arrival_searches = arrival_search ) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.