traveltimeR is a R SDK for Travel Time API (https://traveltime.com/). Travel Time API helps users find locations by journey time rather than using ‘as the crow flies’ distance. Time-based searching gives users more opportunities for personalisation and delivers a more relevant search.
You can install the development version from GitHub with:
# install.packages("devtools")
devtools::install_github("traveltime-dev/traveltime-sdk-r")
In order to authenticate with Travel Time API, you will have to supply the Application Id and Api Key.
library(traveltimeR)
#store your credentials in an environment variable
Sys.setenv(TRAVELTIME_ID = "YOUR_API_ID")
Sys.setenv(TRAVELTIME_KEY = "YOUR_API_KEY")
Get Isochrones:
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 = 900,
coords = list(lat = 51.507609, lng = -0.128315),
transportation = list(type = "public_transport"),
properties = list('is_only_walking'))
result <- time_map(departure_searches = departure_search)
Also available:
time_filter()
Distance Matrix (Time Filter)routes()
Routestime_filter_fast()
Time Filter (Fast)time_filter_postcode_districts()
Time Filter (Postcode Districts)time_filter_postcode_sectors()
Time Filter (Postcode Sectors)time_filter_postcodes()
Time Filter (Postcodes)geocoding()
Geocoding (Search)geocoding_reverse()
Reverse Geocodingmap_info()
Map Infosupported_locations()
Supported Locations
Check function documentation for more examples.