Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
WihanZA committed Oct 1, 2024
1 parent 0b02a87 commit 3dcaffa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ library(ggplot2)

ggplot() +
theme_void() +
geom_sf(data = subplaces, color = "grey50")
geom_sf(data = rsa.shapefiles::subplaces, color = "grey50")
```

<img src="man/figures/README-plotting-1.png" width="50%" />
Expand All @@ -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),
Expand All @@ -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
Expand Down

0 comments on commit 3dcaffa

Please sign in to comment.