Skip to content

Commit 47a840b

Browse files
Dev (#456)
* Small change to make new dev branch * Remove Regional Workflows vignette * Replace bib entries from sa4ss with updated entries from https://github.com/pfmc-assessments/yellowtail_2025/blob/main/report/yellowtail.bib, while keeping the asar and NEFSC references * Revert "Replace bib entries from sa4ss with updated entries from https://github.com/pfmc-assessments/yellowtail_2025/blob/main/report/yellowtail.bib, while keeping the asar and NEFSC references" This reverts commit 2952d6f. * Shorten glossary labels by subbing FSC acronyms in for full names (#448) * Shorten glossary labels by subbing FSC acronyms in for full names * Add guidance to glossary about how to search for survey names * Add nefsc glossary entries (#454) * Update FAQs vignette with questions about making reports without model results converted with stockplotr * Add entries from CRDabbreviatedlocales.tex * Add terms from NEFSC's glossary as per #438 * Vignettes to articles (#453) * Replace old bib file entries with those in https://github.com/pfmc-assessments/yellowtail_2025/blob/main/report/yellowtail.bib, except for asar citation and NEFSC's citations (as per this comment: pfmc-assessments/yellowtail_2025#12 (comment)) (#449) * Replace bib entries from sa4ss with updated entries from https://github.com/pfmc-assessments/yellowtail_2025/blob/main/report/yellowtail.bib, while keeping the asar and NEFSC references * Create quarto-based articles for FAQ and custom figures/tables vignettes, and erase those vignettes, to allow for better navigability on website, as per #316 * Create quarto-based articles for example reports and alt workflows vignettes, and erase those vignettes * Remove unnecessary article-related files made by rendering locally * update WORDLIST * adjust create_yaml example to remove warning * Update skeleton labels (#459) * Update FAQs vignette with questions about making reports without model results converted with stockplotr * remove faqs.Rmd * Change skeleton chunk labels for clarity: doc_parameters → R_parameters and output_and_quantities → preamble * Update readme with project/milestone status (#458) * Update FAQs vignette with questions about making reports without model results converted with stockplotr * remove faqs.Rmd * Update readme with project/milestone status * remove r4ss as dependency * add bootstrap 5 per error rec --------- Co-authored-by: sbreitbart-NOAA <sophie.breitbart@noaa.gov>
1 parent abaca81 commit 47a840b

24 files changed

Lines changed: 552 additions & 189 deletions

.Rbuildignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@
1414
^\.octocov\.yml$
1515
^\.devcontainer$
1616
^CODE_OF_CONDUCT\.md$
17+
^vignettes/articles/\.quarto$
18+
^vignettes/articles/*_files$
19+
^vignettes/articles$

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ Meta
2020
report
2121
spp_conout.csv
2222
ASAR.Rproj
23+
**/.quarto/

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ Suggests:
5454
VignetteBuilder:
5555
knitr
5656
Remotes:
57-
nmfs-ost/stockplotr,
58-
r4ss/r4ss
57+
nmfs-ost/stockplotr
5958
Config/testthat/edition: 3
6059
Config/testthat/parallel: false
6160
Encoding: UTF-8
6261
Language: en-US
6362
LazyData: true
6463
Roxygen: list(markdown = TRUE)
6564
RoxygenNote: 7.3.3
65+
Config/Needs/website: quarto

R/create_template.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -721,8 +721,8 @@ create_template <- function(
721721

722722
##### Params chunk ----
723723
if (rerender_skeleton) {
724-
params_chunk_start <- grep("doc_parameters", prev_skeleton) - 1
725-
if (!any(grepl("doc_parameters", prev_skeleton)) & parameters) {
724+
params_chunk_start <- grep("R_parameters", prev_skeleton) - 1
725+
if (!any(grepl("R_parameters", prev_skeleton)) & parameters) {
726726
params_chunk <- add_chunk(
727727
paste0(
728728
"# Parameters \n",
@@ -744,7 +744,7 @@ create_template <- function(
744744
)
745745
}
746746
),
747-
label = "doc_parameters"
747+
label = "R_parameters"
748748
)
749749
} else if (parameters) {
750750
params_chunk_end <- grep("```", prev_skeleton)[which(grep("```", prev_skeleton) > params_chunk_start)][1]
@@ -790,7 +790,7 @@ create_template <- function(
790790
)
791791
}
792792
),
793-
label = "doc_parameters"
793+
label = "R_parameters"
794794
)
795795
}
796796
params_chunk <- add_chunk(
@@ -814,7 +814,7 @@ create_template <- function(
814814
)
815815
}
816816
),
817-
label = "doc_parameters"
817+
label = "R_parameters"
818818
)
819819

820820
##### Preamble ----
@@ -884,7 +884,7 @@ create_template <- function(
884884
"h # steepness\n",
885885
"R0 # recruitment\n"
886886
),
887-
label = "output_and_quantities",
887+
label = "preamble",
888888
chunk_option = c("warning: false", ifelse(is.null(model_results), "eval: false", "eval: true"), "include: false")
889889
)
890890

@@ -897,7 +897,7 @@ create_template <- function(
897897
question1 <- "n"
898898
}
899899
if (regexpr(question1, "n", ignore.case = TRUE) == 1) {
900-
start_line <- grep("output_and_quantities", prev_skeleton) - 1
900+
start_line <- grep("preamble", prev_skeleton) - 1
901901
# find next trailing "```"` in case it was edited at the end
902902
end_line <- grep("```", prev_skeleton)[grep("```", prev_skeleton) > start_line][1]
903903
# preamble <- paste(prev_skeleton[start_line:end_line], collapse = "\n")

R/create_yaml.R

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,21 @@
2323
#'
2424
#' @examples
2525
#' \dontrun{
26+
#' my_author_list <- paste(
27+
#' " - name: 'Patrick Star'",
28+
#' " affiliations:",
29+
#' " - name: 'NOAA Fisheries Southeast Fisheries Science Center'",
30+
#' " address: '75 Virginia Beach Drive'",
31+
#' " city: 'Miami'",
32+
#' " state: 'FL'",
33+
#' " postal-code: '33149'"
34+
#' sep = "\n"
35+
#' )
2636
#' create_yaml(
2737
#' rerender_skeleton = FALSE,
2838
#' prev_skeleton = NULL,
2939
#' title = "My title",
30-
#' author_list = " - name: 'Patrick Star'\n affiliations:\n - name: 'NOAA Fisheries Southeast Fisheries Science Center'\n address: '75 Virginia Beach Drive'\n city: 'Miami'\n state: 'FL'\n postal-code: '33149'\n",
40+
#' author_list = my_author_list,
3141
#' author = c("Patrick Star" = "SEFSC"),
3242
#' office = "SEFSC",
3343
#' add_author = NULL,

R/export_glossary.R

Lines changed: 78 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ export_glossary <- function() {
5252
Shared_mean = duplicated(meaning_lower)
5353
)
5454

55-
# min length of consolidated acronyms: ~818
56-
# length(unique(acronyms$Acronym))
57-
5855
# for a given acronym: if there is a row with an identical acronym,
5956
# and there is a row with an identical meaning_lower, and at least one
6057
# row has a definition, then keep the row with the definition
@@ -117,7 +114,8 @@ export_glossary <- function() {
117114
!Meaning %in% c(
118115
"Biomass (in either weight or other appropriate unit)",
119116
"Biomass at maximum sustainable yield",
120-
"Biomass at MSY"
117+
"Biomass at MSY",
118+
"Northwest Atlantic Fisheries Organization viii"
121119
),
122120
!Acronym %in% "BMSY (B sub MSY)"
123121
) |>
@@ -142,6 +140,7 @@ export_glossary <- function() {
142140
"Ecosystem-based fishery management",
143141
"East Pacific Ocean",
144142
"Division of Fish and Wildlife, Northern Mariana Islands",
143+
"Groundfish Assessment Review Committee",
145144
"A measure of the instantaneous rate of fishing mortality",
146145
"instantaneous rate of fishing mortality",
147146
"Mortality due to fishing",
@@ -220,7 +219,8 @@ export_glossary <- function() {
220219
"BO",
221220
"DAR",
222221
"ITA",
223-
"NS#"
222+
"NS#",
223+
"CTLISTS"
224224
),
225225
!(is.na(Definition) & Meaning == "Marine Recreational Fishing Statistical Survey"),
226226
!(is.na(Definition) & Acronym == "P*"),
@@ -243,6 +243,13 @@ export_glossary <- function() {
243243
"Ecological and Socioeconomic Profile",
244244
"Ecosystem and Socioeconomic Profile"
245245
)
246+
) |> # correct acronym
247+
dplyr::mutate(
248+
Acronym = dplyr::if_else(
249+
Acronym == "CC" & Meaning == "Connecticut",
250+
"CT",
251+
Acronym
252+
)
246253
) |>
247254
dplyr::filter(!Definition %in% "An advisory committee of the PFMC made up of scientists and economists. The Magnuson-Stevens Act requires that each council maintain an SSC to assist in gathering and analyzing statistical, biological, ecological, economic, social, and other scientific information that is relevant to the management of Council fisheries.") |>
248255
# recreate meaning_lower after updates
@@ -326,7 +333,31 @@ export_glossary <- function() {
326333
"SBA",
327334
"Secretary",
328335
"SSB",
329-
"STT"
336+
"STT",
337+
"BLSPR",
338+
"BSB",
339+
"EXL",
340+
"Fbar5:7",
341+
"Fbar7:8",
342+
"FLSPR",
343+
"FLXSPR",
344+
"FXL",
345+
"FXLMSP",
346+
"FXLSPR",
347+
"FXX",
348+
"MNKN",
349+
"MNKS",
350+
"OPTUNIT",
351+
"OQUNIT",
352+
"PLA",
353+
"Q",
354+
"REDUNIT",
355+
"SBpr",
356+
"SBXL",
357+
"SCUNIT",
358+
"SPRLX",
359+
"SSBpr",
360+
"ssbratio"
330361
),
331362
!(source == "PFMC" & Acronym == "ABC"),
332363
!(source == "SAFMC" & Acronym == "ALS"),
@@ -510,7 +541,8 @@ export_glossary <- function() {
510541
Meaning = ifelse(Meaning == "Optimum sustainable production, Oregon State Police", "optimum sustainable production", Meaning),
511542
Meaning = ifelse(Meaning == "Spawning Abundance at MSY", "spawning abundance at MSY", Meaning),
512543
Meaning = ifelse(Meaning == "Spawning Stock Biomass at MSY", "spawning stock biomass at MSY", Meaning),
513-
Meaning = ifelse(Acronym == "R", "Programming environment for statistical processing and presentation", Meaning)
544+
Meaning = ifelse(Acronym == "R", "Programming environment for statistical processing and presentation", Meaning),
545+
Meaning = ifelse(Acronym == "GARM", "Groundfish Assessment Review Meeting", Meaning)
514546
) |>
515547
# add periods to end of Definition
516548
dplyr::mutate(
@@ -644,7 +676,26 @@ export_glossary <- function() {
644676
!(Meaning == "CalCOFI_Spring" & Acronym == "CS"),
645677
!(Meaning == "Northern CalCOFI" & Acronym == "NC"),
646678
!(is.na(Definition) & Acronym == "SEAMAP"),
647-
!(Meaning == "Connecticut Long Island Sound Trawl Survey" & Label == "ct lists")
679+
!(Meaning == "Connecticut Long Island Sound Trawl Survey" & Label == "ct lists"),
680+
!(Meaning == "autoregressive model" & Label == "ar"),
681+
!(Meaning == "biomass" & Label == "bm"),
682+
!(Meaning == "centimeters, fish length" & Label == "cm"),
683+
!(Meaning == "fishing mortality at 50% of msy" & Label == "fl"),
684+
!(Meaning == "operational assessment, biennial" & Label == "oa"),
685+
!(Meaning == "Portable Document Format" & Label == "pdf"),
686+
!(Meaning == "Quantitative Ecology and Socioeconomics Training" & Label == "qus"),
687+
!(Meaning == "subarea (nafo)" & Label == "sa"),
688+
!(Meaning == "School for Marine Science and Technology" & Label == "smast"),
689+
!(Meaning == "Transboundary Resources Assessment Committee" & is.na(Definition)),
690+
!(Meaning == "Univ. of Rhode Island, GSO" & Label == "uri"),
691+
!(Meaning == "young of the year or age 0" & Label == "yoy"),
692+
!(Label == "msyxl"),
693+
!(Label == "msypr"),
694+
!(Label == "msyxl"),
695+
!(Label == "sbmsypr"),
696+
!(Label == "ssbmsypr"),
697+
!(Label == "ssbxl"),
698+
!(Label == "sbxl")
648699
) |>
649700
# add backslash to escape special characters
650701
# (underscores, ampersands) when rendering tex file
@@ -672,7 +723,15 @@ export_glossary <- function() {
672723
Label,
673724
"[\\(\\)]",
674725
"-"
675-
))
726+
)) |>
727+
# make labels shorter by subbing FSCs acronyms
728+
dplyr::mutate(
729+
Label = gsub("alaska fisheries science center", "afsc", Label, ignore.case = TRUE),
730+
Label = gsub("northeast fisheries science center", "nefsc", Label, ignore.case = TRUE),
731+
Label = gsub("northwest fisheries science center", "nwfsc", Label, ignore.case = TRUE),
732+
Label = gsub("pacific islands fisheries science center", "pifsc", Label, ignore.case = TRUE),
733+
Label = gsub("southeast fisheries science center", "sefsc", Label, ignore.case = TRUE),
734+
Label = gsub("southwest fisheries science center", "swfsc", Label, ignore.case = TRUE))
676735

677736
duplicate_acronyms <- unique_all_cleaning3 |>
678737
dplyr::add_count(Acronym) |>
@@ -784,6 +843,15 @@ export_glossary <- function() {
784843
) |>
785844
dplyr::arrange(tolower(Label))
786845

846+
cat(paste0(
847+
"% NOTE ON SURVEYS:\n",
848+
"% To increase findability, surveys may have multiple entries to link informal with formal names.\n",
849+
"% Specifically, there may be more than one 'label' (first curly braces entry) or 'acronym' (second curly braces entry) with the same 'long form' (third curly braces entry).\n",
850+
"% If the first 'label' you find for a given survey seems too long, look for an alternative entry with the same 'long form' but a different 'label' and/or 'acronym'.\n",
851+
"% For example, there are three entries for the 'long form' 'Northeast Ecosystem Monitoring (EcoMon)\\_Fall':\n\n",
852+
"% \\newacronym{ecomon fall}{ECOMON Fall}{Northeast Ecosystem Monitoring (EcoMon)\\_Fall}\n",
853+
"% \\newacronym{fall nefsc ecosystem monitoring survey}{Fall Northeast Fisheries Science Center Ecosystem Monitoring Survey}{Northeast Ecosystem Monitoring (EcoMon)\\_Fall}\n",
854+
"% \\newacronym{nemef}{NEMEF}{Northeast Ecosystem Monitoring (EcoMon)\\_Fall}\n\n"))
787855

788856
for (i in 1:dim(tex_acs)[1]) {
789857
cat(
@@ -801,3 +869,4 @@ export_glossary <- function() {
801869
}
802870
sink()
803871
}
872+

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Download using the directions below and fill in `create_template.R` function wit
99
the desired parameters (follow example below) to create a template Quarto document
1010
to be rendered to create a stock assessment report.
1111

12-
The goal of ASAR is to automate stock assessment reports for NOAA science centers
12+
The goal of `asar` is to automate stock assessment reports for NOAA science centers
1313
so they are reproducible and cohesive across the agency. This project intends
1414
to create a streamlined workflow that allows the analyst to create a customized
1515
report tailored to their needs and requirements by the SSC, council, or other
@@ -135,6 +135,10 @@ Have you identified any suggestions for improvement, bugs, or questions? Please
135135

136136
Thank you for helping us improve this package!
137137

138+
## Progress, Goals, & Timeline
139+
140+
What are we working on? When do we aim to complete it? What have we accomplished? Check out our [GitHub Project Board](https://github.com/orgs/nmfs-ost/projects/44/) and [Milestones](https://github.com/nmfs-ost/asar/milestones) to see the package development status and our goals for the next few months.
141+
138142
## Tips
139143

140144
If you have additional questions, there is a helpful Q&A guide available in the

inst/WORDLIST

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
AFSC
2-
APA
32
Arial
43
BAM
54
Blackspotted
@@ -10,12 +9,9 @@ CTAN
109
Calibri
1110
Caltabellotta
1211
Canelón
13-
cjfas
1412
Coates
15-
csl
1613
DocumentMetadata
1714
Drs
18-
ewide
1915
Fabio
2016
Flextable
2117
Gertseva
@@ -40,31 +36,32 @@ Pomatomus
4036
Quillback
4137
README
4238
RStudio
39+
RTF
4340
Rmarkdown
4441
Rockfish
4542
Rockfishes
4643
Rosemond
4744
Rougheye
48-
RTF
4945
SBPR
5046
SEFSC
5147
SSC
5248
SWA
5349
SWFSC
5450
Strikethrough
55-
tabset
56-
TLDR
5751
TOC
5852
TinyTeX
5953
Vladlena
6054
asis
6155
bcurrent
6256
blockquote
57+
cjfas
6358
conf
59+
csl
6460
csv
6561
documentclass
6662
docx
6763
ect
64+
ewide
6865
flextable
6966
flextables
7067
frac
@@ -77,12 +74,12 @@ kobe
7774
labelled
7875
le
7976
modularized
80-
msy
8177
multispecies
8278
nmfs
8379
noaa
8480
ost
8581
overline
82+
pagebreak
8683
params
8784
petrale
8885
png
@@ -103,6 +100,7 @@ socio
103100
sso
104101
stockplotr
105102
subfiles
103+
tabset
106104
taggable
107105
tagpdf
108106
tbl

0 commit comments

Comments
 (0)