A small creel interview data frame with intentional data quality issues
for demonstrating validate_creel_data() and standardize_species().
Includes an empty species string, a negative fish_kept value, and a
missing trip_hours value.
Format
A data frame with 6 rows and 5 columns:
- date
Interview date (Date class).
- day_type
Day type stratum:
"weekday"or"weekend".- species
Free-text species name; includes empty string and unrecognised value to demonstrate
standardize_species()behaviour.- fish_kept
Number of fish kept; one row is intentionally negative.
- trip_hours
Trip duration in hours; one row is intentionally
NA.
See also
Other "Example Datasets":
creel_counts_toy,
example_aerial_counts,
example_aerial_glmm_counts,
example_aerial_interviews,
example_ages,
example_calendar,
example_camera_counts,
example_camera_interviews,
example_camera_timestamps,
example_catch,
example_counts,
example_ice_interviews,
example_ice_sampling_frame,
example_interviews,
example_lengths,
example_sections_calendar,
example_sections_counts,
example_sections_interviews
Examples
data(creel_interviews_toy)
validate_creel_data(interviews = creel_interviews_toy)
#>
#> ── Creel Data Validation ───────────────────────────────────────────────────────
#> 12 pass | 2 warn | 1 fail
#>
#>
#> ── Table: interviews ──
#>
#> ✔ date
#> ✔ type: class: Date
#> ✔ na_rate: 0 / 6 NA (0%)
#> ✔ date_range: all within 1970-01-01 - 2100-12-31
#> ✔ day_type
#> ✔ type: class: character
#> ✔ na_rate: 0 / 6 NA (0%)
#> ✔ empty_strings: none
#> ! species
#> ✔ type: class: character
#> ✔ na_rate: 0 / 6 NA (0%)
#> ⚠ empty_strings: 1 empty string(s)
#> ✖ fish_kept
#> ✔ type: class: integer
#> ✔ na_rate: 0 / 6 NA (0%)
#> ✖ negative_values: 1 negative value(s)
#> ! trip_hours
#> ✔ type: class: numeric
#> ⚠ na_rate: 1 / 6 NA (17%)
#> ✔ negative_values: none
#>
standardize_species(creel_interviews_toy, species_col = "species")
#> Warning: 2 species value(s) could not be matched to an
#> AFS code and will be "NA":
#> • ""
#> • "UNKNOWN FISH"
#> date day_type species fish_kept trip_hours species_code
#> 1 2024-06-01 weekday walleye 2 3.5 WAE
#> 2 2024-06-01 weekday Largemouth Bass 0 2.0 LMB
#> 3 2024-06-02 weekend 1 NA <NA>
#> 4 2024-06-03 weekday bluegill -1 4.0 BLG
#> 5 2024-06-08 weekend northern pike 3 1.5 NOP
#> 6 2024-06-09 weekday UNKNOWN FISH 0 6.0 <NA>
