Skip to content

Commit

Permalink
create figure afbakening duinen
Browse files Browse the repository at this point in the history
  • Loading branch information
wlangera committed Mar 11, 2024
1 parent fb8ebe4 commit e571074
Showing 1 changed file with 98 additions and 1 deletion.
99 changes: 98 additions & 1 deletion source/markdown/exploratie_duinen_weidestreek.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,104 @@ mapview(
mapview(paden$Duinen, legend = FALSE)
```

```{r}
# Create png for report
detail_westkant <- c(
"xmin" = 21500,
"ymin" = 197000,
"xmax" = 50000,
"ymax" = 217000)
detail_westkant_sf <- tibble(geometry = st_as_sfc(st_bbox(detail_westkant))) %>%

Check warning on line 292 in source/markdown/exploratie_duinen_weidestreek.Rmd

View workflow job for this annotation

GitHub Actions / check project with checklist

file=source/markdown/exploratie_duinen_weidestreek.Rmd,line=292,col=81,[line_length_linter] Lines should not be more than 80 characters.

Check warning on line 292 in source/markdown/exploratie_duinen_weidestreek.Rmd

View workflow job for this annotation

GitHub Actions / check project with checklist

file=source/markdown/exploratie_duinen_weidestreek.Rmd,line=292,col=81,[trailing_whitespace_linter] Trailing whitespace is superfluous.
st_as_sf() %>%
st_set_crs(31370)
mapview::mapviewOptions(fgb = FALSE) # opslaan werkt anders niet
dir.create("media/steekproeftrekking", showWarnings = FALSE)
m <- mapview(
st_crop(kleine_landbouwstreken$Duinen, detail_westkant_sf),
color = "red",
alpha.regions = 0,
legend = FALSE
) +
mapview(
st_crop(selectie_openheid_klasses$Duinen, detail_westkant_sf),
col.regions = "red",
legend = FALSE
) +
mapview(
st_crop(exclusie_osm_landgebruiken$Duinen, detail_westkant_sf),
col.regions = "green",
legend = FALSE
) +
mapview(
st_crop(paden$Duinen, detail_westkant_sf),
legend = FALSE)
mapview::mapshot(m, file = here("media", "steekproeftrekking",
"afbakening_duinen_west.png"))
```

```{r}
# Create png for report
detail_oostkant <- c(
"xmin" = 50000,
"ymin" = 213000,
"xmax" = 82000,
"ymax" = 230000)
detail_oostkant_sf <- tibble(geometry = st_as_sfc(st_bbox(detail_oostkant))) %>%

Check warning on line 331 in source/markdown/exploratie_duinen_weidestreek.Rmd

View workflow job for this annotation

GitHub Actions / check project with checklist

file=source/markdown/exploratie_duinen_weidestreek.Rmd,line=331,col=81,[line_length_linter] Lines should not be more than 80 characters.

Check warning on line 331 in source/markdown/exploratie_duinen_weidestreek.Rmd

View workflow job for this annotation

GitHub Actions / check project with checklist

file=source/markdown/exploratie_duinen_weidestreek.Rmd,line=331,col=81,[trailing_whitespace_linter] Trailing whitespace is superfluous.
st_as_sf() %>%
st_set_crs(31370)
mapview::mapviewOptions(fgb = FALSE) # opslaan werkt anders niet
dir.create("media/steekproeftrekking", showWarnings = FALSE)
m <- mapview(
st_crop(kleine_landbouwstreken$Duinen, detail_oostkant_sf),
color = "red",
alpha.regions = 0,
legend = FALSE
) +
mapview(
st_crop(selectie_openheid_klasses$Duinen, detail_oostkant_sf),
col.regions = "red",
legend = FALSE
) +
mapview(
st_crop(exclusie_osm_landgebruiken$Duinen, detail_oostkant_sf),
col.regions = "green",
legend = FALSE
) +
mapview(
st_crop(paden$Duinen, detail_oostkant_sf),
legend = FALSE)
mapview::mapshot(m, file = here("media", "steekproeftrekking",
"afbakening_duinen_oost.png"))
```

```{r}
plot1 <- png::readPNG(here("media", "steekproeftrekking",
"afbakening_duinen_west.png"))
plot2 <- png::readPNG(here("media", "steekproeftrekking",
"afbakening_duinen_oost.png"))
p <- cowplot::plot_grid(
grid::rasterGrob(plot1),
grid::rasterGrob(plot2),
nrow = 1, labels = c("A.", "B."))
ggsave(here("media", "steekproeftrekking", "afbakening_duinen_totaal.png"),
p,
dpi = 300,
width = 8,
height = 4)
```


```{r}
paden$Duinen %>%
group_by(Naam, key, value) %>%
Expand Down Expand Up @@ -702,7 +800,6 @@ mapview::mapshot(m, file = here("media", "steekproeftrekking",
"steekproefkader_duinen_west.png"))
```


```{r}
detail_east <- c(
"xmin" = 77000,
Expand Down

0 comments on commit e571074

Please sign in to comment.