GithubHelp home page GithubHelp logo

psc-cotc / periodicreport Goto Github PK

View Code? Open in Web Editor NEW
3.0 6.0 1.0 244.86 MB

Auto Production of Periodic Report, including Tables and Figures

Home Page: https://psc-cotc.github.io/PeriodicReport/

TeX 4.71% HTML 91.81% JavaScript 3.48%

periodicreport's Introduction

PeriodicReport

Auto Production of Periodic Report, including Tables and Figures

Current Questions (please add to this list!)

CoTC: How does the documents structure look to the committee? Any suggestions for change? I was told in Jan 2024 that we will receive this input from the SP after providing them a first draft. Gary asked for summaries of MM fish intercepted by each party and the ERs of the MUs associated with MSFs vs NSFs

How do the tables and figures look in general? Anything else the CoTC would like to see (or not see) e.g., do we wish to impose "over harvested" or "under harvested" ERs on the pre- and post-season MU status figures? Jan 2024 - Yes, the CoTC would like to see a summary of Post season ERs compared to post-season allowable ERs and possibly a summary of MUs not meeting their escapement over time....

What years should we focus on for providing summary information? Should some information be broken up by base period vs abundance-based management period? Just recent years? Jan 2024 The years we are focused on in particular are catch years 2010 to present.

We are summarizing the following: Hatchery releases tagging wild smolt estimates fishery exploitation and escapement would like input on how best to summarize fishery impacts forecasts and forecast performance survival rates of wild stocks that were tagged or MUs?

Where is the definitive MU breakpoints and associated ER caps located? Diego said to use the PFMC documents!

Why do the forecasts differ between the WDFW released wild coho forecasts and what is described in the PFMC documents? Jan 2024 - Marissa said that the forecasts are agreed to numbers and often differ from the WDFW numbers published!

Is there a document or database that contains estimated survival rates for wild stocks in WA? (Mara provided these data in the last report)? Marissa provided these to me in Jan 2024 and they are now in the static table file

Anyone know where the HGMPs currently reside on the internet? And, if they don't, who to ask for copies of them? Still don't know

How to move forward with further input and review from CoTC members? They are awaiting the ability to review :)

CoTC & CoWG: What are the most important pieces of information that we have available to summarize that are helpful for the 2029 negotiations? TBD

periodicreport's People

Contributors

ccooktabor avatar daauerbach avatar

Stargazers

Marlene A Bellman avatar  avatar Angelika F Hagen-Breaux avatar

Watchers

James Cloos avatar Nicholas Komick avatar Michael Arbeider avatar  avatar  avatar Marlene A Bellman avatar

Forkers

ty-wdfw

periodicreport's Issues

Example figure for summarizing stock composition in fisheries

A few Southern Panel members requested we include summary information on fishery stock composition. In the summer of 2020, Angelika, myself, and Dan worked on creating figures to meet this request. While much progress was made, some tweaks are still needed (like combining some of the FRAM stocks into MUs - or just renaming them to be clearer to the reader), among other things. Here is a record of the conversation and the code that Dan last provided on this subject in an email dated 8-19-2020:

Thanks Carrie. In that code it looks like the fct_reorder needs to move into the initiating aes() in L58 rather than have it as a stand-alone in L62. (R/ggplot doesn’t know what to do with it there after a chaining “+”) However, it also looks like geom_bar is being called with a y-aesthetic, which ggplot doesn’t like. I think you’re getting around that with stat=”identity”, but geom_col would probably be preferable when you’ve already calculated and identified the y values.

Other than that, rather than modify your code, it was fastest for me to just do a version of more-or-less what I think you’re after. See below. Note that it looks like things are “mis-ordered” for a couple of stocks, but that’s because the data have identical strings for multiple stock ids (e.g., “Youngs Bay Hatchery” for 167 and 168) so the multiple rows of “Proportion” are being summed for each character/factor level of “Stock”. You’d need to relabel the Stock column with more info (mark status?) or do the re-order on StockID (second plot). You might also consider adding the “prop_thresh” value into the plot subtitle or such…

image
image

library("tidyverse")

theme_set(theme_light())

d <- read_csv("C:/Users/auerbdaa/Downloads/CohoMortalitiesSummary2010to18post.csv")

prop_thresh <- 0.0099

#not really sure what "AvgTotMort" is, but this calcs the per-stock proportion of the sum of AvgTotMort per fishery

d %>%

group_by(Fishery) %>%

mutate(Proportion = AvgTotMort / sum(AvgTotMort)) %>%

ungroup() %>%

filter(Proportion > prop_thresh) %>%

#for dev/testing...

filter(Fishery ID < 7) %>%

#break into a list of tibbles

split(.$Fishery) %>%

#do a thing to each table: here builds a list of ggplot objects

#you could assign to a new object and iterate png writes or whatever

map(

~.x %>% #".x" here is each tibble per-Fishery and the tilde makes the whole thing an implicit function

  ggplot(aes(x = fct_reorder(Stock, Proportion, min), y = Proportion)) +

   #ggplot(aes(x = fct_reorder(as.character(`Stock ID`), Proportion, min), y = Proportion)) +

  geom_col() + #do whatever you want to colors etc

  coord_flip() + xlab("FRAM Stock") + ylab("Proportion of Catch") +

  labs(

    title = paste(.x$Fishery[1], ":", sum(.x$AvgTotMort))

  )

)

Periodic Report Table (old table 2.1) - Pre and Post FRAM Run files for a summary table

Here is my attempt at describing 1 table needed. Please let me know if this works and makes sense and I will continue with the remaining tables and figures. This table would be referenced in section 9.5
PreSeasRunID.csv
PostSeasRunID.csv
Using the data from these 2 files, create a table of pre and post-run file data, like this one:
image

I am wondering if this table should be one of the Static tables because the information is pulled from a variety of sources and may be too difficult to automate.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.