Created
August 14, 2023 14:49
-
-
Save rafapereirabr/ba70e7314eec3700c23f5212f63bbad1 to your computer and use it in GitHub Desktop.
walking isochrone Sao Paulo with r5r
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(r5r) | |
library(mapview) | |
# build transport network | |
data_path <- system.file("extdata/spo", package = "r5r") | |
r5r_core <- setup_r5(data_path) | |
# load origin/destination points | |
points <- read.csv(file.path(data_path, "spo_hexgrid.csv")) | |
origin_1 <- subset(points, id =='89a8100c393ffff') | |
# estimate isochrone from origin_1 | |
iso1 <- isochrone(r5r_core, | |
origin = origin_1, | |
mode = c("walk"), | |
cutoffs = seq(0, 60, 5) | |
) | |
colors <- c('#ffe0a5','#ffcb69','#ffa600','#ff7c43','#f95d6a', | |
'#d45087','#a05195','#665191','#2f4b7c','#003f5c') | |
mapview(iso1, | |
zcol = "isochrone", | |
col.regions = rev(colors), | |
layer.name = 'Minutes', | |
alpha = .1) | |
Author
rafapereirabr
commented
Aug 14, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment