The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
tidycreel ships three ggplot2-based plotting functions that cover the main inspection points in a creel survey workflow:
| Function | When to use |
|---|---|
plot_design() |
Inspect stratum sample sizes and count distributions |
autoplot(schedule) |
Review the survey calendar tile-by-tile |
autoplot(estimates) |
Visualise effort or CPUE estimates with CIs |
autoplot(length_dist) |
Visualise weighted length-frequency distributions |
theme_creel() / creel_palette() |
Apply consistent package-wide styling |
library(tidycreel)
library(ggplot2)
plot_design()Once you have built a creel_design object from a
calendar, plot_design() shows the number of sampled days
per stratum.
# Build a design from the bundled example calendar
data("example_counts")
cal <- unique(example_counts[, c("date", "day_type")])
design <- creel_design(cal, date = date, strata = day_type)
plot_design(design, title = "Sample sizes by stratum")
The bar chart makes it immediately clear whether weekday and weekend strata are balanced. A tall weekday bar with a short weekend bar signals that estimates for the weekend stratum will carry higher uncertainty.
Once counts are attached, plot_design() switches to a
jitter + crossbar display showing the raw count distribution per
stratum.
design <- add_counts(design, example_counts)
plot_design(design, title = "Count distribution by stratum")
The crossbar shows the mean with a 95 % normal CI across sampled days. Large within-stratum spread (many jittered points far from the crossbar) suggests high day-to-day variability and the need for more sampling days.
autoplot()autoplot.creel_schedule() renders a monthly tile
calendar from a creel_schedule object — the same object
produced by generate_schedule().
# Generate a three-month schedule sampling 40 % of days
schedule <- generate_schedule(
start_date = "2024-06-01",
end_date = "2024-08-31",
n_periods = 2,
sampling_rate = 0.4,
seed = 42
)
autoplot(schedule, title = "2024 Summer Creel Schedule")
Blue tiles are sampled weekdays; red tiles are sampled weekends; grey tiles are unsampled days. Month panels stack vertically so the full season is visible at a glance.
autoplot()autoplot() draws point-and-errorbar plots from
creel_estimates objects and histogram-style bar charts from
creel_length_distribution objects.
data("example_interviews")
design <- add_interviews(
design,
example_interviews,
catch = catch_total,
effort = hours_fished,
trip_status = trip_status
)
#> ℹ Added 22 interviews: 17 complete (77%), 5 incomplete (23%)
effort <- estimate_effort(design)
autoplot(effort, title = "Total angler-effort estimate")
Passing by = day_type estimates effort separately for
each stratum. The resulting plot maps the grouping variable to both the
x-axis and point colour.
effort_by_type <- estimate_effort(design, by = day_type)
autoplot(effort_by_type, title = "Angler-effort by day type")
Weekend effort is substantially higher than weekday effort — a typical pattern in summer recreational fisheries.
cpue <- estimate_catch_rate(design)
#> ℹ Using complete trips for CPUE estimation
#> (n=17, 77.3% of 22 interviews) [default]
autoplot(cpue, title = "Walleye CPUE (catch per angler-hour)")
est_length_distribution() produces weighted estimates of
the population length frequency. autoplot() renders this as
a histogram-style bar chart.
data("example_lengths")
data("example_catch")
# Species catch is required to group a distribution BY species: the totals are
# scaled onto the reported catch, and only this table records catch per species
# (the interview-level column is the all-species total).
design <- add_catch(
design,
example_catch,
catch_uid = interview_id,
interview_uid = interview_id,
species = species,
count = count,
catch_type = catch_type
)
design <- add_lengths(
design,
example_lengths,
length_uid = interview_id,
interview_uid = interview_id,
species = species,
length = length,
length_type = length_type,
count = count,
release_format = "binned"
)
ld <- est_length_distribution(design, by = species, bin_width = 25)
#> Warning: ! Length totals were rescaled onto the reported catch.
#> ℹ Measured fish (weighted): 37; reported: 93 -- a factor of 2.51.
#> ℹ estimate, se and the confidence bounds describe the REPORTED catch, estimated
#> from the measured subsample. Shares (percent) are unaffected.
autoplot(ld, theme = "creel")
All three functions return standard ggplot objects, so
they compose naturally with + (ggplot2 operators) or
side-by-side using patchwork if that
package is installed.
# Requires patchwork
library(patchwork)
plot_design(design) + autoplot(effort)
theme_creel()tidycreel provides a built-in theme and color palette so
your plots match the package’s visual style. These are designed for
clean, publication-ready output.
theme = "creel" argumentThe autoplot() methods for estimates and schedules
include a theme argument. Setting this to
"creel" applies theme_creel() and uses the
package’s primary colors automatically.
autoplot(cpue, theme = "creel", title = "CPUE with theme = 'creel'")
You can also apply theme_creel() manually to any ggplot
object, including those returned by plot_design(). The
creel_palette() function provides access to the individual
hex codes.
# Access individual colors
pal <- creel_palette()
pal[["primary"]]
#> [1] "#0b3b5e"
# Apply theme and colors manually
ggplot(example_counts, aes(x = day_type, y = effort_hours)) +
geom_boxplot(fill = pal[["light"]], color = pal[["primary"]]) +
theme_creel() +
labs(title = "Manual Plot with tidycreel Styles")
| Function | Input class | Returns |
|---|---|---|
plot_design(design) |
creel_design |
bar chart (no counts) or jitter+crossbar (counts) |
autoplot(schedule) |
creel_schedule |
monthly tile calendar |
autoplot(estimates) |
creel_estimates |
point-and-errorbar plot |
autoplot(length_dist) |
creel_length_distribution |
histogram-style bar chart |
theme_creel() |
N/A | ggplot2 theme object |
creel_palette() |
N/A | named character vector of hex colors |
All plots accept a title = argument and return a
ggplot object for further customisation with standard
ggplot2 + syntax.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.