Example OSM dataset
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
library(dplyr)
library(sf)
library(osmextract)
osm_lines = oe_get("Greater London", extra_tags = c("ref", "maxspeed", "bicyle", "traffic_calming"))
names(osm_lines)
stamford = osm_lines %>%
filter(name == "Stamford Street")
stamford_buffer = stamford %>%
sf::st_union() %>%
stplanr::geo_buffer(dist = 200)
mapview::mapview(stamford_buffer)
osm_case_study = osm_lines[stamford_buffer, , op = sf::st_within]
table(osm_case_study$highway)
table(osm_case_study$traffic_calming)
tc_data_osm = osm_case_study %>%
filter(!is.na(highway))
mapview::mapview(tc_data_osm)
object.size(tc_data_osm) / 1e6 # ~0.5MB
class(tc_data_osm)
class(tc_data_osm$geometry)
usethis::use_data(tc_data_osm, overwrite = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.