traveltime_map: API Wrapper for the Traveltime API

Description Usage Arguments Details Value References Examples

View source: R/traveltime_map.R

Description

get_traveltime is the main function of the traveltimeR package. It retrieves traveltime-isochrones from the traveltime platform, which supports several modes of transport in several countries and brings them into r as polygons stored in sf-objects.

Usage

1
2
3
traveltime_map(appId = "yourAppId", apiKey = "yourApiKey",
  location = NULL, traveltime = NULL, type = NULL, departure = NULL,
  arrival = NULL)

Arguments

appId

Traveltime-Plattform Application ID

apiKey

Traveltime-Plattform API-Key

location

vector of lat / long coordinates, coordinate system WGS84 / espg 4326, example: c(47.233,8.234).

traveltime

traveltime in seconds

type

transportation mode

departure

time of departure, date in extended ISO-8601 format (incl. timezone), example: "2018-08-05T08:00:00Z"

arrival

time of arrival, date in extended ISO-8601 format (incl. timezone), example: "2018-08-05T08:00:00Z"

Details

get_traveltime - retrieve isochrones for traveltimemaps from Traveltime API

To call the API via the package you need to get an api-key here http://docs.traveltimeplatform.com/overview/getting-keys/. If you're not using the API for commercial use users can get 10,000 free API queries a month. The following transport modes are supported (type):"cycling"", "cycling_ferry", "driving", "driving+train", "driving_ferry", "public_transport", "walking", "walking+coach", "walking_bus", "walking_ferry" or "walking_train".

Value

the results from the search

References

Traveltime Plattform API Docs

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 
traveltime30 <- traveltime_map(appId="yourAppID",
apiKey="yourApiKey",
location=c(47.378610,8.54000),
traveltime=1800,
type="public_transport",
departure="2018-10-05T08:00:00+01:00")

#plot the isochrones
plot(traveltime30)

tlorusso/traveltime documentation built on March 3, 2021, 1:41 a.m.