Skip to content

Commit

Permalink
Summarizing flags in single column
Browse files Browse the repository at this point in the history
  • Loading branch information
linusblomqvist committed Aug 23, 2024
1 parent 2b68203 commit 037c127
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion check_ebird_checklists/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ server <- function(input, output) {
select(url:number_species, all_of(input$vars)) %>%
mutate(dubious = apply(.[, 10:ncol(.)], 1, any)) %>%
filter(dubious == TRUE) %>%
select(-dubious)
select(-dubious) %>%
rowwise() %>%
mutate(flags = paste(names(select(., where(is.logical)))[which(c_across(where(is.logical)))], collapse = ", ")) %>%
ungroup() %>%
relocate(flags, .after = url) %>%
select(url:number_species)
})

output$contents <- renderDataTable({
Expand Down
2 changes: 1 addition & 1 deletion check_ebird_checklists/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ui <- fluidPage(
),
mainPanel(HTML("<p>This web app helps detect eBird checklists with potential checklist-level errors.<p>"),
HTML("<p>First upload a .txt file containing eBird data, downloaded from <a href = 'https://ebird.org/data/download'>https://ebird.org/data/download.</a> Adjust the thresholds for different checks if needed, and then select which checks to run. Finally, click the download button and it will give you a .csv file with a list of potentially problematic checklists."),
HTML("<p>Columns 10 and up in this spreadsheet indicate the type of potential error, as listed below. Note: just because a checklist gets flagged by this algorithm does not mean that it necessarily has an error. Each flagged checklist needs to be individually assessed by a reviewer before any action is taken.<p>"),
HTML("<p>The 'flags' column in this spreadsheet indicates the type of potential error, as listed below. Note: just because a checklist gets flagged by this algorithm does not mean that it necessarily has an error. Each flagged checklist needs to be individually assessed by a reviewer before any action is taken.<p>"),
HTML("<p>For larger areas or longer time periods, a very large number of checklists might be flagged. Doing one month at a time for an individual county might be a reasonable approach. Also, in some cases, a single check might account for a large share of the flagged checklists. In our experience, this can happen with no_observer_mismatch. In this case, to reduce the burden, you can deselect the offending check. <p>"),
HTML("<p><li>ampm: A frequent issue is for the time to be entered as AM instead of PM (i.e., in the middle of the night, rather than in the afternoon).</li>
<li>midnight: Starting a checklist at midnight should be quite uncommon, but it's often used to enter day-list or incorrectly add time on a historical/incidental list without time.</li>
Expand Down

0 comments on commit 037c127

Please sign in to comment.