Skip to content

Commit

Permalink
Mostly continuing to fine tune landings
Browse files Browse the repository at this point in the history
  • Loading branch information
okenk committed Dec 18, 2024
1 parent a133974 commit 46f68c9
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 46 deletions.
8 changes: 6 additions & 2 deletions Rscripts/logbook_analys.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
13 changes: 7 additions & 6 deletions docs/data_summary_doc.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')) |>
Expand Down Expand Up @@ -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(
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.
76 changes: 38 additions & 38 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

<meta name="dcterms.date" content="2024-12-12">
<meta name="dcterms.date" content="2024-12-18">

<title>Data summary</title>
<style>
Expand Down Expand Up @@ -77,7 +77,7 @@ <h1 class="title">Data summary</h1>
<div>
<div class="quarto-title-meta-heading">Published</div>
<div class="quarto-title-meta-contents">
<p class="date">December 12, 2024</p>
<p class="date">December 18, 2024</p>
</div>
</div>

Expand All @@ -93,7 +93,7 @@ <h2 class="anchored" data-anchor-id="landings">Landings</h2>
<section id="commercial-landings" class="level3">
<h3 class="anchored" data-anchor-id="commercial-landings">Commercial landings</h3>
<p>Some summary figures:</p>
<div class="cell" data-hash="data_summary_doc_cache/html/pacfin-catch_0369dc1f8aab5f228892844f9960def9">
<div class="cell" data-hash="data_summary_doc_cache/html/pacfin-catch_ff23bc8819aa4d424abf9dbaba39f6d9">
<div class="cell-output-display">
<p><img src="data_summary_doc_files/figure-html/pacfin-catch-1.png" class="img-fluid" width="672"></p>
</div>
Expand Down Expand Up @@ -657,7 +657,7 @@ <h3 class="anchored" data-anchor-id="recreational-landings">Recreational landing
<td style="text-align: left;">22.7</td>
<td style="text-align: left;">0.0</td>
<td style="text-align: left;">2931</td>
<td style="text-align: left;">6.3</td>
<td style="text-align: left;">0.0</td>
</tr>
<tr class="even">
<td style="text-align: left;">1981</td>
Expand Down Expand Up @@ -725,238 +725,238 @@ <h3 class="anchored" data-anchor-id="recreational-landings">Recreational landing
<tr class="odd">
<td style="text-align: left;">1990</td>
<td style="text-align: left;">16.3</td>
<td style="text-align: left;">13.5</td>
<td style="text-align: left;">19.8</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">4.3</td>
</tr>
<tr class="even">
<td style="text-align: left;">1991</td>
<td style="text-align: left;">29.8</td>
<td style="text-align: left;">31.8</td>
<td style="text-align: left;">39.7</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">3.1</td>
</tr>
<tr class="odd">
<td style="text-align: left;">1992</td>
<td style="text-align: left;">32.1</td>
<td style="text-align: left;">32.9</td>
<td style="text-align: left;">35.6</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">2.0</td>
</tr>
<tr class="even">
<td style="text-align: left;">1993</td>
<td style="text-align: left;">79.8</td>
<td style="text-align: left;">41.7</td>
<td style="text-align: left;">46.8</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">1.3</td>
</tr>
<tr class="odd">
<td style="text-align: left;">1994</td>
<td style="text-align: left;">22.7</td>
<td style="text-align: left;">19.3</td>
<td style="text-align: left;">20.2</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.7</td>
</tr>
<tr class="even">
<td style="text-align: left;">1995</td>
<td style="text-align: left;">35.5</td>
<td style="text-align: left;">14.3</td>
<td style="text-align: left;">16.7</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.6</td>
</tr>
<tr class="odd">
<td style="text-align: left;">1996</td>
<td style="text-align: left;">20.8</td>
<td style="text-align: left;">20.4</td>
<td style="text-align: left;">22.5</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">1.6</td>
</tr>
<tr class="even">
<td style="text-align: left;">1997</td>
<td style="text-align: left;">21.6</td>
<td style="text-align: left;">24.5</td>
<td style="text-align: left;">27.4</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">6.6</td>
</tr>
<tr class="odd">
<td style="text-align: left;">1998</td>
<td style="text-align: left;">31.2</td>
<td style="text-align: left;">41.6</td>
<td style="text-align: left;">46.0</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">1.8</td>
</tr>
<tr class="even">
<td style="text-align: left;">1999</td>
<td style="text-align: left;">56.3</td>
<td style="text-align: left;">14.4</td>
<td style="text-align: left;">17.9</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">3.1</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2000</td>
<td style="text-align: left;">20.6</td>
<td style="text-align: left;">18.1</td>
<td style="text-align: left;">21.0</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">2.1</td>
</tr>
<tr class="even">
<td style="text-align: left;">2001</td>
<td style="text-align: left;">15.3</td>
<td style="text-align: left;">11.7</td>
<td style="text-align: left;">13.2</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.8</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2002</td>
<td style="text-align: left;">19.6</td>
<td style="text-align: left;">3.2</td>
<td style="text-align: left;">4.3</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.4</td>
</tr>
<tr class="even">
<td style="text-align: left;">2003</td>
<td style="text-align: left;">15.1</td>
<td style="text-align: left;">11.2</td>
<td style="text-align: left;">12.1</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.3</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2004</td>
<td style="text-align: left;">11.3</td>
<td style="text-align: left;">17.4</td>
<td style="text-align: left;">18.6</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.2</td>
</tr>
<tr class="even">
<td style="text-align: left;">2005</td>
<td style="text-align: left;">12.5</td>
<td style="text-align: left;">14.0</td>
<td style="text-align: left;">16.6</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.2</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2006</td>
<td style="text-align: left;">8.3</td>
<td style="text-align: left;">8.8</td>
<td style="text-align: left;">10.8</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.2</td>
</tr>
<tr class="even">
<td style="text-align: left;">2007</td>
<td style="text-align: left;">6.8</td>
<td style="text-align: left;">14.1</td>
<td style="text-align: left;">15.0</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.5</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2008</td>
<td style="text-align: left;">5.6</td>
<td style="text-align: left;">13.8</td>
<td style="text-align: left;">14.6</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.2</td>
</tr>
<tr class="even">
<td style="text-align: left;">2009</td>
<td style="text-align: left;">10.2</td>
<td style="text-align: left;">28.3</td>
<td style="text-align: left;">29.7</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">1.0</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2010</td>
<td style="text-align: left;">8.3</td>
<td style="text-align: left;">42.9</td>
<td style="text-align: left;">43.5</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.3</td>
</tr>
<tr class="even">
<td style="text-align: left;">2011</td>
<td style="text-align: left;">11.6</td>
<td style="text-align: left;">53.2</td>
<td style="text-align: left;">53.8</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.5</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2012</td>
<td style="text-align: left;">13.8</td>
<td style="text-align: left;">18.6</td>
<td style="text-align: left;">19.2</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.7</td>
</tr>
<tr class="even">
<td style="text-align: left;">2013</td>
<td style="text-align: left;">16.1</td>
<td style="text-align: left;">23.2</td>
<td style="text-align: left;">23.7</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.6</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2014</td>
<td style="text-align: left;">11.4</td>
<td style="text-align: left;">42.3</td>
<td style="text-align: left;">43.1</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.3</td>
</tr>
<tr class="even">
<td style="text-align: left;">2015</td>
<td style="text-align: left;">22.1</td>
<td style="text-align: left;">26.0</td>
<td style="text-align: left;">26.5</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.6</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2016</td>
<td style="text-align: left;">7.7</td>
<td style="text-align: left;">36.6</td>
<td style="text-align: left;">36.9</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.2</td>
</tr>
<tr class="even">
<td style="text-align: left;">2017</td>
<td style="text-align: left;">14.0</td>
<td style="text-align: left;">47.3</td>
<td style="text-align: left;">47.5</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.5</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2018</td>
<td style="text-align: left;">35.6</td>
<td style="text-align: left;">38.1</td>
<td style="text-align: left;">38.4</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">1.0</td>
</tr>
<tr class="even">
<td style="text-align: left;">2019</td>
<td style="text-align: left;">30.4</td>
<td style="text-align: left;">48.4</td>
<td style="text-align: left;">48.7</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">1.3</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2020</td>
<td style="text-align: left;">38.4</td>
<td style="text-align: left;">59.9</td>
<td style="text-align: left;">60.1</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">0.6</td>
</tr>
<tr class="even">
<td style="text-align: left;">2021</td>
<td style="text-align: left;">27.9</td>
<td style="text-align: left;">61.5</td>
<td style="text-align: left;">61.9</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">1.1</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2022</td>
<td style="text-align: left;">51.7</td>
<td style="text-align: left;">68.6</td>
<td style="text-align: left;">69.0</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">1.2</td>
</tr>
<tr class="even">
<td style="text-align: left;">2023</td>
<td style="text-align: left;">82.9</td>
<td style="text-align: left;">88.1</td>
<td style="text-align: left;">89.1</td>
<td style="text-align: left;">0</td>
<td style="text-align: left;">3.1</td>
</tr>
Expand Down

0 comments on commit 46f68c9

Please sign in to comment.