diff --git a/README.Rmd b/README.Rmd index c715f6b..8f2d312 100644 --- a/README.Rmd +++ b/README.Rmd @@ -87,14 +87,14 @@ library(ggplot2) ggplot() + theme_void() + - geom_sf(data = subplaces, color = "grey50") + geom_sf(data = rsa.shapefiles::subplaces, color = "grey50") ``` ### Aggregating data with `st_union` ```{r aggregating, eval = F} # From subplaces to provinces -provinces <- subplaces %>% +provinces <- rsa.shapefiles::subplaces %>% group_by(province_id) %>% summarise( geometry = st_union(geometry), @@ -109,7 +109,7 @@ ggplot() + theme_void() + # use subplace fill geom_sf( - data = subplaces, + data = rsa.shapefiles::subplaces, aes(fill = stringr::str_sub(subplace_id, 6, 9)), color = NA, show.legend = FALSE diff --git a/README.md b/README.md index faabb03..141e85e 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ library(ggplot2) ggplot() + theme_void() + - geom_sf(data = subplaces, color = "grey50") + geom_sf(data = rsa.shapefiles::subplaces, color = "grey50") ``` @@ -83,7 +83,7 @@ ggplot() + ``` r # From subplaces to provinces -provinces <- subplaces %>% +provinces <- rsa.shapefiles::subplaces %>% group_by(province_id) %>% summarise( geometry = st_union(geometry), @@ -99,7 +99,7 @@ ggplot() + theme_void() + # use subplace fill geom_sf( - data = subplaces, + data = rsa.shapefiles::subplaces, aes(fill = stringr::str_sub(subplace_id, 6, 9)), color = NA, show.legend = FALSE