Skip to content

Commit

Permalink
codig of grouped leaflet maps
Browse files Browse the repository at this point in the history
  • Loading branch information
wlangera committed Aug 8, 2024
1 parent 75b8247 commit 8817b47
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions source/markdown/data_controle_2024.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ for (j in sort(years)) {
distinct(periode_in_jaar) %>%
pull()

Check warning on line 510 in source/markdown/data_controle_2024.Rmd

View workflow job for this annotation

GitHub Actions / check project with checklist

file=source/markdown/data_controle_2024.Rmd,line=510,col=1,[trailing_whitespace_linter] Trailing whitespace is superfluous.
for (ronde in sort(unique(data$periode_in_jaar))) {
for (ronde in sort(periods)) {
# Filter data for the current year and round
circles <- outside_circles_new %>%
filter(regio != "Oostelijke leemstreek",
Expand Down Expand Up @@ -543,11 +543,17 @@ for (j in sort(years)) {
}
}
groups <- outside_observations_new %>%

Check warning on line 546 in source/markdown/data_controle_2024.Rmd

View workflow job for this annotation

GitHub Actions / check project with checklist

file=source/markdown/data_controle_2024.Rmd,line=546,col=39,[trailing_whitespace_linter] Trailing whitespace is superfluous.
filter(regio != "Oostelijke leemstreek",
regio != "Polders") %>%
distinct(jaar, periode_in_jaar) %>%
mutate(group = paste("Jaar:", jaar, "- Ronde:", periode_in_jaar)) %>%
pull(group)
# Add layer control to toggle visibility of the facets
leaflet_map <- leaflet_map %>%
addLayersControl(
overlayGroups = unique(paste("Jaar:", sort(unique(data$jaar)), "- Ronde:",
sort(unique(data$periode_in_jaar)))),
overlayGroups = groups,
options = layersControlOptions(collapsed = FALSE)
) %>%
addLegend(
Expand Down

0 comments on commit 8817b47

Please sign in to comment.