Skip to content

Commit

Permalink
Report missing surveys
Browse files Browse the repository at this point in the history
  • Loading branch information
markus1bauer committed Apr 19, 2024
1 parent 04fc0b3 commit b6e9a4b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
21 changes: 21 additions & 0 deletions R/CI_1_Generate_reports.R
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ readr::write_csv(
## 4 Check missing data ########################################################


### a Sites --------------------------------------------------------------------

miss_var_summary(sites, order = TRUE)

vis_miss(sites, cluster = FALSE) +
Expand All @@ -278,6 +280,9 @@ ggsave(
dpi = 300, height = 10, units = "cm"
)


### b Traits ------------------------------------------------------------------

miss_var_summary(traits, order = TRUE)

vis_miss(traits, cluster = FALSE, sort_miss = TRUE) +
Expand All @@ -287,3 +292,19 @@ ggsave(
here("tests", "testthat", "reports_missing_traits.png"),
dpi = 300, height = 10, units = "cm"
)


### c Species ------------------------------------------------------------------

species %>%
mutate(
total = rowSums(pick(starts_with("L") | starts_with("W")), na.rm = TRUE)
) %>%
select(name, total) %>%
vis_miss(cluster = FALSE, sort_miss = TRUE) +
theme(plot.background = element_rect(fill = "white"))

ggsave(
here("tests", "testthat", "reports_missing_species.png"),
dpi = 300, height = 10, units = "cm"
)
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ A workflow for the continuous evaluation of vegetation surveys.

![Missing traits](https://github.com/markus1bauer/CI_vegetation_surveys/blob/main/tests/testthat/reports_missing_traits.png)

![Missing species](https://github.com/markus1bauer/CI_vegetation_surveys/blob/main/tests/testthat/reports_missing_species.png)

## Warnings

### Different total cover (click on table)
Expand Down
Binary file added tests/testthat/reports_missing_species.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b6e9a4b

Please sign in to comment.