diff --git a/data-raw/iphc-compare.R b/data-raw/iphc-compare.R index eabc05f..96a2ce1 100644 --- a/data-raw/iphc-compare.R +++ b/data-raw/iphc-compare.R @@ -279,6 +279,25 @@ dir.create("data-raw/figs", showWarnings = FALSE) ggsave('data-raw/figs/iphc-compare.pdf', width = 12, height = 15) ggsave('data-raw/figs/iphc-compare.png', width = 12, height = 15) +# ## hook counts +# raw_d |> +# group_by(year, station, stlkey, sample_type, hooks_observed) |> +# summarise(gfdata = sum(number_observed), .groups = "drop") |> +# filter(sample_type == "all hooks") |> +# tidyr::pivot_longer(cols = c(hooks_observed, gfdata), names_to = "source") |> +# mutate(source = gsub("hooks_observed", "GFBio/gfiphc", source)) |> +# mutate(source = gsub("gfdata", "IPHC website/gfdata", source)) |> +# group_by(year, source) |> summarise(value = sum(value, na.rm = TRUE)) |> +# ggplot(aes(year, value, colour = source)) + geom_line() + geom_point(pch = 21) + +# scale_colour_manual(values = c("grey40", brewer.pal(6, "Reds")[4])) + +# gfplot::theme_pbs() + labs(colour = "Source") + +# ylab("Hooks observed") + xlab("Year") + +# scale_x_continuous(breaks = seq(2000, 2025, 2)) + +# ylim(0, NA) + +# theme(legend.position = "inside", legend.position.inside = c(0.2, 0.25)) +# ggsave("data-raw/figs/iphc-hooks-observed-compare.pdf", width = 5, height = 3) +# ggsave("data-raw/figs/iphc-hooks-observed-compare.png", width = 5, height = 3) + # Get proportional difference by species diff_df <- test2 |> pivot_wider(names_from = source, values_from = count) |>