# NOT RUN {
# sample railway extraction with the 'osmdata' package
library (osmdata)
dat <- opq ("shinjuku") %>%
add_osm_feature (key = "railway") %>%
osmdata_sf (quiet = FALSE)
graph <- weight_railway (dat$osm_lines)
# }
Run the code above in your browser using DataLab