Joins the verdicts written by run_app() to the clip manifest, giving
the same table as classify_review() (the content of
validation_by_clip.csv), so that the summaries of stage 1, the
agreement between reviewers and the calibration work as with a review
in the BirdNET GUI. "uncertain" verdicts are kept but, like
"disagreement", left out of precision, thresholds and calibration,
which use only positive and negative verdicts.
Arguments
- manifest
NULL, a data frame (or tibble) or a character scalar path toclip_manifest.csv: the clip manifest (fromselect_clips(),cut_clips()orassign_reviewers()), one row per clip. Withoutput_dir, by default<output_dir>/clip_manifest.csvwhen it exists.- verdicts_file
Character scalar, path to the CSV written by
run_app().- clips_dir
NULLor a character scalar, folder of the clips, to fillreviewed_path(needed bybuild_training_set()).- reviewer
NULLor a character scalar, the reviewer: only their verdicts are used. WithNULL, every reviewer's verdicts are kept, one row per clip and reviewer, ready forreviewer_agreement()andconsensus_verdicts().
Value
A tibble (class tbl_df): the manifest with verdict
("positive", "negative",
"uncertain" or "not_reviewed"), reviewed_path, reviewer,
identity and identity_certainty (NA when the reviewer gave no
identity, or with a verdicts file of an earlier version).
With reviewer = NULL, a clip reviewed by two reviewers has two
rows, and a clip not yet reviewed has one row with reviewer = NA.
Details
A clip marked more than once by the same reviewer keeps the last verdict; a message says how many clips were marked again and how many of them changed verdict.
Examples
man <- system.file("extdata", "clip_manifest.csv", package = "sheepdog")
m <- read.csv(man)
# A verdicts file as written by run_app(), with two reviewers
f <- tempfile(fileext = ".csv")
write.csv(data.frame(
clip_file = m$clip_file[c(1, 1, 2, 3)],
species_folder = m$species_folder[c(1, 1, 2, 3)],
reviewer = c("ana", "bruno", "ana", "bruno"),
verdict = c("positive", "negative", "positive", "uncertain"),
time = "2026-01-15T20:00:00-0300"
), f, row.names = FALSE)
# The verdicts of one reviewer
v <- app_verdicts(man, f, reviewer = "ana")
#> Clips in the review queue: 12
#> not_reviewed: 10
#> positive: 2
table(v$verdict)
#>
#> not_reviewed positive
#> 10 2
# Every reviewer: one row per clip and reviewer
v_all <- app_verdicts(man, f)
#> Clips in the review queue: 12
#> negative: 1
#> not_reviewed: 9
#> positive: 2
#> uncertain: 1
v_all[!is.na(v_all$reviewer), c("clip_file", "reviewer", "verdict")]
#> # A tibble: 4 × 3
#> clip_file reviewer verdict
#> <chr> <chr> <chr>
#> 1 0.913_1_ARA01_20220110_000000_114.0s_117.0s.wav ana positive
#> 2 0.913_1_ARA01_20220110_000000_114.0s_117.0s.wav bruno negative
#> 3 0.789_1_ARA01_20220110_013000_135.0s_138.0s.wav ana positive
#> 4 0.938_2_ARA01_20220110_013000_159.0s_162.0s.wav bruno uncertain