isochrone: Issue a walkalytics isochrone query

Description Usage Arguments Details Value References Examples

View source: R/isochrone.R

Description

isochrone calls the walkalytics isochrone API which calculates the walking isochrone for a source location. The repsonse object contains a base64-encoded raster file, containing 4 classes (as PNG file, this is default) or the actual travel times in seconds for every pixel (as a gzipped Esri ASCII grid). If a set of points-of-interest (POIs) is given, the duration time for walking from the source location to each POI is calculated.

Usage

1
2
3
isochrone(x, y, epsg = 3857, max_min = 1000, raw_data = FALSE,
  pois = NULL, only_pois = FALSE, break_values = c(0, 3, 6, 9, 13),
  key = "my_walkalytics_key")

Arguments

x

x-coordinate of the source location (coordinate system is WGS/84 Pseudo Mercator).

y

y-coordinate of the source location (coordinate system is WGS/84 Pseudo Mercator).

epsg

EPSG code for coordinate system of the x- and y-coordinate.

max_min

maximum number of minutes for the isochrone.

raw_data

if TRUE, the API returns a gzipped Esri ASCII grid with traveltimes for every pixel. If FALSE, it returns a PNG file with classified isochrones.

pois

a data.frame to specify a set of points-of-interest (POIs). The API calculates the duration time for walking from the source location to each POI. The following columns are required:

  • x x-coordinate of the source location (EPSG:3857).

  • y y-coordinate of the source location (EPSG:3857).

  • id name of POI (optional)

only_pois

if TRUE, the API only returns an annotated list of the points-of-interest (POIs). No isochrone raster will be included in the response.

break_values

a vector of break values (walking time in minutes) for the classification of the PNG result.

key

your walkalytics subscription key which provides access to the API.

Details

To get an API key, you need to register at https://dev.walkalytics.com/signin. With the free starter account, you can make up to 100 calls a week to the API.

Value

The response object from the request. Use esri_to_sgdf, pixel_walktimes, save_png, or pois_walktimes to process the response.

References

Walkalytics API documentations

Examples

1
isochrone(x = 895815, y = 6004839, key = "abcd1234")

walkalytics documentation built on April 23, 2018, 5:04 p.m.