Learn R Programming

walkalytics (version 0.1.0)

get_stops: Extract walking times to nearby public transportation stops

Description

get_stops processses a response object from a pubtrans_ch_nearby call to the walkalytics pubtrans API. Returns the nearby public tansportation stops, ordered by walking time.

Usage

get_stops(pubtrans_ch_nearby)

Arguments

pubtrans_ch_nearby

a response object from a pubtrans_ch_nearby call to the walkalytics pubtrans API.

Value

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

  • name name of the public tansportation stop (station).

  • walktime estimated walking time from the starting point to the station in minutes.

  • station_category category of the station, ranging from high to low service frequency (1 to 5; unassigned >= 90).

  • latitude latitude of the station.

  • longitude longitude of the station.

  • coordinates_type type of geodetic system.

  • transport_category type of station.

  • id official ID of the station.

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 {
pubtrans_ch_nearby(x = 8.05, y = 47.3, key = "abcd1234") %>% get_stops()
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab