From 46f68c9581da272163296d58476d2129961b8474 Mon Sep 17 00:00:00 2001 From: okenk Date: Wed, 18 Dec 2024 11:30:59 -0800 Subject: [PATCH] Mostly continuing to fine tune landings --- Rscripts/logbook_analys.R | 8 +- docs/data_summary_doc.qmd | 13 +-- .../figure-html/pacfin-catch-1.png | Bin 17183 -> 17181 bytes docs/index.html | 76 +++++++++--------- 4 files changed, 51 insertions(+), 46 deletions(-) diff --git a/Rscripts/logbook_analys.R b/Rscripts/logbook_analys.R index 242794a..b394aa5 100644 --- a/Rscripts/logbook_analys.R +++ b/Rscripts/logbook_analys.R @@ -38,7 +38,11 @@ all_hauls_yt <- bind_rows(list(obs = observer_yt, em = em_yt), .id = 'program') mutate(depth_std = (AVG_DEPTH - mean(AVG_DEPTH))/sd(AVG_DEPTH), fyear = factor(YEAR), log_duration = log(HAUL_DURATION), cpue = MT/HAUL_DURATION, month = lubridate::month(as.Date(SET_DATE)), - fDRVID = factor(DRVID), fport = factor(R_PORT)) # note D_PORT is NA in some cases, R_PORT is always defined (fish ticket) + fDRVID = factor(DRVID), fport = factor(R_PORT), + program = factor(program)) # note D_PORT is NA in some cases, R_PORT is always defined (fish ticket) + +nrow(filter(all_hauls_yt, MT>0)) / nrow(all_hauls_yt) +# good to monitor % positive hauls. This is pretty high (70%). yt_mesh <- sdmTMB::make_mesh(all_hauls_yt, xy_cols = c('AVG_LONG', 'AVG_LAT'), n_knots = 50) plot(yt_mesh) @@ -79,5 +83,5 @@ all_hauls_yt |> ### general observation: as I have added terms to the model, the signal in the index went from well-defined to noisy and meaningless. ### the port (8 levels) and vessel (46 levels) effects really did it in. should think more carefully about what terms to include. -### note 3962 hauls, 2762 positive hauls over 12 years. ~330 hauls/yr, 230 positive hauls/yr. effort varies a lot by year. +### note 3962 hauls, 2762 positive hauls over 12 years. ~330 hauls/yr, 230 positive hauls/yr. # of hauls varies a lot by year. ### (increases 2012-2018) \ No newline at end of file diff --git a/docs/data_summary_doc.qmd b/docs/data_summary_doc.qmd index f97fa4a..5fb00fe 100644 --- a/docs/data_summary_doc.qmd +++ b/docs/data_summary_doc.qmd @@ -31,8 +31,7 @@ load(here('data/confidential/commercial/pacfin_12-11-2024/PacFIN.YTRK.CompFT.11. yt_n_catch_pacfin <- catch.pacfin |> filter( AGENCY_CODE == 'W' | AGENCY_CODE == 'O' | COUNTY_NAME == 'DEL NORTE' | COUNTY_NAME == 'HUMBOLDT', # OR, WA, N. CA - LANDING_YEAR < 2024, - !(CATCH_AREA_CODE %in% c('23A', '23C', '26A')) # exclude Puget Sound fish tickets + LANDING_YEAR < 2024 ) # OR landings time series @@ -151,11 +150,12 @@ ashop_catch |> ```{r rec-catch-modern} # 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) |> +wa_modern <- read.csv(here('Data/Confidential/Rec/CTE501-WASHINGTON-1990---2023.csv')) |> + filter(RECFIN_WATER_AREA_NAME != 'Canada', RECFIN_YEAR <= 2023, + RECFIN_CATCH_AREA_NAME != 'SEKIU AND PILLAR POINT') |> tibble::as_tibble() |> group_by(RECFIN_YEAR) |> - summarise(Dead_Catch = sum(SUM_TOTAL_MORTALITY_MT)) |> + summarise(Dead_Catch = sum(TOTAL_MORTALITY_MT)) |> mutate(State = 'WA (mt)') wa_historical <- read.csv(here('Data/Raw_not_confidential/WA_historical_rec.csv')) |> @@ -239,7 +239,8 @@ ca_mrfss_catch <- read.csv(here('Data/Confidential/Rec/RecFIN_CA_MRFSS.csv')) |> n_ca_catch_mt * weighted_ratio), State = 'CA (mt)') |> select(-n_ca_catch_mt, -weighted_ratio) |> - rename(RECFIN_YEAR = YEAR) + rename(RECFIN_YEAR = YEAR) |> + filter(RECFIN_YEAR != 1980) # Interpolate between 3-year average before and after MRFSS break ca_mrfss_interpolate <- tibble( diff --git a/docs/data_summary_doc_files/figure-html/pacfin-catch-1.png b/docs/data_summary_doc_files/figure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