Skip to contents

Converts a long-format catch table into a canonical tibble for downstream use with add_catch(). The helper standardizes the interview linkage field, species field, numeric catch counts, and normalized catch-type values while keeping the data in long form.

The returned table always contains canonical columns: interview_uid, species, count, and catch_type.

Usage

prep_interview_catch(data, interview_uid, species, count, catch_type)

Arguments

data

A data frame in long format: one row per interview/species/catch-type combination.

interview_uid

Tidy selector for the interview linkage column.

species

Tidy selector for the species code or name column.

count

Tidy selector for the numeric catch count column.

catch_type

Tidy selector for the catch fate column. Values are normalized to lowercase.

Value

A tibble with canonical columns interview_uid, species, count, and catch_type.