View source: R/time_filter_postcodes.R
time_filter_postcodes | R Documentation |
Find reachable postcodes from origin (or to destination) and get statistics about such postcodes. Currently only supports United Kingdom.
time_filter_postcodes(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-search 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"), properties = list('travel_time', 'distance')) 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"), properties = list('travel_time', 'distance')) result <- time_filter_postcodes( 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.