{"id":13857994,"url":"https://github.com/zumbov2/walkalytics","last_synced_at":"2025-08-03T18:32:11.411Z","repository":{"id":217522066,"uuid":"130608337","full_name":"zumbov2/walkalytics","owner":"zumbov2","description":"An R wrapper for the walkalytics API","archived":false,"fork":false,"pushed_at":"2021-02-04T20:08:11.000Z","size":4316,"stargazers_count":24,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-22T16:39:07.014Z","etag":null,"topics":["geolocation","isochrones","public-transportation","rstats","switzerland","walking-times"],"latest_commit_sha":null,"homepage":"https://dev.walkalytics.com/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zumbov2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-04-22T21:16:15.000Z","updated_at":"2021-02-04T20:08:14.000Z","dependencies_parsed_at":"2024-01-17T01:37:51.013Z","dependency_job_id":null,"html_url":"https://github.com/zumbov2/walkalytics","commit_stats":null,"previous_names":["zumbov2/walkalytics"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zumbov2%2Fwalkalytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zumbov2%2Fwalkalytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zumbov2%2Fwalkalytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zumbov2%2Fwalkalytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zumbov2","download_url":"https://codeload.github.com/zumbov2/walkalytics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228557113,"owners_count":17936452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geolocation","isochrones","public-transportation","rstats","switzerland","walking-times"],"created_at":"2024-08-05T03:01:53.455Z","updated_at":"2024-12-07T04:14:00.719Z","avatar_url":"https://github.com/zumbov2.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"![Lifecycle](https://img.shields.io/badge/lifecycle-retired-orange.svg)\n[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/walkalytics)](https://cran.r-project.org/package=walkalytics)\n[![Build Status](https://travis-ci.org/zumbov2/walkalytics.svg?branch=master)](https://travis-ci.org/zumbov2/walkalytics)\n[![Licence](https://img.shields.io/badge/licence-GPL--3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html)\n[![cranlogs](https://cranlogs.r-pkg.org/badges/grand-total/walkalytics)](http://cran.rstudio.com/web/packages/walkalytics/index.html)\n\n# Walkalytics\n\u003cs\u003eThis R package is an interface to the [Walkalytics API](https://dev.walkalytics.com) that calculates the walking isochrone for a source location based on map data. 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. More information (geographical availability of the service etc.) can be found [here](https://www.walkalytics.com).\u003c/s\u003e  \n\n**Update 2021-02-04: The [Walkalytics API] is no longer available.**\n\n## Installation\nVersion 0.1.0 is on CRAN, and you can install it by:\n```r\ninstall.packages(\"walkalytics\")\n```\nFor regularly updated version (latest: 0.1.0), install from GitHub:\n```r\ninstall.packages(\"devtools\")\ndevtools::install_github(\"zumbov2/walkalytics\")\n```\n## Example 1: Albert's life in Aarau\nYoung Albert failed the entrance examination for ETH Zurich. The 16-year-old is now to move to Aarau to complete his secondary schooling. He doesn't know the town yet and is thinking about buying a bike for his everday life. Let's help Albert decide. He doesn't want to have to walk longer than 10 minutes. \n\nWe define the blokes's most important points-of-interest and call the walkalytics API with the function `isochrome_pois()`. We take Albert's future address as the source location. The function `pois_walktimes()` processes the API response object in such a way that the estimated walking times (in seconds) between the source location and the points-of-interest are returned.\n```r\n# Define Albert's points-of-interest \nplaces \u003c- data.frame(id = c(\"School\", \"Railway Station\", \"Affenkasten (Pub)\", \"Zurlindeninsel (River Island)\"),\n                     x = c(895737, 896297, 895620, 895840),\n                     y = c(6006558, 6006247, 6006171, 6007080))\n\n# Call Walkalytics API and extract walking times to points-of-interest\nisochrone_pois(x = 896552, y = 6006578, epsg = 3857, pois = places, key = key) %\u003e% pois_walktimes()\n\n# A tibble: 4 x 4\n  id                            walktime      x       y\n  \u003cchr\u003e                            \u003cint\u003e  \u003cint\u003e   \u003cint\u003e\n1 Railway Station                    184 896297 6006247\n2 School                             348 895737 6006558\n3 Zurlindeninsel (River Island)      470 895840 6007080\n4 Affenkasten (Pub)                  500 895620 6006171\n```\nLucky Albert. He can save his money. Read more about Albert's life [here](https://en.wikipedia.org/wiki/Albert_Einstein#Early_life_and_education).\n\n## Example 2: More details please\nWe can go one step further and extract high-resolution walking times. For this we use the function `isochrone_esri()`, which returns a response object that contains a base64-encoded gzipped Esri ASCII grid with walking times for every pixel. By using the function `esri_to_sgdf()`, we can convert the encoded Esri ASCII grid to an object of class `SpatialGridDataFrame` or we use `pixel_walktimes()` to directly extract walking times (in seconds) for every pixel with respect to the source location.\n```r\n# Call Walkalytics API and convert response object to SpatialGridDataFrame\ndt \u003c- isochrone_esri(x = 896552, y = 6006578, epsg = 3857, key = key) %\u003e% esri_to_sgdf()\n\n# Call Walkalytics API and extract walking times for every pixel\ndt2 \u003c- isochrone_esri(x = 896552, y = 6006578, epsg = 3857, key = key) %\u003e% pixel_walktimes()\n```\n`dt` can then be displayed graphically using `image()`\n```r\nrequire(viridisLite)\nimage(dt, col = magma(10, direction = -1))\n```\n![example](https://github.com/zumbov2/walkalytics/blob/master/images/aarau1.png)\n\n## Example 3: Public transportation stops for Switzerland\nBeside the isochrone API Walkalytics also offers the possibility of querying [nearby public transportation stops](https://dev.walkalytics.com/docs/services/54213b7b352a401664d5c48a/operations/5551ed9350d8000f54f144a2?). The query works in the almost same way as the previous examples. \n```r\n# Call the Walkalytics pubtrans API and extract the walking times to the stations\npubtrans_ch_nearby(x = 8.528872, y = 47.382902, max_walktime = 10, key = key) %\u003e% get_stops()  \n\n# A tibble: 7 x 8\n  name                          walktime station_category latitude longitude coordinates_type transport_category id     \n  \u003cchr\u003e                            \u003cdbl\u003e \u003cchr\u003e            \u003cchr\u003e    \u003cchr\u003e     \u003cchr\u003e            \u003cchr\u003e              \u003cchr\u003e  \n1 Zürich, Röntgenstrasse            1.30 3                8.529264 47.381932 WGS84            Bus                8591322\n2 Zürich, Limmatplatz               3.40 2                8.531623 47.384600 WGS84            Bus_Tram           8591257\n3 Zürich, Militär-/Langstrasse      4.40 2                8.527627 47.379600 WGS84            Bus                8591277\n4 Zürich, Quellenstrasse            6.10 2                8.528753 47.386740 WGS84            Bus_Tram           8591306\n5 Zürich, Kanonengasse              7.70 3                8.530306 47.378468 WGS84            Bus                8591219\n6 Zürich, Museum für Gestaltung     8.50 2                8.534937 47.382121 WGS84            Bus_Tram           8591282\n7 Zürich, Dammweg                   9.20 2                8.526392 47.388490 WGS84            Bus_Tram           8591110\n```\n## More\nWalkalytics also offers the possibility to save isochrones with freely selectable break values as PNG images (`isochrone_png() %\u003e% save_png()`). \n\n**Happy testing!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzumbov2%2Fwalkalytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzumbov2%2Fwalkalytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzumbov2%2Fwalkalytics/lists"}