Skip to contents

Counts the number of interviews for each angler type within each calendar month. Angler type is taken from the column set via add_interviews(angler_type = ...).

Usage

summarize_by_angler_type(design)

Arguments

design

A creel_design object with interviews attached and angler_type column set via add_interviews(angler_type = ...).

Value

A data.frame with class c("creel_summary_angler_type", "data.frame") and columns: month, angler_type, N, percent.

Details

Interview-based summary, not pressure-weighted. This function tabulates raw interview records without applying survey weighting by sampling effort or effort stratum. For pressure-weighted extrapolated estimates, use estimate_catch_rate or estimate_harvest_rate.

Unrecorded grouping values

An interview whose grouping value was not recorded is reported under "Unknown", sorted last, rather than dropped. The interview is real and its grouping value is missing, which is not the same as the interview not existing, so sum(N) always equals the number of interviews attached to the design. "Unknown" is a label for the absence, never a category anyone selected. This matches summarize_by_zip and summarize_by_county; the survey-weighted estimators use <unknown> instead.

A column holding both unrecorded values and the literal value "Unknown" warns: the two are pooled into one row and cannot be told apart in the output. Missingness is tracked internally, so a category genuinely named "Unknown" keeps its own counts.

Examples

data(example_calendar)
data(example_interviews)
d <- creel_design(example_calendar, date = date, strata = day_type)
d <- add_interviews(d, example_interviews,
  catch = catch_total, effort = hours_fished, harvest = catch_kept,
  trip_status = trip_status, angler_type = angler_type
)
#> Warning: ! No `n_anglers` provided — assuming 1 angler per interview.
#>  Pass `n_anglers = <column>` to use actual party sizes for angler-hour
#>   normalization.
#>  If the interviews really are one angler each, pass `n_anglers = 1` to state
#>   that and silence this warning.
#>  Added 22 interviews: 17 complete (77%), 5 incomplete (23%)
summarize_by_angler_type(d)
#>   month angler_type  N percent
#> 1  June        bank 13    59.1
#> 2  June        boat  9    40.9