Update Opakapaka case study and add back to github.io page#101
Update Opakapaka case study and add back to github.io page#101iantaylor-NOAA wants to merge 33 commits into
Conversation
- no longer requires case-studies code to create age-to-length-conversion or wtatatage - estimation not currently working
- also add to _quarto.yml to get it to render
There was a problem hiding this comment.
Pull request overview
Updates the PIFSC ‘Ōpakapaka case study to use the newer r4ss::ss3_data_to_fims() pathway (reducing custom SS3-to-FIMS data wrangling), and re-enables the case study in the rendered GitHub Pages site.
Changes:
- Refactors the ‘Ōpakapaka case study data-prep to use
r4ss::ss3_data_to_fims()and updates plots/parameter setup accordingly. - Adds the case study back into the Quarto render list + sidebar navigation (with Hawaiian diacritics in the title).
- Switches CI/devcontainer dependency install from an
r4ssfeature branch togithub::r4ss/r4ss.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
content/PIFSC-opakapaka.qmd |
Reworks SS3→FIMS data conversion and updates model setup/plots; re-titles the case study. |
_quarto.yml |
Adds the ‘Ōpakapaka case study back to rendering and sidebar nav. |
.github/workflows/render.yml |
Updates CI dependency install to pull r4ss from default branch. |
.github/workflows/render-and-publish.yml |
Updates publish workflow dependency install to pull r4ss from default branch. |
.devcontainer/devcontainer.json |
Updates devcontainer package list to pull r4ss from default branch. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| dplyr::rows_update( | ||
| tibble::tibble( | ||
| module_name = "Recruitment", |
| opaka_ctl$sd_ratio <- NULL | ||
| opaka_ctl$submorphdist <- NULL | ||
|
|
||
| # remove intial F estimation |
| group_by(datestart) |> | ||
| reframe(prop = value/sum(value)) | ||
| prop.dat <- opaka_dat_fims |> | ||
| filter(type == "length" & name == "BFISH") |> |
|
@MOshima-PIFSC, if you're back and have any time to spare, you could look at these changes. Feel free to make additional changes, or raise any issues you find. |
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
…rent output structure Align the opakapaka FIMS inputs and rebuild the age-to-length conversion rows with explicit fleet names and modeled timing so the FIMSFrame validates cleanly. Update biomass, recruitment, index, and landings to align on years and replace hard-coded module and report indexing with lookup-based joins tied to the configured fleet modules. Also drop undefined recruitment-deviation rows before plotting so the rendered case study no longer emits geom_line missing-value warnings.
|
@iantaylor-NOAA, I pushed a case-study cleanup commit for the opakapaka qmd and was able to render it locally after these updates. What I changed:
The main point I would especially appreciate review on is the year alignment in the diagnostics section. From the local checks I ran, it looks like:
I also rendered the case study locally after these changes and it completed successfully. One note: I used |
|
@awilnoaa, thank you for all the improvements to this case study! I'm having problems rendering it locally so it's hard to speak to the issues around the range of years in the plotting. One thing I noticed is that these commands should not be necessary given the current state of |
|
Hi @iantaylor-NOAA thank you! After reading your comment, I went back and realized I was testing with an older local version of After updating, I was still running into the same issue, so I checked the function on the I think the age-to-length rows would still be incomplete for the way the opakapaka qmd is currently building a For reference, these are the lines I was looking at in the current r4ss function: weight_at_age: https://github.com/r4ss/r4ss/blob/main/R/ss3_data_to_fims.R#L349 Let me know your thoughts |
|
@awilnoaa, The It's the day before a long holiday weekend, but maybe we can work through this together sometime next week. |
|
@iantaylor-NOAA Sorry I haven't gotten around to this yet. I am just starting to get back and caught up with things. I'm happy to join you and @awilnoaa sometime next week to work through this! |
|
numbers(time, bio*, age, area) can be distributed to numbers(time, bio, age, area, length) at the population(time, area) level.
|
- no longer requires case-studies code to create age-to-length-conversion or wtatatage - estimation not currently working
- also add to _quarto.yml to get it to render
…rent output structure Align the opakapaka FIMS inputs and rebuild the age-to-length conversion rows with explicit fleet names and modeled timing so the FIMSFrame validates cleanly. Update biomass, recruitment, index, and landings to align on years and replace hard-coded module and report indexing with lookup-based joins tied to the configured fleet modules. Also drop undefined recruitment-deviation rows before plotting so the rendered case study no longer emits geom_line missing-value warnings.
…studies into opakapaka-update
What is the feature?
I updated the opakapaka case study to use
r4ss::ss3_data_to_fims()which eliminates the need for all the custom code processing the weight-at-age and age-to-length-conversion inputs. The match with the SS3 isn't perfect, but it's pretty good and I think worth having the stock visible on the rendered github.io page.How have you implemented the solution?
Does the PR impact any other area of the project, maybe another repo?