Learn R Programming

walkalytics (version 0.1.0)

pois_walktimes: Extract walking times to points-of-interest

Description

pois_walktimes processses a response object from a isochrone_pois call to the walkalytics pubtrans API. Returns walking times from the source location to the given points-of-interest, ordered by walking time.

Usage

pois_walktimes(isochrone_pois)

Arguments

isochrone_pois

a response object from a isochrone_pois call to the walkalytics isochrone API.

Value

A data.frame (tibble::tibble) that contains:

  • id id of the point-of-interest.

  • walktime estimated walking time from the starting point to the point-of-interest in seconds.

  • x x-coordinate of the point-of-interest.

  • y y-coordinate of the point-of-interest.

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.

References

Walkalytics API documentations

Examples

Run this code
# NOT RUN {
# Generate set of POIs
x <- c(895777, 896044, 895639)
y <- c(6004833, 6004886, 6005147)
id <- c("pupil1", "pupil2", "pupil3")
pupils <- data.frame(x = x, y = y, id = id)

# Issue query
isochrone_pois(x = 895815, y = 6004839, pois = pupils, key = "abcd1234") %>% pois_walktimes()
# }

Run the code above in your browser using DataLab