Skip to content

Commit

Permalink
post 12/1 data update. Add STAR panel report.
Browse files Browse the repository at this point in the history
  • Loading branch information
okenk committed Dec 10, 2024
1 parent 72b62a1 commit 59b1eb8
Show file tree
Hide file tree
Showing 10 changed files with 549 additions and 544 deletions.
935 changes: 467 additions & 468 deletions Data/Raw_not_confidential/RecFIN_WA_catch_to_2023.csv

Large diffs are not rendered by default.

Binary file added YT_STAR_Panel_Report_Final_July10-14_2017.pdf
Binary file not shown.
30 changes: 18 additions & 12 deletions docs/data_summary_doc.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This documents data streams for use in the Northern Yellowtail Rockfish stock as
Some summary figures:

```{r pacfin-catch, cache=TRUE}
load(here('data/confidential/commercial/PacFIN.YTRK.CompFT.09.Oct.2024.RData'))
load(here('data/confidential/commercial/pacfin_12-09-2024/PacFIN.YTRK.CompFT.09.Dec.2024.RData'))
# I have checked and LANDING_YEAR = PACFIN_YEAR for all rows.
yt_n_catch_pacfin <- catch.pacfin |>
Expand All @@ -43,7 +43,7 @@ or_comm_catch <- read.csv(here("Data/Confidential/commercial/Oregon Commercial l
comm_draft_landings <- yt_n_catch_pacfin |>
filter(AGENCY_CODE != 'O') |>
group_by(PACFIN_YEAR, AGENCY_CODE)|>
summarise(catch_mt = sum(LANDED_WEIGHT_MTONS)) |>
summarise(catch_mt = sum(ROUND_WEIGHT_MTONS)) |>
rename(YEAR = PACFIN_YEAR) |>
bind_rows(
mutate(or_comm_catch, AGENCY_CODE = 'O')
Expand Down Expand Up @@ -73,7 +73,7 @@ comm_draft_landings |>
# landings by gear type
yt_n_catch_pacfin |>
group_by(PACFIN_GROUP_GEAR_CODE, LANDING_YEAR) |>
summarise(landings_mt = sum(LANDED_WEIGHT_MTONS)) |>
summarise(landings_mt = sum(ROUND_WEIGHT_MTONS)) |>
ggplot() +
geom_col(aes(x = LANDING_YEAR, y = landings_mt, fill = factor(PACFIN_GROUP_GEAR_CODE, levels = c('TWL', 'MSC', 'NET', 'POT', 'TLS', 'TWS', 'HKL')))) +
ggtitle('Commercial landings through 2023 by gear') +
Expand All @@ -84,7 +84,7 @@ yt_n_catch_pacfin |>
yt_n_catch_pacfin |>
mutate(geargroup2 = ifelse(PACFIN_GEAR_CODE == "MDT", yes = "MDT", no = PACFIN_GROUP_GEAR_CODE)) |> # split midwater trawl as MDT
group_by(geargroup2, LANDING_YEAR) |>
summarise(catch_mt = sum(LANDED_WEIGHT_MTONS)) |>
summarise(catch_mt = sum(ROUND_WEIGHT_MTONS)) |>
ggplot() +
geom_col(aes(x = LANDING_YEAR, y = catch_mt, fill = factor(geargroup2, levels = c("TWL", "MDT", "MSC", "NET", "POT", "TLS", "TWS", "HKL")))) +
ggtitle("Commercial landings through 2023 by gear with midwater trawl separated") +
Expand Down Expand Up @@ -136,8 +136,8 @@ ashop_catch |>
# WASHINGTON
wa_modern <- read.csv(here('Data/Raw_not_confidential/RecFIN_WA_catch_to_2023.csv')) |>
filter(RECFIN_WATER_AREA_NAME != 'Canada', RECFIN_YEAR <= 2023) |>
tibble::as_tibble() |>
group_by(RECFIN_YEAR) |>
tibble::as_tibble() |> filter(RECFIN_YEAR == 2023) |>
group_by(RECFIN_YEAR) |>
summarise(Dead_Catch = sum(SUM_TOTAL_MORTALITY_MT)) |>
mutate(State = 'WA (mt)')
Expand Down Expand Up @@ -209,9 +209,10 @@ crfs_ratios <- read.csv(here('Data/Raw_not_confidential/RecFIN_CA_catch_to_2023.
filter(grepl('Redwood', DISTRICT_NAME))
# This is pre-filtered to N. CA MRFSS only
ca_mrfss_catch <- read.csv(here('Data/Confidential/Rec/RecFIN_CA_MRFSS.csv')) |>
ca_mrfss_catch <- read.csv(here('Data/Confidential/Rec/RecFIN_CA_MRFSS.csv')) |>
arrange(desc(WGT_AB1)) |>
group_by(YEAR) |>
summarise(n_ca_catch_mt = sum(WGT_AB1, na.rm = TRUE)/1000) |>
summarise(n_ca_catch_mt = sum(WGT_AB1, na.rm = TRUE)/1000) |>
# for MRFSS phase 2, calculate ratio above 40-10 by weighted average of Albin and CRFS ratios
# weights are the inverse of time to last Albin year, first CRFS year
mutate(weighted_ratio = (albin$pct / (YEAR - 1986) + crfs_ratios$pct / (2005 - YEAR)) / (1/(YEAR - 1986) + 1/(2005 - YEAR)),
Expand Down Expand Up @@ -242,8 +243,8 @@ bind_rows(or_rec_catch, wa_modern, wa_historical, ca_modern, ca_mrfss_catch, ca_
#### Outstanding issues for WA:

1. There are three values for `RECFIN_WATER_AREA_NAME`: Estuary, Ocean, and Canada. Which should be included? Above table excludes Canada.
2. 2023 has a number of instances where `RECFIN_WEEK` is zero, and one instance where is it missing. In the instance where it is missing, there is no estimate of catch in mt.
3. Will likely convert the numbers in the historical sport landings to weight in mt. On the to do list.
2. 2023 has a number of instances where `RECFIN_WEEK` is zero, ~~and one instance where is it missing. In the instance where it is missing, there is no estimate of catch in mt.~~ Is `RECFIN_WEEK` of zero any cause for concern?
3. Will likely convert the numbers in the historical sport landings to weight in mt. Waiting for rec biodata before this is possible.

#### Method for CA MRFSS catches:

Expand All @@ -262,7 +263,7 @@ For CA rec catch estimates for the assessment:
- 1993-2004: Multiply total N. CA catch by weighted average of Albin ratio (1) and CRFS ratio. Weights are inverse of time to last Albin year or first CRFS year.
- 1990-1992: Interpolate between average of 1987-1989 and 1993-1995

**Concern**: Catches for 1980-1989 look somewhat high. They exceed rec catches in OR in 1982 and 1983.
**Concern**: Catches for 1980-1989 look somewhat high. They exceed rec catches in OR in 1982 and 1983. 1982, in particular, has much higher MRFSS catches in N. CA than any other year.

## Comp Data

Expand All @@ -271,7 +272,7 @@ For CA rec catch estimates for the assessment:
Initial length sample sizes after running `PacFIN.Utilities::cleanPacFIN()`:

```{r comm-bio, cache=TRUE}
load(here('Data/Confidential/Commercial/PacFIN.YTRK.bds.09.Oct.2024.RData'))
load(here('Data/Confidential/Commercial/pacfin_12-09-2024/PacFIN.YTRK.bds.09.Dec.2024.RData'))
bds_clean <- PacFIN.Utilities::cleanPacFIN(bds.pacfin, verbose = FALSE)
bds_clean |>
filter(state == 'WA' | state == 'OR' | PACFIN_GROUP_PORT_CODE == 'CCA' |
Expand Down Expand Up @@ -477,6 +478,11 @@ yt_survey_bio <- nwfscSurvey::pull_bio(common_name = 'yellowtail rockfish', surv
yt_n_survey_bio <- filter(yt_survey_bio, Latitude_dd > 40 + 1/6)
yt_tri_bio <- yt_survey_bio <- nwfscSurvey::pull_bio(common_name = 'yellowtail rockfish', survey = 'Triennial')
yt_n_tri_bio <- purrr::map(yt_tri_bio, \(dat) filter(dat, Latitude_dd > 40 + 1/6))
# looking at how growth varies over space and time
# clear break point in selectivity between age 5 and 6.
filter(yt_n_survey_bio, Age_years <= 20, Age_years >= 6) |>
Expand Down
Binary file modified docs/data_summary_doc_files/figure-html/pacfin-catch-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/data_summary_doc_files/figure-html/pacfin-catch-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/data_summary_doc_files/figure-html/pacfin-catch-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/data_summary_doc_files/figure-html/pacfin-catch-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 59b1eb8

Please sign in to comment.