Runs validate_creel_data() on counts and/or interviews, aggregates
the results into a human-readable summary tibble (one row per table x
check type), and optionally detects unrecognised species values via
standardize_species().
Arguments
- counts
A data frame of count (effort) observations, or
NULL.- interviews
A data frame of interview observations, or
NULL.- species_col
Character scalar. If non-
NULLandinterviewsis provided, callsstandardize_species()on this column and appends aspecies_coveragerow showing the fraction of rows successfully matched to an AFS code. DefaultNULL(no species check).- na_threshold
Passed to
validate_creel_data(). Default0.10.- date_range
Passed to
validate_creel_data(). Defaultc(as.Date("1970-01-01"), as.Date("2100-12-31")).
Value
An object of class creel_validation_report - a data frame with
columns:
tableSource table:
"counts","interviews", or"species".checkCheck type (e.g.
"na_rate","date_range").n_passNumber of columns with
"pass"status.n_warnNumber of columns with
"warn"status.n_failNumber of columns with
"fail"status.detailComma-separated list of flagged columns, or
"all ok".
Details
The returned object is a creel_validation_report - a data frame with a
custom print method that renders a colour-coded cli summary. It can be
exported with write_estimates().
See also
Other "Reporting & Diagnostics":
adjust_nonresponse(),
check_completeness(),
compare_variance(),
flag_outliers(),
season_summary(),
standardize_species(),
summarize_by_angler_type(),
summarize_by_day_type(),
summarize_by_method(),
summarize_by_species_sought(),
summarize_by_trip_length(),
summarize_cws_rates(),
summarize_hws_rates(),
summarize_length_freq(),
summarize_refusals(),
summarize_successful_parties(),
summarize_trips(),
summary.creel_estimates(),
validate_creel_data(),
validate_design(),
validate_incomplete_trips(),
write_estimates()
Examples
if (FALSE) { # \dontrun{
counts <- data.frame(
date = as.Date(c("2024-06-01", "2024-06-02")),
day_type = c("weekday", "weekend"),
count = c(10L, NA_integer_)
)
interviews <- data.frame(
date = as.Date(c("2024-06-01", "2024-06-02")),
fish_kept = c(2L, -1L),
species = c("walleye", "")
)
rpt <- validation_report(counts, interviews, species_col = "species")
print(rpt)
} # }
