Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Curriculum/Day_2/day_2.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -486,16 +486,22 @@ D) You can't
<!-- ### Calling previous report -->

::: {.callout-note appearance="minimal"}
20 minute break for questions & practicing
Break for questions & practicing
:::

{{< include ../snippets/complex_asar_exercises.qmd >}}

# NEFSC-specific content

This information will be available after the workshop in the sidebar's [Regionally-specific content tab](../../resources/regional_info.qmd).

{{< include ../snippets/nefsc_transition.qmd >}}

# NOAA Standard Assessment Report Guidelines

A part of the approach to standardizing workflow is to design report guidelines that identifies the audience of assessment reports and attempts to streamline the review process through succinct reporting which will increase throughput.

The standard guidelines were designed using a thorough review of assessment reports from across the agency. Theses guidelines were reviewed by a steering committee of assessment scientists across NOAA, leadership at NOAA Fisheries HQ, and U.S. fishery management councils. The guidelines are also under formal review in the Northwest grounfish SSC subcommittee for adoptions for the 2026-2027 assessment cycle.
The standard guidelines were designed using a thorough review of assessment reports from across the agency. Theses guidelines were reviewed by a steering committee of assessment scientists across NOAA, leadership at NOAA Fisheries HQ, and U.S. fishery management councils. The guidelines are also under formal review in the Northwest groundfish SSC subcommittee for adoptions for the 2026-2027 assessment cycle.

<!-- {{< embed-pdf url=".../assets/standard_guidelines.pdf" height="600px" width="100%" >}} -->
<iframe src="../../assets/standard_guidelines.pdf" width="100%" height="600px"></iframe>
Expand Down
125 changes: 125 additions & 0 deletions Curriculum/snippets/nefsc_transition.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
### Adaptation of NEFSC Template to {asar}

Dan Hennen, the NEFSC representative on the workflows steering committee, has designed a sleek workflow to help aid the transition from the typical management track assessment to NOAA standard guidelines. The standard guidelines executive summary mimics closely the current management track reports, so here we will automate the executive summary in this section of the report.

Use the following code to download files into your working directory for the next process:

```{r}
#| eval: false
get_nefsc_files <- function(dir){
NEFSCtoASAR_folder <- file.path(dir, "ExportLegacyNEFSCtoASARproject")
testStocks_folder <- file.path(NEFSCtoASAR_folder, "testStocks")
asarreport_folder <- file.path(NEFSCtoASAR_folder, "ASARreportFiles")
# if (!file.exists(dir)) {
dir.create(NEFSCtoASAR_folder)
dir.create(testStocks_folder)
dir.create(asarreport_folder)
# }
file_names_to_download <- c(
# "ASARreportFiles",
"CheckLatexInstall.R",
"create_asar_object.R",
"Example.R",
"MapAutoUpdateToAsar.R",
"plot_survey_indices.R",
"plot_total_catch.R",
"table_brp1.1.R",
"table_catch_status1.1.R",
"table_projections1.1.R",
"testAdditionalStocks.R",
"TestMoreStocksReportOnly.R"
)
teststocks_files <- c(
"BSBUNITAutoAss.RData",
"BUTUNITAutoAss.RData",
"CODGBAutoAss.RData",
"CODWGOMAutoAss.RData",
"SCUNITAutoAss.RData"
)
asarreport_files <- c(
"01_executive_summary.qmd",
"in-header.tex",
"preamble.R"
)

for (i in file_names_to_download) {
cli::cli_alert_info("📥 Downloading {i}...")
download.file(
glue::glue("https://raw.githubusercontent.com/nmfs-ost/workflows-workshop/nefsc-transition/resources/ExportLegacyNEFSCtoASARproject/{i}"),
glue::glue("{NEFSCtoASAR_folder}/{i}"),
mode = "wb"
)
}

for (i in teststocks_files) {
cli::cli_alert_info("📥 Downloading {i}...")
download.file(
glue::glue("https://raw.githubusercontent.com/nmfs-ost/workflows-workshop/nefsc-transition/resources/ExportLegacyNEFSCtoASARproject/testStocks/{i}"),
glue::glue("{testStocks_folder}/{i}"),
mode = "wb"
)
}

for (i in asarreport_files) {
cli::cli_alert_info("📥 Downloading {i}...")
download.file(
glue::glue("https://raw.githubusercontent.com/nmfs-ost/workflows-workshop/nefsc-transition/resources/ExportLegacyNEFSCtoASARproject/ASARreportFiles/{i}"),
glue::glue("{asarreport_folder}/{i}"),
mode = "wb"
)
}

message("✅ Download complete.")
}
get_nefsc_files(getwd())
```

The following steps will guide you through how to adapt the {asar} workflow and template and migrate the current content in your documents to the new ones:

1. Change paths in TestMoreStocksReportOnly.R and source it (run all the code in the file).

2. Copy the 3 files in ASARreportFiles and paste them into the report directory made by step 1 (and overwrite).

```{r}
#| eval: false
file.copy(
from = list.files(file.path(getwd(), "ExportLegacyNEFSCtoASARproject", "ASARreportFiles"), full.names = TRUE),
to = file.path(getwd(), "report"),
recursive = FALSE,
overwrite = TRUE
)
```

3. Move in-header.tex to report/support_files and overwrite (this just adds the LaTeX package {float})

```{r}
#| eval: false
fs::file_move(
file.path(getwd(), "report", "in-header.tex"),
file.path(getwd(), "report", "support_files", "in-header.tex")
)
```

4. Change paths at the top of report/preamble.R.

* For the third line (starts with `load`), the example rda file ("Black_Sea_Bass2024.rda") will probably be in your working directory.

5. Add the following code to the yaml in the skeleton.qmd (probably named "sar_N_Black_Sea_Bass_skeleton.qmd):

```
execute:
echo: false
message: false
warning: false
```

6. From the skeleton, delete lines 70-75 (before step 5, lines 66-71) and *render*.

```
# load converted output from stockplotr::convert_output()
load(fname)
# Call reference points and quantities below
output <- out_new |>
dplyr::mutate(estimate = as.numeric(estimate),
uncertainty = as.numeric(uncertainty))
```
5 changes: 5 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
project:
type: website
render:
- "*.qmd" # Render all qmd files in the root
- "!resources/ExportLegacyNEFSCtoASARproject" # Exclude this folder from rendering

website:
page-navigation: true
Expand Down Expand Up @@ -48,6 +51,8 @@ website:
text: "Day 3: stockplotr + asar"
- href: Curriculum/nsaw.qmd
text: "NSAW workshop"
- href: resources/regional_info.qmd
text: "Regionally-specific content"


format:
Expand Down
20 changes: 20 additions & 0 deletions agenda.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ format: html

## Day 2

(See @sec-nefsc for the NEFSC Workshop adjustment)

| Time | Topic |
|-----------|---------------------------|
| 0:00-0:15 |[ Introduction & Icebreaker](https://nmfs-ost.github.io/workflows-workshop/Curriculum/Day_2/day_2.html#introduction) |
Expand Down Expand Up @@ -51,3 +53,21 @@ format: html
| 2:15-2:40 | [Creating accessible documents](https://nmfs-ost.github.io/workflows-workshop/Curriculum/Day_3/day_3.html#sec-a11y) |
| 2:40-2:50 | [Preparing for the Future](https://nmfs-ost.github.io/workflows-workshop/Curriculum/Day_3/day_3.html#sec-future) |
| 2:50-3:00 | [Final remarks and questions](https://nmfs-ost.github.io/workflows-workshop/Curriculum/Day_3/day_3.html#questions-comments-feedback-and-closing) |


# NEFSC Day 2 {#sec-nefsc}

| Time | Topic |
|-----------|---------------------------|
| 0:00-0:15 |[ Introduction & Icebreaker](https://nmfs-ost.github.io/workflows-workshop/Curriculum/Day_2/day_2.html#introduction) |
| 0:15-0:35 | [{asar}: installation and overview](https://nmfs-ost.github.io/workflows-workshop/Curriculum/Day_2/day_2.html#installation) |
| 0:35-1:05 | [asar::create_template()](https://nmfs-ost.github.io/workflows-workshop/Curriculum/Day_2/day_2.html#asarcreate_template) |
| **1:05-1:20** | **Break** |
| 1:20-1:30 | [Mid-session icebreaker](https://docs.google.com/document/d/1nVlmmZgp8vCHZKCMHnBm43bf-mtk7pSA1t2FLHEoyZA/edit?tab=t.0#heading=h.lwix6dbx3lr8) |
| 1:30-1:45 | [stockplotr::convert_output()](https://nmfs-ost.github.io/workflows-workshop/Curriculum/Day_2/day_2.html#stockplotrconvert_output) |
| 1:45-2:05 | [Advanced workflow](https://nmfs-ost.github.io/workflows-workshop/Curriculum/Day_2/day_2.html#advanced-asar-workflow) |
| **2:05-2:20** | **Break for questions** |
| 2:20-2:25 | [Mid-session icebreaker](https://docs.google.com/document/d/1nVlmmZgp8vCHZKCMHnBm43bf-mtk7pSA1t2FLHEoyZA/edit?tab=t.0#heading=h.lwix6dbx3lr8) |
| 2:25-2:45 | [Adaptation of NEFSC Template](https://nmfs-ost.github.io/workflows-workshop/Curriculum/Day_2/day_2.html#adaptation-of-nefsc-template-to-asar) |
| 2:45-2:55 | [Standard Guidelines Discussion](https://nmfs-ost.github.io/workflows-workshop/Curriculum/Day_2/day_2.html#noaa-standard-assessment-report-guidelines) |
| 2:55-3:00 | [Wrap-up](https://nmfs-ost.github.io/workflows-workshop/Curriculum/Day_2/day_2.html#summary-10-mins) |
Loading