diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1ccdb03c..f519e60e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -13,7 +13,7 @@ "packages": "qpdf" }, "ghcr.io/rocker-org/devcontainer-features/r-packages:1": { - "packages": "usethis,pak,qpdf,cli,flextable,forstringr,fs,naniar,officer,pdftools,prodlim,svDialogs,tidyselect,tinytex", + "packages": "usethis,pak,qpdf,cli,gt,forstringr,fs,naniar,officer,pdftools,prodlim,svDialogs,tidyselect,tinytex", "installSystemRequirements": true }, // option to run rstudio. you can type rserver into the command line to diff --git a/.github/workflows/new-version-checklist.yml b/.github/workflows/new-version-checklist.yml index bd30e848..7c0cdce4 100644 --- a/.github/workflows/new-version-checklist.yml +++ b/.github/workflows/new-version-checklist.yml @@ -4,6 +4,7 @@ name: new-version-checklist on: pull_request: branches: [main] + types: [opened] workflow_dispatch: jobs: new-version-checklist: diff --git a/DESCRIPTION b/DESCRIPTION index c4f4f8d5..ea2d70fd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: asar Title: Build NOAA Stock Assessment Report -Version: 2.0.2 +Version: 2.0.3 Authors@R: c( person("Samantha", "Schiano", , "samantha.schiano@noaa.gov", role = c("aut", "cre"), comment = c(ORCID = "0009-0003-3744-6428")), @@ -25,12 +25,11 @@ Imports: cli, data.table, dplyr, - flextable, forstringr, fs, glue, + gt, naniar, - officer, purrr, stats, stringi, @@ -42,7 +41,6 @@ Imports: utils Suggests: ggplot2, - gt, kableExtra, knitr, parallel, diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 8c0df26d..00000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Schiano-NOAA - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/NAMESPACE b/NAMESPACE index 6f069d1d..983ccd34 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,6 @@ # Generated by roxygen2: do not edit by hand +export(ID_tbl_length_class) export(ID_tbl_width_class) export(add_accessibility) export(add_alttext) @@ -19,4 +20,5 @@ export(create_titlepage_tex) export(create_yaml) export(export_split_tbls) export(format_quarto) +export(gt_split) export(render_lg_table) diff --git a/R/ID_tbl_length_class.R b/R/ID_tbl_length_class.R new file mode 100644 index 00000000..303cb08d --- /dev/null +++ b/R/ID_tbl_length_class.R @@ -0,0 +1,47 @@ +#' Identify table length class +#' +#' @inheritParams render_lg_table +#' +#' @return The length class of a table: regular or long. The result +#' will determine whether the table can be rendered on a page +#' as-is, or if it needs to be split across multiple pages. +#' @export +#' +#' @examples +#' \dontrun{ +#' ID_tbl_length_class( +#' plot_name = "indices.abundance_table.rda", +#' tables_dir = here::here() +#' ) +#' } +ID_tbl_length_class <- function( + tables_dir, + plot_name +) { + tables_path <- fs::path( + tables_dir, + "tables", + paste0(plot_name, "_table.rda") + ) + + if (file.exists(tables_path)) { + load(tables_path) + table_rda <- rda + rm(rda) + gt_table <- table_rda$table + + # Get table length in rows + table_length <- nrow(gt_table[["_data"]]) + + # determine table length class + if (table_length <= 38) { + length_class <- "regular" # fit on one landscape page (and, by default, portrait) + } else { + length_class <- "long" # divided across >1 landscape page + } + } else { + cli::cli_abort(message = "Table not found at {tables_path}") + } + + length_class +} diff --git a/R/ID_tbl_width_class.R b/R/ID_tbl_width_class.R index 07b6238d..9e83d3c0 100644 --- a/R/ID_tbl_width_class.R +++ b/R/ID_tbl_width_class.R @@ -7,7 +7,7 @@ #' be resized, rotated, and/or split across multiple pages. #' #' @return The width class of a table: regular, wide, or extra-wide. The result -#' will determine whether the table that can be rendered on a portrait page +#' will determine whether the table can be rendered on a portrait page #' as-is, or if it needs to be resized, rotated, and/or split across multiple pages. #' @export #' @@ -34,9 +34,14 @@ ID_tbl_width_class <- function( load(tables_path) table_rda <- rda rm(rda) - table_width <- flextable::flextable_dim(table_rda$table)[["widths"]] |> - as.numeric() + gt_table <- table_rda$table + # Set each col to 1.5" + col_inches <- 1.5 + + # Calculate total table width in inches + table_width <- ncol(gt_table[["_data"]]) * col_inches + # determine table width class if (table_width <= portrait_pg_width) { width_class <- "regular" diff --git a/R/add_child.R b/R/add_child.R index 31ba9fa5..7e03bcce 100644 --- a/R/add_child.R +++ b/R/add_child.R @@ -28,6 +28,10 @@ add_child <- function(x, "#| warning: false", "\n", "a <- knitr::knit_child(", "'", sec_num, "'", ", quiet = TRUE)", "\n", "cat(a, sep = '\\n')", "\n", + # ifelse checks for the 'tables' label and injects the extra code/comment + ifelse(label[i] == "tables", + "# Force LaTeX to render all floating tables before moving to the next section\ncat('\\n\\\\clearpage\\n')\n", + ""), "```", "\n" ) child <- paste(child, child_loop, sep = "\n {{< pagebreak >}} \n") diff --git a/R/asar-package.R b/R/asar-package.R index ee23b68a..16039ed9 100644 --- a/R/asar-package.R +++ b/R/asar-package.R @@ -17,6 +17,6 @@ globvar <- c( "row_rescale", "table_list", "read.csv", "All", "x", "Acronym", "Meaning", "meaning_lower", "Definition", "n", "Label", "figures_doc_header", "X", "len_bins", "area", "match_key", "uncertainty_label", - "word_count", "ac_short" + "word_count", "ac_short", "column_label" ) if (getRversion() >= "2.15.1") utils::globalVariables(globvar) diff --git a/R/create_tables_doc.R b/R/create_tables_doc.R index 9e78926d..95723daf 100644 --- a/R/create_tables_doc.R +++ b/R/create_tables_doc.R @@ -77,7 +77,7 @@ create_tables_doc <- function(subdir = getwd(), tables_doc_setup <- paste0( add_chunk( glue::glue( - "library(flextable) + "library(gt) tables_dir <- fs::path('{tables_dir}', 'tables')" ), label = "set-rda-dir-tbls", @@ -122,15 +122,42 @@ create_tables_doc <- function(subdir = getwd(), ) # identify table orientation - # split tables will always be extra_wide + # split tables will always be extra-wide tbl_orient <- ifelse(split, - "extra_wide", + "extra-wide", ID_tbl_width_class( plot_name = tab_shortname, tables_dir = tables_dir, portrait_pg_width = portrait_pg_width ) ) + + # identify table length: regular (1 landscape page) or long (>1 landscape page) + tbl_length <- ID_tbl_length_class( + plot_name = tab_shortname, + tables_dir = tables_dir + ) + + table_specs <- list(tbl_orient, tbl_length) + + tbl_class <- dplyr::case_when( + table_specs[[1]] == "regular" & table_specs[[2]] == "regular" ~ "reg_reg", # 38 rows / portrait + table_specs[[1]] == "regular" & table_specs[[2]] == "long" ~ "reg_long", # 38 rows, split / portrait + table_specs[[1]] == "wide" & table_specs[[2]] == "regular" ~ "wide_reg", # 28 rows / landscape + table_specs[[1]] == "wide" & table_specs[[2]] == "long" ~ "wide_long", # 28 rows, split / landscape + table_specs[[1]] == "extra-wide" & table_specs[[2]] == "regular" ~ "ewide_reg", # 28 rows, split / landscape + table_specs[[1]] == "extra-wide" & table_specs[[2]] == "long" ~ "ewide_long", # 28 rows, split / landscape + TRUE ~ "unknown" + ) + + if (tbl_class == "unknown"){ + cli::cli_abort("Unknown table class. Check table is an acceptable `gt` table.") + } + + # set max number of rows per table based on orientation + max_rows <- ifelse(tbl_orient == "regular", + 38, # max rows for portrait + 28) # max rows for landscape ## import table, caption ## do this for all tables @@ -150,11 +177,15 @@ load(file.path(tables_dir, '", stringr::str_remove(tab, "_split"), "'))\n "\n" ) - ## add table if it only requires one chunk - if (tbl_orient == "regular") { + ## add table if it is intact on a portrait page + if (tbl_class == "reg_reg") { tables_doc_plot_setup2 <- paste0( add_chunk( - glue::glue("{tab_shortname}_table"), + glue::glue("{tab_shortname}_table |>\n", + " gt::cols_width(\n", + " everything() ~ pct(20)\n", + " ) \n" + ), label = glue::glue("tbl-{tab_shortname}"), # add_option = TRUE, chunk_option = c( @@ -162,21 +193,29 @@ load(file.path(tables_dir, '", stringr::str_remove(tab, "_split"), "'))\n "warnings: false", glue::glue( "tbl-cap: !expr {tab_shortname}_cap" - ) + ), + "tbl-pos: 't'" ) ), "\n" ) } - - if (tbl_orient == "wide") { + + ## add table if it is intact, rotated on a landscape page + if (tbl_class == "wide_reg") { tables_doc_plot_setup2 <- paste0( # add landscape braces before R chunk "::: {.landscape}\n\n", add_chunk( glue::glue( - "{tab_shortname}_table |> - flextable::fit_to_width(max_width = 8)" + "{tab_shortname}_table |>\n", + " gt::tab_options(\n", + " table.width = pct(100),\n", + " table.layout = 'auto'\n", + " ) |>\n", + " gt::cols_width(\n", + " everything() ~ pct(20)\n", + " ) \n" ), label = glue::glue("tbl-{tab_shortname}"), # add_option = TRUE, @@ -185,7 +224,8 @@ load(file.path(tables_dir, '", stringr::str_remove(tab, "_split"), "'))\n "warnings: false", glue::glue( "tbl-cap: !expr {tab_shortname}_cap" - ) + ), + "tbl-pos: 't'" ) ), "\n", @@ -194,21 +234,80 @@ load(file.path(tables_dir, '", stringr::str_remove(tab, "_split"), "'))\n ) } - if (tbl_orient == "extra_wide") { + ## add table if it is long enough to be shown on >1 portrait ("reg_long") OR landscape ("wide_long") page + ### only differences: latter has landscape braces and narrower cols + if (tbl_class == "reg_long" | tbl_class == "wide_long") { + # identify number of tables in rda + load(fs::path(tables_dir, "tables", tab)) + # split_tables <- length(table_list) + # identify number of tables that each split table must be further split + # into, with different rows per table + split_table_rows <- length(rda[[1]]$`_data`[[1]]) + split_tables_rowwise <- ceiling(split_table_rows/max_rows) + + # prepare text for chunk that will display split tables + tables_doc_plot_setup2 <- "" + for (i in 1:as.numeric(split_tables_rowwise)) { + # add a chunk for each table + tables_doc_plot_setup2 <- paste0( + tables_doc_plot_setup2, + # add landscape braces before R chunk if tbl_class == "wide_long" + ifelse(tbl_class == "wide_long", + "::: {.landscape}\n\n", + ""), + add_chunk( + paste0( + "# plot table ", i, "\n", + tab_shortname, "_table |>\n", + " gt::tab_options(\n", + " table.width = pct(100),\n", + " table.layout = 'auto'\n", + " ) |>\n", + " gt::cols_width(\n", + " everything() ~ pct(20)\n", + " ) |> \n", + " asar::gt_split(row_every_n = ", max_rows, ") |>\n", + " gt::grp_pull(", i, ")\n" + ), + label = glue::glue("tbl-{tab_shortname}", i), + add_option = TRUE, + chunk_option = c( + "echo: false", + glue::glue( + "tbl-cap: !expr paste0({tab_shortname}_cap, ' ({i} of {split_tables_rowwise})')" + ), + "tbl-pos: 't'" + ) + ), + # add landscape braces after R chunk if tbl_class == "wide_long" + ifelse(tbl_class == "wide_long", + ":::\n", + "\n") + ) + } + } + + ## add table if it is wide enough to be rotated and shown on >1 landscape + if (tbl_class == "ewide_reg") { if (split) { # identify number of split tables load(fs::path(tables_dir, "tables", tab)) split_tables <- length(table_list) } else { - # split extra_wide tables into smaller tables and export AND + # split extra-wide tables into smaller tables and export AND # identify number of split tables IF not already split split_tables <- export_split_tbls( tables_dir = tables_dir, plot_name = tab, essential_columns = 1 ) + + # identify number of split tables + tab <- gsub("table", "table_split", tab) + load(fs::path(tables_dir, "tables", tab)) + split_tables <- length(table_list) } - + # add a chunk to import split tables tables_doc_plot_setup2_import <- paste0( add_chunk( @@ -240,15 +339,23 @@ load(file.path(tables_dir, '", stringr::str_remove(tab, "_split"), "'))\n add_chunk( paste0( "# plot split table ", i, "\n", - tab_shortname, "_table_split_rda[[", i, "]] |> flextable::fit_to_width(max_width = 8)\n" + tab_shortname, "_table_split_rda[[", i, "]] |>\n", + " gt::tab_options(\n", + " table.width = pct(100),\n", + " table.layout = 'auto'\n", + " ) |>\n", + " gt::cols_width(\n", + " everything() ~ pct(20)\n", + " ) \n" ), label = glue::glue("tbl-{tab_shortname}", i), add_option = TRUE, chunk_option = c( "echo: false", glue::glue( - "tbl-cap: !expr paste0({tab_shortname}_cap, '(', {tab_shortname}_cap_split[[", i, "]], ')')" - ) + "tbl-cap: !expr paste0({tab_shortname}_cap, ' ({i} of {split_tables})')" + ), + "tbl-pos: 't'" ) ), "\n", @@ -256,13 +363,104 @@ load(file.path(tables_dir, '", stringr::str_remove(tab, "_split"), "'))\n ":::\n" ) } - + tables_doc_plot_setup2 <- paste0( tables_doc_plot_setup2_import, tables_doc_plot_setup2_display ) } + + ## add table if it is wide and long enough to be rotated and split across >1 landscape pages + if (tbl_class == "ewide_long"){ + if (split) { + # identify number of split tables + load(fs::path(tables_dir, "tables", tab)) + split_tables <- length(table_list) + } else { + # split extra-wide tables into smaller tables and export AND + # identify number of split tables IF not already split + split_tables <- export_split_tbls( + tables_dir = tables_dir, + plot_name = tab, + essential_columns = 1 + ) + + # identify number of split tables + tab <- gsub("table", "table_split", tab) + load(fs::path(tables_dir, "tables", tab)) + split_tables <- length(table_list) + } + # identify number of tables that each split table must be further split + # into, with different rows per table + split_table_rows <- length(table_list[[1]]$`_data`[[1]]) + split_tables_rowwise <- ceiling(split_table_rows/max_rows) + # add a chunk to import split tables + tables_doc_plot_setup2_import <- paste0( + add_chunk( + paste0( + "load(file.path(tables_dir, '", tab, "'))\n +# save rda with plot-specific name\n", + tab_shortname, "_table_split_rda <- table_list\n +# extract table caption specifiers\n", + tab_shortname, "_cap_split <- names(", tab_shortname, "_table_split_rda)" + ), + label = glue::glue("tbl-{tab_shortname}-labels"), + # add_option = TRUE, + chunk_option = c( + "echo: false", + "warnings: false", + glue::glue("include: false") + ) + ), + "\n" + ) + # prepare text for chunk that will display split tables + tables_doc_plot_setup2_display <- "" + for (i in 1:as.numeric(split_tables)) { + for (j in 1:as.numeric(split_tables_rowwise)) { + # add a chunk for each table + tables_doc_plot_setup2_display <- paste0( + tables_doc_plot_setup2_display, + # add landscape braces before R chunk + "::: {.landscape}\n\n", + add_chunk( + paste0( + "# plot split table ", i, "\n", + tab_shortname, "_table_split_rda[[", i, "]] |>\n", + " gt::tab_options(\n", + " table.width = pct(100),\n", + " table.layout = 'auto'\n", + " ) |>\n", + " gt::cols_width(\n", + " everything() ~ pct(20)\n", + " ) |> \n", + " asar::gt_split(row_every_n = ", max_rows, ") |>\n", + " gt::grp_pull(", j, ")\n" + ), + label = glue::glue("tbl-{tab_shortname}", i, "-", j), + add_option = TRUE, + chunk_option = c( + "echo: false", + glue::glue( + "tbl-cap: !expr paste0({tab_shortname}_cap, ' ({i} of {split_tables} tables split by column, {j} of {split_tables_rowwise} tables split by rows)')" + ), + "tbl-pos: 't'" + ) + ), + "\n", + # add landscape braces after R chunk + ":::\n" + ) + } + } + + tables_doc_plot_setup2 <- paste0( + tables_doc_plot_setup2_import, + tables_doc_plot_setup2_display + ) + } + paste0( tables_doc_plot_setup1, tables_doc_plot_setup2 diff --git a/R/create_template.R b/R/create_template.R index 0bef0cb6..88581a4d 100644 --- a/R/create_template.R +++ b/R/create_template.R @@ -616,9 +616,9 @@ create_template <- function( subdir = subdir, tables_dir = tables_dir ) - } |> - suppressMessages() |> - suppressWarnings() + } # |> + # suppressMessages() |> + # suppressWarnings() } else { # extract name for tables.qmd from report folder tables_doc_name <- list.files(file_dir, pattern = "tables.qmd") @@ -890,13 +890,13 @@ create_template <- function( # extract old preamble if don't want to change if (rerender_skeleton) { - question1 <- readline("Do you want to keep the current preamble? (Y/N)") + question1 <- readline("Update the preamble to match entered arguments? (Y/N)") - # answer question1 as y if session isn't interactive + # answer question1 as n if session isn't interactive if (!interactive()) { - question1 <- "y" + question1 <- "n" } - if (regexpr(question1, "y", ignore.case = TRUE) == 1) { + if (regexpr(question1, "n", ignore.case = TRUE) == 1) { start_line <- grep("output_and_quantities", prev_skeleton) - 1 # find next trailing "```"` in case it was edited at the end end_line <- grep("```", prev_skeleton)[grep("```", prev_skeleton) > start_line][1] @@ -956,7 +956,7 @@ create_template <- function( cli::cli_alert_info("Model results not updated.") preamble <- paste(preamble, collapse = "\n") } - } else if (regexpr(question1, "n", ignore.case = TRUE) == 1) { + } else if (regexpr(question1, "y", ignore.case = TRUE) == 1) { cli::cli_alert_warning("Report template files were not copied into your directory.") cli::cli_alert_info("If you wish to update the template with new parameters or output files, please edit the {report_name} in your local folder.", wrap = TRUE diff --git a/R/export_glossary.R b/R/export_glossary.R index a4e342d0..882c0c66 100644 --- a/R/export_glossary.R +++ b/R/export_glossary.R @@ -237,6 +237,11 @@ export_glossary <- function() { Meaning, "National Standards Guidelines", "National Standard Guidelines" + ), + Meaning = stringr::str_replace( + Meaning, + "Ecological and Socioeconomic Profile", + "Ecosystem and Socioeconomic Profile" ) ) |> 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.") |> @@ -617,7 +622,7 @@ export_glossary <- function() { ) |> dplyr::ungroup() |> dplyr::select(-c(Acronym, word_count)) |> - dplyr::rename(Acronym = ac_short) + dplyr::rename(Acronym = ac_short) unique_all_cleaning3 <- unique_all_cleaning2 |> dplyr::mutate(Meaning = ifelse(Label %in% rows_to_lower, @@ -640,7 +645,28 @@ export_glossary <- function() { !(Meaning == "Northern CalCOFI" & Acronym == "NC"), !(is.na(Definition) & Acronym == "SEAMAP"), !(Meaning == "Connecticut Long Island Sound Trawl Survey" & Label == "ct lists") - ) + ) |> + # add backslash to escape special characters + # (underscores, ampersands) when rendering tex file + dplyr::mutate(Meaning = stringr::str_replace_all(Meaning, + "_", + "\\\\_") + ) |> + dplyr::mutate(Meaning = stringr::str_replace_all(Meaning, + "&", + "\\\\&") + ) |> + dplyr::mutate(Acronym = stringr::str_replace_all(Acronym, + "_", + "-") + ) |> + dplyr::mutate(Label = stringr::str_replace_all(Label, + "_", + "-") + ) |> + dplyr::mutate(Label = stringr::str_replace_all(Label, + "[\\(\\)]", + "-")) duplicate_acronyms <- unique_all_cleaning3 |> dplyr::add_count(Acronym) |> diff --git a/R/export_split_tbls.R b/R/export_split_tbls.R index ad28b228..922b153d 100644 --- a/R/export_split_tbls.R +++ b/R/export_split_tbls.R @@ -32,7 +32,7 @@ export_split_tbls <- function( # split tables and export render_lg_table( - report_flextable = table_rda$table, + report_gt = table_rda$table, essential_columns = essential_columns, tables_dir = tables_dir, plot_name = plot_name diff --git a/R/render_lg_table.R b/R/render_lg_table.R index f1aa622a..08568251 100644 --- a/R/render_lg_table.R +++ b/R/render_lg_table.R @@ -1,9 +1,9 @@ #' Split an extra-wide table into multiple tables #' -#' @param report_flextable The extra-wide flextable. +#' @param report_gt The extra-wide gt table. #' @param essential_columns The columns that will be retained between the split #' tables, formatted as a sequence (e.g., 1:2 for columns 1-2, or 1 for a single -#' column. Example: for the indices table, this could be the year column. +#' column). Example: for the indices table, this could be the year column. #' @param plot_name Name of the .rda file containing the table #' @inheritParams create_tables_doc #' @@ -14,174 +14,111 @@ #' @examples #' \dontrun{ #' render_lg_table( -#' report_flextable = indices_table, +#' report_gt = indices_table, #' essential_columns = 1, #' tables_dir = here::here(), #' plot_name = "indices.abundance_table.rda" #' ) #' #' render_lg_table( -#' report_flextable = important_table, +#' report_gt = important_table, #' essential_columns = 1:3, #' tables_dir = "data", #' plot_name = "bnc_table.rda" #' ) #' } -render_lg_table <- function(report_flextable, +render_lg_table <- function(report_gt, essential_columns, tables_dir, plot_name) { - # calculate key numbers - - # total columns, width of table - total_cols <- flextable::ncol_keys(report_flextable) - total_width <- flextable::flextable_dim(report_flextable)[["widths"]] - - # goal width of each table split from report_flextable, in inches - goal_width <- 7.5 # max is 8" - - # approx width of each column in report_flextable - approx_col_width <- total_width / total_cols - - # goal number of columns per table split from report_flextable - goal_cols_per_table <- ceiling(goal_width / approx_col_width) - - # split tables needed - num_tables <- ceiling(total_cols / goal_cols_per_table) - - # set up main df organizing split table information - table_cols <- matrix(NA, - nrow = num_tables, - ncol = 4 - ) |> - as.data.frame() |> - dplyr::rename( - "table" = 1, - "cols_to_keep" = 2, - "start_col" = 3, - "end_col" = 4 - ) - - i <- 1 - # TODO: add error improved error message - essential_cols <- essential_columns - for (i in 1:num_tables) { - # set table number to i - table_num <- i - - # add table number to df - table_cols$table[i] <- i - - # get first and last columns of new table - if (i == 1) { - init_col <- 1 - end_col <- init_col + goal_cols_per_table - } else if ((i < num_tables) & (init_col < total_cols)) { - # subtracting essential_cols so the first cols will be the essential ones - # and the total cols will still = goal_cols_per_table - end_col <- init_col + goal_cols_per_table - length(essential_cols) + + # Clean up essential_columns + is_empty_essentials <- is.null(essential_columns) || + length(essential_columns) == 0 || + (length(essential_columns) == 1 && essential_columns == "0") + + if (is_empty_essentials) { + essential_cols_cleaned <- character(0) + } else { + # If numeric (like 1:2), convert to actual column names to prevent index shifting errors + if (is.numeric(essential_columns)) { + essential_cols_cleaned <- colnames(report_gt[["_data"]])[essential_columns] } else { - end_col <- total_cols + essential_cols_cleaned <- essential_columns } - - table_cols$cols_to_keep[i] <- paste0(init_col, ":", end_col) - - table_cols$start_col[i] <- init_col - table_cols$end_col[i] <- end_col - - # add goal_cols_per_table for next table - init_col <- end_col + 1 - - # add 1 for next table - i <- i + 1 } - - # add col with essential cols - table_cols <- table_cols |> - dplyr::mutate( - essential_cols = paste(essential_cols, collapse = ", "), - - # find cols to delete - cols_to_del = apply(table_cols, 1, function(row) { - curr_range <- row["start_col"]:row["end_col"] - miss_nums <- setdiff(1:total_cols, curr_range) - paste(miss_nums, collapse = ", ") - }), - # make cols_to_delete and essential_cols into sequences - cols_to_del_seq = lapply(cols_to_del, function(x) as.numeric(unlist(strsplit(x, ",")))), - essential_cols_seq = lapply(essential_cols, function(x) as.numeric(unlist(strsplit(x, ",")))), - # find the final columns to delete by removing essential_cols from - # cols_to_delete - final_cols_to_del = mapply(function(seq1, seq2) { - paste(setdiff(seq1, seq2), collapse = ", ") - }, cols_to_del_seq, essential_cols_seq) - ) - - # print all split tables by removing final_cols_to_del from report_flextable - # for (i in 1:num_tables) { - # report_flextable |> - # flextable::delete_columns(j = c( - # as.numeric( - # unlist( - # strsplit( - # table_cols[i,"final_cols_to_del"], ",") - # ) - # ) - # ) - # ) |> - # print() - # } - - # save all tables to a list + + col_inches <- 1.5 + + # calculate key numbers + # total columns, width of table in inches + total_cols <- ncol(report_gt[["_data"]]) + total_width <- total_cols * col_inches + + # goal width of each table split from report_gt, in inches + goal_width <- 7.5 # max is 8" + + # goal number of columns per table split from report_gt + goal_cols_per_table <- ceiling(goal_width / col_inches) + + all_cols <- colnames(report_gt[["_data"]]) + moving_cols <- setdiff(all_cols, essential_cols_cleaned) + + total_slots <- floor(goal_width / col_inches) + + # Slots for non-essential columns + non_ess_slots <- max(1, total_slots - length(essential_cols_cleaned)) + + # Chunk the moving columns + col_chunks <- split(moving_cols, + ceiling(seq_along(moving_cols) / non_ess_slots)) + + # Loop through chunks and build tables table_list <- list() - for (i in 1:num_tables) { - split_table <- report_flextable |> - flextable::delete_columns(j = c( - as.numeric( - unlist( - strsplit( - table_cols[i, "final_cols_to_del"], "," - ) - ) - ) - )) |> - flextable::fit_to_width(max_width = goal_width) |> - flextable::hline( - part = "header", - # i = 1, - border = officer::fp_border( - width = 1.5, - color = "#666666" - ) + for (i in seq_along(col_chunks)) { + + current_keep <- c(essential_cols_cleaned, col_chunks[[i]]) + + # Create the gt objects + split_table <- report_gt |> + gt::cols_hide(columns = -dplyr::all_of(current_keep)) |> + gt::tab_options(table.width = gt::px(goal_width * 96)) |> + gt::tab_style( + style = gt::cell_borders(sides = "bottom", + color = "#666666", + weight = gt::px(1.5)), + locations = gt::cells_column_labels() ) |> - flextable::valign(valign = "center", part = "header") - + gt::tab_style( + style = gt::cell_text(v_align = "middle"), + locations = gt::cells_column_labels() + ) + + # Store table in list table_list[[i]] <- split_table - - # get rownames of split table - all_vals <- split_table$header$dataset - shown_vals <- c(split_table[["header"]][["content"]][["keys"]]) - split_tbl_vals <- all_vals |> - dplyr::select(dplyr::intersect( - names(all_vals), - shown_vals - )) |> - dplyr::slice(1) |> - dplyr::select_if(~ !(all(is.na(.)) | all(. == ""))) |> - as.character() |> - unique() |> - stringr::str_squish() |> - paste(collapse = ", ") - - # add rownames to table_list - names(table_list)[[i]] <- split_tbl_vals - - - # if(i == num_tables){ - # single_tab <- table_list[[returned_tab]] - # return(single_tab) - # } + + # Get labels for visible columns only + all_vals <- split_table[["_boxhead"]] + + if (!is.null(all_vals)) { + display_names <- all_vals |> + dplyr::filter(type != "hidden") |> + dplyr::pull(column_label) |> + as.character() |> + (\(x) x[!is.na(x) & x != ""])() |> + unique() |> + stringr::str_squish() |> + paste(collapse = ", ") + + # Assign name to list index + if (nchar(display_names) > 0) { + names(table_list)[i] <- display_names + } else { + names(table_list)[i] <- paste0("Table_Part_", i) + } + } } + # save table_list as rda save(table_list, file = fs::path( @@ -191,5 +128,5 @@ render_lg_table <- function(report_flextable, ) ) - num_tables + length(table_list) } diff --git a/R/utils.R b/R/utils.R index 2fe53687..6fe2c44c 100644 --- a/R/utils.R +++ b/R/utils.R @@ -158,3 +158,226 @@ SS3_extract_fleet <- function(dat, vers) { # create notin operator `%notin%` <- Negate(`%in%`) + +#---------------------------------------------------------- + +# gt_split() +#' Split a table into a group of tables (a `gt_group`) +#' +#' @description +#' +#' With a **gt** table, you can split it into multiple tables and get that +#' collection in a `gt_group` object. This function is useful for those cases +#' where you want to section up a table in a specific way and print those +#' smaller tables across multiple pages (in RTF and Word outputs, primarily via +#' \link[gt]{gtsave}, or, with breaks between them when the output context is HTML. +#' +#' @param data *The gt table data object* +#' +#' `obj:` // **required** +#' +#' This is the **gt** table object that is commonly created through use of the +#' [gt()] function. +#' +#' @param row_every_n *Split at every n rows* +#' +#' `scalar` // *default:* `NULL` (`optional`) +#' +#' A directive to split at every *n* number of rows. This argument expects a +#' single numerical value. +#' +#' @param row_slice_i *Row-slicing indices* +#' +#' `vector` // *default:* `NULL` (`optional`) +#' +#' An argument for splitting at specific row indices. Here, we expect either a +#' vector of index values or a function that evaluates to a numeric vector. +#' +#' @param col_slice_at *Column-slicing locations* +#' +#' `` // *default:* `NULL` (`optional`) +#' +#' Any columns where vertical splitting across should occur. The splits occur +#' to the right of the resolved column names. Can either be a series of column +#' names provided in `c()`, a vector of column indices, or a select helper +#' function (e.g. \link[gt]{starts_with}, \link[gt]{ends_with}, \link[gt]{contains}, \link[gt]{matches}, +#' \link[gt]{num_range}, and \link[gt]{everything}). +#' +#' @return An object of class `gt_group`. +#' +#' @note +#' This function is a temporary export of asar, but all development and rights +#' belong to `rstudio/gt`. This function provides a fix to the function +#' introduced by a bug in gt v1.3.0. Until this is corrected in the package, we +#' are using the function here. Once this bug is patched, we will deprecate +#' and remove this function from asar and direct users to use the gt package +#' version of this function. +#' +#' @section Examples: +#' +#' Use a subset of the [`gtcars`] dataset to create a **gt** table. Format the +#' `msrp` column to display numbers as currency values, set column widths with +#' \link[gt]{cols_width}, and split the table at every five rows with `gt_split()`. +#' This creates a `gt_group` object containing two tables. Printing this object +#' yields two tables separated by a line break. +#' +#' ```r +#' gtcars |> +#' dplyr::slice_head(n = 10) |> +#' dplyr::select(mfr, model, year, msrp) |> +#' gt() |> +#' fmt_currency(columns = msrp) |> +#' cols_width( +#' year ~ px(80), +#' everything() ~ px(150) +#' ) |> +#' gt_split(row_every_n = 5) +#' ``` +#' +#' Use a smaller subset of the [`gtcars`] dataset to create a **gt** table. +#' Format the `msrp` column to display numbers as currency values, set the table +#' width with [tab_options()] and split the table at the `model` column This +#' creates a `gt_group` object again containing two tables but this time we get +#' a vertical split. Printing this object yields two tables of the same width. +#' +#' ```r +#' gtcars |> +#' dplyr::slice_head(n = 5) |> +#' dplyr::select(mfr, model, year, msrp) |> +#' gt() |> +#' fmt_currency(columns = msrp) |> +#' tab_options(table.width = px(400)) |> +#' gt_split(col_slice_at = "model") +#' ``` +#' +#' @family table group functions +#' @section Function ID: +#' 14-2 +#' +#' @section Function Introduced: +#' `v0.9.0` (Mar 31, 2023) +#' +#' @export +gt_split <- function( + data, + row_every_n = NULL, + row_slice_i = NULL, + col_slice_at = NULL +) { + + # Perform input object validation + gt:::stop_if_not_gt_tbl(data = data) + + # Resolution of columns as character vectors + col_slice_at <- + gt:::resolve_cols_c( + expr = {{ col_slice_at }}, + data = data, + null_means = "nothing" + ) + + gt_tbl_built <- gt:::build_data(data = data, context = "html") + + # Get row count for table (data rows) + n_rows_data <- nrow(gt_tbl_built[["_stub_df"]]) + + row_slice_vec <- rep.int(1L, n_rows_data) + + row_every_n_idx <- NULL + if (!is.null(row_every_n)) { + row_every_n_idx <- seq_len(n_rows_data)[seq(0, n_rows_data, row_every_n)] + } + + row_slice_i_idx <- NULL + if (!is.null(row_slice_i)) { + row_slice_i_idx <- row_slice_i + } + + row_idx <- sort(unique(c(row_every_n_idx, row_slice_i_idx))) + + group_i <- 0L + + for (i in seq_along(row_slice_vec)) { + + if (i %in% (row_idx + 1)) { + group_i <- group_i + 1L + } + + row_slice_vec[i] <- row_slice_vec[i] + group_i + } + + row_range_list <- + split( + seq_len(n_rows_data), + row_slice_vec + ) + + gt_tbl_main <- data + + gt_group <- gt::gt_group(.use_grp_opts = FALSE) + + for (i in seq_along(row_range_list)) { + + gt_tbl_i <- gt_tbl_main + + gt_tbl_i[["_data"]] <- gt_tbl_i[["_data"]][row_range_list[[i]], ] + gt_tbl_i[["_stub_df"]] <- gt_tbl_i[["_stub_df"]][seq_along(row_range_list[[i]]), ] + + if (!is.null(col_slice_at)) { + + # Get all visible vars in their finalized order + visible_col_vars <- gt:::dt_boxhead_get_vars_default(data = data) + + # Stop function if any of the columns to split at aren't visible columns + if (!all(col_slice_at %in% visible_col_vars)) { + cli::cli_abort( + "All values provided in `col_slice_at` must correspond to visible columns." + ) + } + + # Obtain all of the column indices for vertical splitting + col_idx <- which(visible_col_vars %in% col_slice_at) + + col_slice_vec <- rep.int(1L, length(visible_col_vars)) + + group_j <- 0L + + for (i in seq_along(col_slice_vec)) { + + if (i %in% (col_idx + 1)) { + group_j <- group_j + 1L + } + + col_slice_vec[i] <- col_slice_vec[i] + group_j + } + + col_range_list <- + split( + seq_along(visible_col_vars), + col_slice_vec + ) + + for (j in seq_along(col_range_list)) { + + gt_tbl_j <- gt_tbl_i + + gt_tbl_j[["_data"]] <- + gt_tbl_j[["_data"]][, visible_col_vars[col_range_list[[j]]]] + + gt_tbl_j[["_boxhead"]] <- + gt_tbl_j[["_boxhead"]][ + gt_tbl_j[["_boxhead"]]$var %in% visible_col_vars[col_range_list[[j]]], + ] + + gt_group <- gt::grp_add(gt_group, gt_tbl_j) + } + + + } else { + gt_group <- gt::grp_add(gt_group, gt_tbl_i) + } + } + + gt_group +} + diff --git a/R/utils_tex.R b/R/utils_tex.R index e68805c7..ef1d6a0f 100644 --- a/R/utils_tex.R +++ b/R/utils_tex.R @@ -111,6 +111,12 @@ create_inheader_tex <- function(species = NULL, year = NULL, subdir) { # sep = "" # ) # lines <- append(lines, gloss) + + # Add float package + lines <- append( + lines, + "\\usepackage{float}\n\\floatplacement{table}{H}\n" + ) write(lines, file = paste(subdir, "/in-header.tex", sep = "")) } diff --git a/README.md b/README.md index 5877e2ec..4917d24e 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ asar::create_template( species = "Petrale sole", spp_latin = "Eopsetta jordani", year = 2023, - author = c("Ian G. Taylor"="NWFSC", "Vladlena Gertseva"="NWFSC", "Nick Tolimieri"="NWFSC"), + authors = c("Ian G. Taylor"="NWFSC", "Vladlena Gertseva"="NWFSC", "Nick Tolimieri"="NWFSC"), include_affiliation = TRUE, simple_affiliation = FALSE, param_names = c("nf","sf"), diff --git a/inst/WORDLIST b/inst/WORDLIST index d604b7aa..c9b3e150 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -42,6 +42,7 @@ Rockfish Rockfishes Rosemond Rougheye +RTF SBPR SEFSC SSC diff --git a/inst/glossary/report_glossary.tex b/inst/glossary/report_glossary.tex index 86972078..27d41273 100644 --- a/inst/glossary/report_glossary.tex +++ b/inst/glossary/report_glossary.tex @@ -1,7 +1,7 @@ \newacronym{aa}{AA}{annual allocation} \newacronym{aac}{AAC}{Alaska Administrative Code} \newacronym{abc}{ABC}{acceptable biological catch} -\newacronym{abinfsps}{ABINFSPS}{AEP Bogoslof Island Northern fur Seal Population_Summer} +\newacronym{abinfsps}{ABINFSPS}{AEP Bogoslof Island Northern fur Seal Population\_Summer} \newacronym{abm}{ABM}{abundance-based management} \newacronym{accsp}{ACCSP}{Atlantic Coastal Cooperative Statistics Program} \newacronym{ace}{ACE}{annual catch entitlement} @@ -18,19 +18,19 @@ \newacronym{aeq}{AEQ}{adult equivalent} \newacronym{afa}{AFA}{American Fisheries Act} \newacronym{afsc}{AFSC}{Alaska Fisheries Science Center} -\newacronym{agaaissslvrs}{AGAAISSSLVRS}{AEP Gulf of Alaska/Aleutian Islands W. Stock Steller Sea Lion Vital Rates_Spring} -\newacronym{aggregated land-based work for salmon}{Aggregated land-based work for salmon}{Aggregated Salmon and Sturgeon Field work (small boat & land)} -\newacronym{aggregated small-boat work for salmon and sturgeon}{Aggregated small-boat work for salmon and sturgeon}{Aggregated Salmon and Sturgeon Field work (small boat & land)} +\newacronym{agaaissslvrs}{AGAAISSSLVRS}{AEP Gulf of Alaska/Aleutian Islands W. Stock Steller Sea Lion Vital Rates\_Spring} +\newacronym{aggregated land-based work for salmon}{Aggregated land-based work for salmon}{Aggregated Salmon and Sturgeon Field work (small boat \& land)} +\newacronym{aggregated small-boat work for salmon and sturgeon}{Aggregated small-boat work for salmon and sturgeon}{Aggregated Salmon and Sturgeon Field work (small boat \& land)} \newacronym{ai}{AI}{Aleutian Islands} -\newacronym{ai trawl survey}{AI trawl survey}{GAP Aleutian Island Bottom Trawl_Summer} +\newacronym{ai trawl survey}{AI trawl survey}{GAP Aleutian Island Bottom Trawl\_Summer} \newacronym{ais}{AIS}{aquatic invasive species} \newacronym{ak bof}{AK BOF}{Alaska Board of Fisheries} \newacronym{akfin}{AKFIN}{Alaska Fisheries Information Network} \newacronym{akr}{AKR}{Alaska Region} \newacronym{akro}{AKRO}{Alaska Regional Office} -\newacronym{alaska northern fur seal (nfs) abundance trend monitoring}{Alaska Northern Fur Seal (NFS) Abundance Trend Monitoring}{Northern Fur Seal (NFS) Abundance Trend Monitoring_Pribilof Island} -\newacronym{aleutian islands bottom trawl survey}{Aleutian Islands Bottom Trawl Survey}{GAP Aleutian Island Bottom Trawl_Summer} -\newacronym{aleutian islands steller sea lion vital rates studies}{Aleutian Islands Steller Sea Lion Vital Rates Studies}{AEP Gulf of Alaska/Aleutian Islands W. Stock Steller Sea Lion Vital Rates_Spring} +\newacronym{alaska northern fur seal -nfs- abundance trend monitoring}{Alaska Northern Fur Seal (NFS) Abundance Trend Monitoring}{Northern Fur Seal (NFS) Abundance Trend Monitoring\_Pribilof Island} +\newacronym{aleutian islands bottom trawl survey}{Aleutian Islands Bottom Trawl Survey}{GAP Aleutian Island Bottom Trawl\_Summer} +\newacronym{aleutian islands steller sea lion vital rates studies}{Aleutian Islands Steller Sea Lion Vital Rates Studies}{AEP Gulf of Alaska/Aleutian Islands W. Stock Steller Sea Lion Vital Rates\_Spring} \newacronym{alj}{ALJ}{administrative law judge} \newacronym{alk}{ALK}{age-length-key} \newacronym{als}{ALS}{Accumulated Landings System } @@ -44,14 +44,14 @@ \newacronym{apa}{APA}{Administrative Procedure Act} \newacronym{apais}{APAIS}{Access Point Angler Intercept Survey} \newacronym{ar}{AR}{autoregressive} -\newacronym{arctic ecosystem distributed biological observatory}{Arctic Ecosystem Distributed Biological Observatory}{EcoFOCI Arctic Ecosystem Distributed Biological Observatory_Fall} +\newacronym{arctic ecosystem distributed biological observatory}{Arctic Ecosystem Distributed Biological Observatory}{EcoFOCI Arctic Ecosystem Distributed Biological Observatory\_Fall} \newacronym{arm}{ARM}{adaptive resource management framework} \newacronym{as}{AS}{American Samoa} \newacronym{asap}{ASAP}{age-structured assessment program} -\newacronym{asasfwsbl}{ASASFWSBL}{Aggregated Salmon and Sturgeon Field work (small boat & land)} +\newacronym{asasfwsbl}{ASASFWSBL}{Aggregated Salmon and Sturgeon Field work (small boat \& land)} \newacronym{asc}{ASC}{assessment science committee} \newacronym{ascaea}{ASCAEA}{American Samoa Cetacean and Ecosystem Assessment Survey} -\newacronym{ascoqd}{ASCOQD}{Atlantic Surf Clam & Ocean Quahog Dredge} +\newacronym{ascoqd}{ASCOQD}{Atlantic Surf Clam \& Ocean Quahog Dredge} \newacronym{asg}{ASG}{American Samoa Government} \newacronym{asibs}{ASIBS}{American Samoa Insular Bottomfish Survey} \newacronym{asirfs}{ASIRFS}{American Samoa Insular Reef Fish Survey} @@ -69,10 +69,10 @@ \newacronym{ba}{BA}{biological assessment} \newacronym{bam}{BAM}{Beaufort Assessment Model} \newacronym{basis}{BASIS}{Bering Sea-Aleutian Salmon International Survey} -\newacronym{basis northern bering sea}{BASIS Northern Bering Sea}{EMA Northern Bering Sea Ecosystem Surface Trawl_Fall} -\newacronym{basis survey}{BASIS survey}{EMA Northern Bering Sea Ecosystem Surface Trawl_Fall} -\newacronym{basis/foci southeastern bering sea}{BASIS/FOCI Southeastern Bering Sea}{EMA Eastern Bering Sea Juvenile Fish_Fall} -\newacronym{basis_fall}{BASIS_Fall}{EMA Northern Bering Sea Ecosystem Surface Trawl_Fall} +\newacronym{basis northern bering sea}{BASIS Northern Bering Sea}{EMA Northern Bering Sea Ecosystem Surface Trawl\_Fall} +\newacronym{basis survey}{BASIS survey}{EMA Northern Bering Sea Ecosystem Surface Trawl\_Fall} +\newacronym{basis-fall}{BASIS-Fall}{EMA Northern Bering Sea Ecosystem Surface Trawl\_Fall} +\newacronym{basis/foci southeastern bering sea}{BASIS/FOCI Southeastern Bering Sea}{EMA Eastern Bering Sea Juvenile Fish\_Fall} \newacronym{bb}{BB}{briefing book} \newacronym{bbisp}{BBISP}{Beaufort Bridgenet Plankton Survey} \newacronym{bbrkc}{BBRKC}{Bristol Bay Red King Crab} @@ -80,22 +80,22 @@ \newacronym{bcurrent}{$B_{current}$}{current biomass of stock} \newacronym{bdcp}{BDCP}{Bay Delta Conservation Plan} \newacronym{beg}{BEG}{biological escapement goal} -\newacronym{bering sea biennial walleye pollock accoustic_summer}{Bering Sea Biennial Walleye Pollock Accoustic_Summer}{MACE Eastern Bering Sea Pollock Acoustic Trawl_Summer} -\newacronym{bering sea moorings and zooplankton survey_spring (pmel)}{Bering Sea Moorings and Zooplankton Survey_Spring (PMEL)}{EcoFOCI Eastern Bering Sea & Gulf of Alaska Moorings_Spring} +\newacronym{bering sea biennial walleye pollock accoustic-summer}{Bering Sea Biennial Walleye Pollock Accoustic-Summer}{MACE Eastern Bering Sea Pollock Acoustic Trawl\_Summer} +\newacronym{bering sea moorings and zooplankton survey-spring -pmel-}{Bering Sea Moorings and Zooplankton Survey-Spring (PMEL)}{EcoFOCI Eastern Bering Sea \& Gulf of Alaska Moorings\_Spring} \newacronym{bet}{BET}{bigeye tuna} \newacronym{bfish}{BFISH}{Bottomfish Fishery-Independent in Hawaii (BFISH)} -\newacronym{bfish (fy21)}{BFISH (FY21)}{Bottomfish Fishery-Independent in Hawaii (BFISH)} +\newacronym{bfish -fy21-}{BFISH (FY21)}{Bottomfish Fishery-Independent in Hawaii (BFISH)} \newacronym{bflag}{Bflag}{warning reference point} \newacronym{biop}{BiOp}{biological opinion} \newacronym{bkc}{BKC}{blue king crab} -\newacronym{blls fall}{BLLS Fall}{Gulf of Maine Bottom Longline Survey_Fall} -\newacronym{blls spring}{BLLS Spring}{Gulf of Maine Bottom Longline Survey_Spring} +\newacronym{blls fall}{BLLS Fall}{Gulf of Maine Bottom Longline Survey\_Fall} +\newacronym{blls spring}{BLLS Spring}{Gulf of Maine Bottom Longline Survey\_Spring} \newacronym{blm}{BLM}{Bureau of Land Management} \newacronym{bm}{BM}{base model} \newacronym{bmsy}{$B_{MSY}$}{biomass at max sustainable yield} \newacronym{boem}{BOEM}{Bureau of Ocean Energy Management} \newacronym{bof}{BOF}{Board of Fish} -\newacronym{bogoslof island northern fur seal (nfs) abundance trend monitoring}{Bogoslof Island Northern Fur Seal (NFS) Abundance Trend Monitoring}{AEP Bogoslof Island Northern fur Seal Population_Summer} +\newacronym{bogoslof island northern fur seal -nfs- abundance trend monitoring}{Bogoslof Island Northern Fur Seal (NFS) Abundance Trend Monitoring}{AEP Bogoslof Island Northern fur Seal Population\_Summer} \newacronym{bor}{BOR}{US Bureau of Reclamation} \newacronym{bpa}{BPA}{Bonneville Power Administration} \newacronym{brd}{BRD}{bycatch reduction device} @@ -105,14 +105,14 @@ \newacronym{bsia}{BSIA}{Best Scientific Information Available} \newacronym{bsierp}{BSIERP}{Bering Sea Integrated Ecosystem Research Program} \newacronym{bts}{BTS}{bottom trawl survey} -\newacronym{btsf}{BTSF}{Bottom Trawl Survey_Fall} -\newacronym{btss}{BTSS}{Bottom Trawl Survey_Spring} +\newacronym{btsf}{BTSF}{Bottom Trawl Survey\_Fall} +\newacronym{btss}{BTSS}{Bottom Trawl Survey\_Spring} \newacronym{c}{C}{catch} \newacronym{c&s}{C&S}{ceremonial and subsistence} \newacronym{calcofi}{CalCOFI}{California Cooperative Oceanic Fisheries Investigations} -\newacronym{calcofi/sardine (southern portion)_spring}{CalCOFI/Sardine (Southern Portion)_Spring}{CalCOFI_Spring} -\newacronym{california sea lion marking for vital rates}{California Sea Lion Marking for Vital Rates}{CCEP West Coast California Sea Lion Abundance, Vital Rate and Ecological Assessments_Land_Any Season} -\newacronym{california sea lion pup condition assessment for stranding program}{California Sea Lion Pup Condition Assessment for Stranding Program}{CCEP West Coast California Sea Lion Abundance, Vital Rate and Ecological Assessments_Land_Any Season} +\newacronym{calcofi/sardine -southern portion--spring}{CalCOFI/Sardine (Southern Portion)-Spring}{CalCOFI\_Spring} +\newacronym{california sea lion marking for vital rates}{California Sea Lion Marking for Vital Rates}{CCEP West Coast California Sea Lion Abundance, Vital Rate and Ecological Assessments\_Land\_Any Season} +\newacronym{california sea lion pup condition assessment for stranding program}{California Sea Lion Pup Condition Assessment for Stranding Program}{CCEP West Coast California Sea Lion Abundance, Vital Rate and Ecological Assessments\_Land\_Any Season} \newacronym{cams}{CAMS}{catch accounting and monitoring system} \newacronym{cas}{CAS}{catch accounting system} \newacronym{cbnms}{CBNMS}{Cordell Bank National Marine Sanctuary} @@ -122,7 +122,7 @@ \newacronym{cce}{CCE}{California Current Ecosystem} \newacronym{ccfrp}{CCFRP}{California Collaborative Fisheries Research Program} \newacronym{cci}{CCI}{Climate and Communities Initiative} -\newacronym{ccibuss}{CCIBUSS}{CAEP Cook Inlet Beluga UxS Survey_Summer} +\newacronym{ccibuss}{CCIBUSS}{CAEP Cook Inlet Beluga UxS Survey\_Summer} \newacronym{cciea}{CCIEA}{California Current Integrated Ecosystem Assessment} \newacronym{cdf}{CDF}{cumulative distribution function} \newacronym{cdfw}{CDFW}{California Department of Fish and Wildlife (formerly CDFG, Fish and Game)} @@ -142,19 +142,19 @@ \newacronym{cfmc}{CFMC}{Caribbean Fishery Management Council} \newacronym{cfr}{CFR}{Code of Federal Regulations} \newacronym{cfs}{cfs}{cubic feet per second} -\newacronym{cganprws}{CGANPRWS}{CAEP Gulf of Alaska North Pacific Right Whale_Summer} +\newacronym{cganprws}{CGANPRWS}{CAEP Gulf of Alaska North Pacific Right Whale\_Summer} \newacronym{cgoa}{CGOA}{Central Gulf of Alaska} \newacronym{ch}{CH}{Critical Habitat} \newacronym{chapc}{CHAPC}{Coral Habitat Area of Particular Concern} \newacronym{chesmmap}{ChesMMAP}{Chesapeake Bay Multispecies Monitoring and Assessment Program} \newacronym{chts}{CHTS}{Coastal Household Telephone Survey} \newacronym{ci}{CI}{confidence interval} -\newacronym{cibchagb}{CIBCHAGB}{Cook Inlet Beluga (CIB) Health and genetics_Biopsy} +\newacronym{cibchagb}{CIBCHAGB}{Cook Inlet Beluga (CIB) Health and genetics\_Biopsy} \newacronym{cie}{CIE}{Center for Independent Experts} \newacronym{cinms}{CINMS}{Channel Islands National Marine Sanctuary} \newacronym{cites}{CITES}{Convention of International Trade in Endangered Species} \newacronym{cjfas}{CJFAS}{Canadian Journal of Fisheries and Aquatic Sciences} -\newacronym{clam survey}{Clam Survey}{Atlantic Surf Clam & Ocean Quahog Dredge} +\newacronym{clam survey}{Clam Survey}{Atlantic Surf Clam \& Ocean Quahog Dredge} \newacronym{clf}{CLF}{Conservation Law Foundation} \newacronym{clm}{CLM}{commercial landings monitoring} \newacronym{CM}{CM}{continuity model} @@ -165,14 +165,14 @@ \newacronym{cnmi}{CNMI}{Commonwealth of the Northern Mariana Islands} \newacronym{co2}{$CO_{2}$}{carbon dioxide} \newacronym{coar}{COAR}{Commercial Operators Annual Report} -\newacronym{coastal pelagic species (cps) survey (aka sardine survey)}{Coastal Pelagic Species (CPS) Survey (aka Sardine Survey)}{Integrated West Coast Pelagics Survey} -\newacronym{coastal pelagic species (cps)_spring}{Coastal Pelagic Species (CPS)_Spring}{Integrated West Coast Pelagics Survey} -\newacronym{coastal pelagic species (cps)_summer}{Coastal Pelagic Species (CPS)_Summer}{Integrated West Coast Pelagics Survey} +\newacronym{coastal pelagic species -cps- survey -aka sardine survey-}{Coastal Pelagic Species (CPS) Survey (aka Sardine Survey)}{Integrated West Coast Pelagics Survey} +\newacronym{coastal pelagic species -cps--spring}{Coastal Pelagic Species (CPS)-Spring}{Integrated West Coast Pelagics Survey} +\newacronym{coastal pelagic species -cps--summer}{Coastal Pelagic Species (CPS)-Summer}{Integrated West Coast Pelagics Survey} \newacronym{coblz}{COBLZ}{\textit{C. opilio} Bycatch Limitation Zone} \newacronym{coi}{COI}{certificate of inspection} -\newacronym{collaborative large whale survey (claws)}{Collaborative Large Whale Survey (CLAWS)}{West Coast Marine Mammal Survey, Part 2} +\newacronym{collaborative large whale survey -claws-}{Collaborative Large Whale Survey (CLAWS)}{West Coast Marine Mammal Survey, Part 2} \newacronym{combined video survey}{Combined Video Survey}{Gulf Video Surveys} -\newacronym{cook inlet beluga biopsy survey}{Cook Inlet beluga Biopsy survey}{Cook Inlet Beluga (CIB) Health and genetics_Biopsy} +\newacronym{cook inlet beluga biopsy survey}{Cook Inlet beluga Biopsy survey}{Cook Inlet Beluga (CIB) Health and genetics\_Biopsy} \newacronym{cop}{COP}{Council Operating Procedures} \newacronym{covid}{Covid}{refers to coronavirus pandemic years} \newacronym{cowcod}{Cowcod}{Juvenile Rockfish Survey} @@ -199,7 +199,7 @@ \newacronym{cv}{CV}{coefficient of variation} \newacronym{cvoa}{CVOA}{catcher vessel operational area} \newacronym{cvpia}{CVPIA}{Central Valley Project Improvement Act} -\newacronym{cwccslavraealas}{CWCCSLAVRAEALAS}{CCEP West Coast California Sea Lion Abundance, Vital Rate and Ecological Assessments_Land_Any Season} +\newacronym{cwccslavraealas}{CWCCSLAVRAEALAS}{CCEP West Coast California Sea Lion Abundance, Vital Rate and Ecological Assessments\_Land\_Any Season} \newacronym{cwt}{CWT}{coded-wire tag} \newacronym{cy}{CY}{calendar year} \newacronym{czma}{CZMA}{Coastal Zone Management Act} @@ -231,7 +231,7 @@ \newacronym{dpnr}{DPNR}{Department of Planning and Natural Resources of the USVI} \newacronym{dps}{DPS}{distinct population segment} \newacronym{dqa}{DQA}{Data Quality Act} -\newacronym{dry tortugas reef fish visual census (rvc)}{Dry Tortugas Reef Fish Visual Census (RVC)}{Florida/Dry Tortugas Coral Reef Benthic Survey} +\newacronym{dry tortugas reef fish visual census -rvc-}{Dry Tortugas Reef Fish Visual Census (RVC)}{Florida/Dry Tortugas Coral Reef Benthic Survey} \newacronym{dry tortugas reef fish visual survey}{Dry Tortugas Reef Fish Visual Survey}{Florida/Dry Tortugas Coral Reef Benthic Survey} \newacronym{dtl}{DTL}{daily trip limit} \newacronym{dts}{DTS}{dover sole, thornyhead, and trawl-caught sablefish complex} @@ -240,25 +240,25 @@ \newacronym{dwh}{DWH}{Deepwater Horizon} \newacronym{e-a}{E-A}{Euro-American} \newacronym{ea}{EA}{environmental assessment} -\newacronym{eaedbof}{EAEDBOF}{EcoFOCI Arctic Ecosystem Distributed Biological Observatory_Fall} +\newacronym{eaedbof}{EAEDBOF}{EcoFOCI Arctic Ecosystem Distributed Biological Observatory\_Fall} \newacronym{eam}{EAM}{ecosystem approach to management} \newacronym{eas}{EAS}{Ecosystem Advisory Subpanel} -\newacronym{eastern bering sea bottom trawl survey}{Eastern Bering Sea Bottom Trawl Survey}{GAP-SAP Eastern Bering Sea Bottom Trawl_Summer} -\newacronym{eastern bering sea shelf bottom trawl survey}{Eastern Bering Sea Shelf Bottom Trawl Survey}{GAP-SAP Eastern Bering Sea Bottom Trawl_Summer} +\newacronym{eastern bering sea bottom trawl survey}{Eastern Bering Sea Bottom Trawl Survey}{GAP-SAP Eastern Bering Sea Bottom Trawl\_Summer} +\newacronym{eastern bering sea shelf bottom trawl survey}{Eastern Bering Sea Shelf Bottom Trawl Survey}{GAP-SAP Eastern Bering Sea Bottom Trawl\_Summer} \newacronym{ebfm}{EBFM}{ecosystem based fisheries management} \newacronym{ebm}{EBM}{ecosystem-based management} -\newacronym{ebs acoustic survey}{EBS acoustic survey}{MACE Eastern Bering Sea Pollock Acoustic Trawl_Summer} -\newacronym{ebs trawl survey}{EBS trawl survey}{GAP-SAP Eastern Bering Sea Bottom Trawl_Summer} +\newacronym{ebs acoustic survey}{EBS acoustic survey}{MACE Eastern Bering Sea Pollock Acoustic Trawl\_Summer} +\newacronym{ebs trawl survey}{EBS trawl survey}{GAP-SAP Eastern Bering Sea Bottom Trawl\_Summer} \newacronym{ec}{EC}{ecosystem component} \newacronym{eco}{ECO}{Ecosystem Committee} -\newacronym{ecomon fall}{ECOMON Fall}{Northeast Ecosystem Monitoring (EcoMon)_Fall} -\newacronym{ecomon spring}{ECOMON Spring}{Northeast Ecosystem Monitoring (EcoMon)_Spring} -\newacronym{ecomon summer}{ECOMON Summer}{Northeast Ecosystem Monitoring (EcoMon)_Summer} -\newacronym{ecomon winter}{ECOMON Winter}{Northeast Ecosystem Monitoring (EcoMon)_Winter} +\newacronym{ecomon fall}{ECOMON Fall}{Northeast Ecosystem Monitoring (EcoMon)\_Fall} +\newacronym{ecomon spring}{ECOMON Spring}{Northeast Ecosystem Monitoring (EcoMon)\_Spring} +\newacronym{ecomon summer}{ECOMON Summer}{Northeast Ecosystem Monitoring (EcoMon)\_Summer} +\newacronym{ecomon winter}{ECOMON Winter}{Northeast Ecosystem Monitoring (EcoMon)\_Winter} \newacronym{ed}{ED}{executive director} \newacronym{edf}{EDF}{Environmental Defense Fund} \newacronym{edr}{EDR}{economic data reporting} -\newacronym{eebsgams}{EEBSGAMS}{EcoFOCI Eastern Bering Sea & Gulf of Alaska Moorings_Spring} +\newacronym{eebsgams}{EEBSGAMS}{EcoFOCI Eastern Bering Sea \& Gulf of Alaska Moorings\_Spring} \newacronym{eej}{EEJ}{equity and environmental justice} \newacronym{eez}{EEZ}{Exclusive Economic Zone} \newacronym{ef}{EF}{expansion factor} @@ -276,7 +276,7 @@ \newacronym{elb}{ELB}{electronic logbook} \newacronym{elmr}{ELMR}{Estuarine Living Marine Resources} \newacronym{em}{EM}{electronic monitoring} -\newacronym{ema-foci larval groundfish assessment}{EMA-FOCI Larval Groundfish Assessment}{EcoFOCI Eastern Bering Sea Ichthyoplankton_Spring} +\newacronym{ema-foci larval groundfish assessment}{EMA-FOCI Larval Groundfish Assessment}{EcoFOCI Eastern Bering Sea Ichthyoplankton\_Spring} \newacronym{emc}{EMC}{Electronic Monitoring Committee} \newacronym{enso}{ENSO}{El NiƱo Southern Oscillation} \newacronym{eo}{EO}{executive order} @@ -287,24 +287,24 @@ \newacronym{er}{ER}{ecological reserve} \newacronym{esa}{ESA}{Endangered Species Act} \newacronym{esd}{ESD}{equivalent spherical diameter} -\newacronym{esp}{ESP}{ecological and socioeconomic profile} +\newacronym{esp}{ESP}{ecosystem and socioeconomic profile} \newacronym{esrl}{ESRL}{Earth System Research Laboratory, NOAA} -\newacronym{essential fish habitat (efh) juvenile rockfish}{Essential Fish Habitat (EFH) Juvenile Rockfish}{Juvenile Rockfish Survey} +\newacronym{essential fish habitat -efh- juvenile rockfish}{Essential Fish Habitat (EFH) Juvenile Rockfish}{Juvenile Rockfish Survey} \newacronym{esu}{ESU}{evolutionarily significant unit} \newacronym{ewg}{EWG}{ecosystem workgroup} \newacronym{f}{F}{fishing mortality} \newacronym{f/v}{F/V}{fishing vessel} \newacronym{fac}{FAC}{Fisheries Advisory Committee} \newacronym{fad}{FAD}{fish aggregating device} -\newacronym{fall bts}{Fall BTS}{Bottom Trawl Survey_Fall} -\newacronym{fall calcofi}{Fall CalCOFI}{CalCOFI_Fall} -\newacronym{fall california cooperative fisheries investigations survey}{Fall California Cooperative Fisheries Investigations Survey}{CalCOFI_Fall} +\newacronym{fall bts}{Fall BTS}{Bottom Trawl Survey\_Fall} +\newacronym{fall calcofi}{Fall CalCOFI}{CalCOFI\_Fall} +\newacronym{fall california cooperative fisheries investigations survey}{Fall California Cooperative Fisheries Investigations Survey}{CalCOFI\_Fall} \newacronym{fall ct lists}{Fall CT LISTS}{Fall Connecticut Department of Energy and Environmental Protection Marine Fisheries Program Long Island Sound Trawl Survey} -\newacronym{fall juvenile fish survey in the southeastern bering sea and gulf of alaska}{Fall Juvenile Fish Survey in the Southeastern Bering Sea and Gulf of Alaska}{EMA Eastern Bering Sea Juvenile Fish_Fall} -\newacronym{fall juvenile survey}{Fall juvenile survey}{EMA Eastern Bering Sea Juvenile Fish_Fall} -\newacronym{fall maine - new hampshire inshore trawl survey}{Fall Maine - New Hampshire Inshore Trawl Survey}{NH/ME Inshore Trawl Survey_Fall} -\newacronym{fall northeast fisheries science center ecosystem monitoring survey}{Fall Northeast Fisheries Science Center Ecosystem Monitoring Survey}{Northeast Ecosystem Monitoring (EcoMon)_Fall} -\newacronym{fao}{FAO}{Food & Agriculture Organization of the United Nations} +\newacronym{fall juvenile fish survey in the southeastern bering sea and gulf of alaska}{Fall Juvenile Fish Survey in the Southeastern Bering Sea and Gulf of Alaska}{EMA Eastern Bering Sea Juvenile Fish\_Fall} +\newacronym{fall juvenile survey}{Fall juvenile survey}{EMA Eastern Bering Sea Juvenile Fish\_Fall} +\newacronym{fall maine - new hampshire inshore trawl survey}{Fall Maine - New Hampshire Inshore Trawl Survey}{NH/ME Inshore Trawl Survey\_Fall} +\newacronym{fall northeast fisheries science center ecosystem monitoring survey}{Fall Northeast Fisheries Science Center Ecosystem Monitoring Survey}{Northeast Ecosystem Monitoring (EcoMon)\_Fall} +\newacronym{fao}{FAO}{Food \& Agriculture Organization of the United Nations} \newacronym{fate}{FATE}{Fisheries and the Environment} \newacronym{fcurrent}{$F_{current}$}{current fishing mortality rate} \newacronym{fda}{FDA}{Food and Drug Administration} @@ -319,7 +319,7 @@ \newacronym{fin}{FIN}{Fisheries Information Network} \newacronym{fis}{FIS}{fishery impact statement} \newacronym{fisheries oceanography - north pacific subtropical front survey}{Fisheries Oceanography - North Pacific Subtropical Front Survey}{Fisheries Oceanography - Leeward Oahu Pelagic Ecosystem Characterization} -\newacronym{fknfssbs}{FKNFSSBS}{FBEP Kodiak Nearshore Fish Survey small boat_Summer} +\newacronym{fknfssbs}{FKNFSSBS}{FBEP Kodiak Nearshore Fish Survey small boat\_Summer} \newacronym{fknms}{FKNMS}{Florida Keys National Marine Sanctuary} \newacronym{fkwaic}{FKWAIC}{False killer whale and insular cetacean assessment survey} \newacronym{fkwas}{FKWAS}{False Killer Whale Assessment Survey} @@ -327,7 +327,7 @@ \newacronym{fl reef fish visual survey}{FL Reef Fish Visual Survey}{Florida/Dry Tortugas Coral Reef Benthic Survey} \newacronym{flec}{FLEC}{Florida East Coast} \newacronym{fll}{FLL}{freezer longliner} -\newacronym{florida keys/southeast reef fish visual census (rvc)}{Florida Keys/Southeast Reef Fish Visual Census (RVC)}{Florida/Dry Tortugas Coral Reef Benthic Survey} +\newacronym{florida keys/southeast reef fish visual census -rvc-}{Florida Keys/Southeast Reef Fish Visual Census (RVC)}{Florida/Dry Tortugas Coral Reef Benthic Survey} \newacronym{fm}{Fm}{fathom} \newacronym{fma}{FMA}{AFSC Fisheries Monitoring and Analysis Division (aka the Observer Program)} \newacronym{fmac}{FMAC}{Fishery Monitoring Advisory Committee} @@ -339,7 +339,7 @@ \newacronym{focc}{FOCC}{Fisheries Oceanography - Climate Change} \newacronym{foia}{FOIA}{Freedom of Information Act} \newacronym{fonsi}{FONSI}{finding of no significant impact} -\newacronym{foraging ecology and health of adult female steller sea lions (aepssl)}{Foraging Ecology and Health of Adult Female Steller Sea Lions (AEPSSL)}{AEP Gulf of Alaska/Aleutian Islands W. Stock Steller Sea Lion Vital Rates_Spring} +\newacronym{foraging ecology and health of adult female steller sea lions -aepssl-}{Foraging Ecology and Health of Adult Female Steller Sea Lions (AEPSSL)}{AEP Gulf of Alaska/Aleutian Islands W. Stock Steller Sea Lion Vital Rates\_Spring} \newacronym{fowhie}{FOWHIE}{Fisheries Oceanography - West Hawaii Integrated Ecosystem Assessment (IEA)} \newacronym{foy}{FOY}{fishing mortality rate yielding OY} \newacronym{fpr}{FPR}{fishery performance reports} @@ -380,8 +380,8 @@ \newacronym{gni}{GNI}{gross national income} \newacronym{gnp}{GNP}{gross national product} \newacronym{goa}{GOA}{Gulf of Alaska} -\newacronym{goa acoustic survey}{GOA acoustic survey}{MACE Gulf of Alaska Pollock Acoustic Trawl_Summer} -\newacronym{goa trawl survey}{GOA trawl survey}{GAP Gulf of Alaska Bottom Trawl_Summer} +\newacronym{goa acoustic survey}{GOA acoustic survey}{MACE Gulf of Alaska Pollock Acoustic Trawl\_Summer} +\newacronym{goa trawl survey}{GOA trawl survey}{GAP Gulf of Alaska Bottom Trawl\_Summer} \newacronym{godas}{GODAS}{Global Ocean Data Assimilation System} \newacronym{goes}{GOES}{geostationary operational environmental satellites} \newacronym{gom}{GOM}{Gulf of Maine} @@ -390,32 +390,32 @@ \newacronym{grsc}{GRSC}{Great Red Snapper Count} \newacronym{grt}{GRT}{gross registered tonnes} \newacronym{gsmfc}{GSMFC}{Gulf States Marine Fisheries Commission} -\newacronym{guam and the commonwealth of the northern mariana islands (cnmi) cetacean survey}{Guam and the Commonwealth of the Northern Mariana Islands (CNMI) Cetacean Survey}{Mariana Islands Cetacean and Ecosystem Assessment Survey} +\newacronym{guam and the commonwealth of the northern mariana islands -cnmi- cetacean survey}{Guam and the Commonwealth of the Northern Mariana Islands (CNMI) Cetacean Survey}{Mariana Islands Cetacean and Ecosystem Assessment Survey} \newacronym{gulf council}{Gulf Council}{Gulf of Mexico Fishery Management Council} -\newacronym{gulf fishery independent survey of habitat and ecosystem resources (gfisher)}{Gulf Fishery Independent Survey of Habitat and Ecosystem Resources (GFISHER)}{Gulf Video Surveys} -\newacronym{gulf of alaska biennial walleye pollock accoustic_summer}{Gulf of Alaska Biennial Walleye Pollock Accoustic_Summer}{MACE Gulf of Alaska Pollock Acoustic Trawl_Summer} -\newacronym{gulf of alaska bottom trawl survey}{Gulf of Alaska Bottom Trawl Survey}{GAP Gulf of Alaska Bottom Trawl_Summer} -\newacronym{gulf of alaska shelf and slope groundfish bottom trawl}{Gulf of Alaska Shelf and Slope Groundfish Bottom Trawl}{GAP Gulf of Alaska Bottom Trawl_Summer} -\newacronym{gulf of alaska steller sea lion vital rates studies}{Gulf of Alaska Steller sea lion vital rates studies}{AEP Gulf of Alaska/Aleutian Islands W. Stock Steller Sea Lion Vital Rates_Spring} -\newacronym{gulf of mexico shark pupping and nursery (gulfspan) (fsu/cml)}{Gulf of Mexico Shark Pupping and Nursery (GULFSPAN) (FSU/CML)}{Gulf of Mexico Shark Pupping and Nursery (GULFSPAN) (partner)} -\newacronym{gulf of mexico shark pupping and nursery (gulfspan) (uhcl)}{Gulf of Mexico Shark Pupping and Nursery (GULFSPAN) (UHCL)}{Gulf of Mexico Shark Pupping and Nursery (GULFSPAN) (partner)} -\newacronym{gulf of mexico shark pupping and nursery (gulfspan) (usa/disl)}{Gulf of Mexico Shark Pupping and Nursery (GULFSPAN) (USA/DISL)}{Gulf of Mexico Shark Pupping and Nursery (GULFSPAN) (partner)} -\newacronym{gulf of mexico shark pupping and nursery (gulfspan) (usm/gcrl)}{Gulf of Mexico Shark Pupping and Nursery (GULFSPAN) (USM/GCRL)}{Gulf of Mexico Shark Pupping and Nursery (GULFSPAN) (partner)} +\newacronym{gulf fishery independent survey of habitat and ecosystem resources -gfisher-}{Gulf Fishery Independent Survey of Habitat and Ecosystem Resources (GFISHER)}{Gulf Video Surveys} +\newacronym{gulf of alaska biennial walleye pollock accoustic-summer}{Gulf of Alaska Biennial Walleye Pollock Accoustic-Summer}{MACE Gulf of Alaska Pollock Acoustic Trawl\_Summer} +\newacronym{gulf of alaska bottom trawl survey}{Gulf of Alaska Bottom Trawl Survey}{GAP Gulf of Alaska Bottom Trawl\_Summer} +\newacronym{gulf of alaska shelf and slope groundfish bottom trawl}{Gulf of Alaska Shelf and Slope Groundfish Bottom Trawl}{GAP Gulf of Alaska Bottom Trawl\_Summer} +\newacronym{gulf of alaska steller sea lion vital rates studies}{Gulf of Alaska Steller sea lion vital rates studies}{AEP Gulf of Alaska/Aleutian Islands W. Stock Steller Sea Lion Vital Rates\_Spring} +\newacronym{gulf of mexico shark pupping and nursery -gulfspan- -fsu/cml-}{Gulf of Mexico Shark Pupping and Nursery (GULFSPAN) (FSU/CML)}{Gulf of Mexico Shark Pupping and Nursery (GULFSPAN) (partner)} +\newacronym{gulf of mexico shark pupping and nursery -gulfspan- -uhcl-}{Gulf of Mexico Shark Pupping and Nursery (GULFSPAN) (UHCL)}{Gulf of Mexico Shark Pupping and Nursery (GULFSPAN) (partner)} +\newacronym{gulf of mexico shark pupping and nursery -gulfspan- -usa/disl-}{Gulf of Mexico Shark Pupping and Nursery (GULFSPAN) (USA/DISL)}{Gulf of Mexico Shark Pupping and Nursery (GULFSPAN) (partner)} +\newacronym{gulf of mexico shark pupping and nursery -gulfspan- -usm/gcrl-}{Gulf of Mexico Shark Pupping and Nursery (GULFSPAN) (USM/GCRL)}{Gulf of Mexico Shark Pupping and Nursery (GULFSPAN) (partner)} \newacronym{gulffin}{GulfFIN}{Gulf of Mexico Fisheries Information Network} \newacronym{gulfspan gillnet survey}{GULFSPAN Gillnet Survey}{Gulf of Mexico Shark Pupping and Nursery (GULFSPAN)} \newacronym{gw}{gw}{gutted weight} -\newacronym{habcam}{HABCAM}{Northeast Sea Scallop_Summer} -\newacronym{habitat mapping camera system}{Habitat Mapping Camera System}{Northeast Sea Scallop_Summer} +\newacronym{habcam}{HABCAM}{Northeast Sea Scallop\_Summer} +\newacronym{habitat mapping camera system}{Habitat Mapping Camera System}{Northeast Sea Scallop\_Summer} \newacronym{haccp}{HACCP}{hazard analysis and critical control points} \newacronym{haibscr}{HAIBSCR}{Hawaiian Archipelago Insular Bottomfish Survey (Cooperative Research)} \newacronym{hairfs}{HAIRFS}{Hawaiian Archipelago Insular Reef Fish Survey} \newacronym{hais}{HAIS}{Hawaiian Archipelago Ichthyoplankton Surveys} -\newacronym{hake acoustic_summer}{Hake Acoustic_Summer}{Integrated West Coast Pelagics Survey} +\newacronym{hake acoustic-summer}{Hake Acoustic-Summer}{Integrated West Coast Pelagics Survey} \newacronym{halhb}{HALHB}{Hawaiian Archipelago Life History Bio-sampling} \newacronym{hapc}{HAPC}{habitat areas of particular concern} \newacronym{haramp}{HARAMP}{Hawaiian Archipelago Reef Assessment and Monitoring Program (HARAMP) - National Coral Reef Monitoring Program (NCRMP)} -\newacronym{harbor seal aerial survey_goa}{Harbor Seal Aerial Survey_GOA}{Harbor Seal Aerial Survey_Eastern Bering Sea / W. GOA} -\newacronym{hawaiian islands cetacean and ecosystem assessment survey (hiceas)}{Hawaiian Islands Cetacean and Ecosystem Assessment Survey (HICEAS)}{SWFSC - Hawaiian Islands Cetacean and Ecosystem Assessment Survey (HICEAS)} +\newacronym{harbor seal aerial survey-goa}{Harbor Seal Aerial Survey-GOA}{Harbor Seal Aerial Survey\_Eastern Bering Sea / W. GOA} +\newacronym{hawaiian islands cetacean and ecosystem assessment survey -hiceas-}{Hawaiian Islands Cetacean and Ecosystem Assessment Survey (HICEAS)}{SWFSC - Hawaiian Islands Cetacean and Ecosystem Assessment Survey (HICEAS)} \newacronym{hbs}{HBS}{headboat survey} \newacronym{hc}{HC}{habitat committee} \newacronym{hcr}{HCR}{harvest control rule} @@ -434,9 +434,9 @@ \newacronym{hook and line survey}{Hook and Line Survey}{West Coast Rockfish Hook and Line} \newacronym{hot}{HOT}{Hawaii Ocean Time Series} \newacronym{hp}{HP}{horsepower} -\newacronym{hsasebsg}{HSASEBSG}{Harbor Seal Aerial Survey_Eastern Bering Sea / W. GOA} +\newacronym{hsasebsg}{HSASEBSG}{Harbor Seal Aerial Survey\_Eastern Bering Sea / W. GOA} \newacronym{hstt}{HSTT}{Hawaii-Southern California Training and Testing} -\newacronym{humpback whale prey}{Humpback Whale Prey}{RECA Prince William Sound Humpback Whale Abundance & Fecundity Index_Fall} +\newacronym{humpback whale prey}{Humpback Whale Prey}{RECA Prince William Sound Humpback Whale Abundance \& Fecundity Index\_Fall} \newacronym{ia}{IA}{interim analysis} \newacronym{iattc}{IATTC}{Inter-American Tropical Tuna Commission} \newacronym{iba}{IBA}{individual bycatch accounting} @@ -470,8 +470,8 @@ \newacronym{itcz}{ITCZ}{Inter-Tropical Convergence Zone} \newacronym{itq}{ITQ}{individual transferable (or tradeable) quota} \newacronym{its}{ITS}{incidental take statement} -\newacronym{itsf}{ITSF}{NH/ME Inshore Trawl Survey_Fall} -\newacronym{itss}{ITSS}{NH/ME Inshore Trawl Survey_Spring} +\newacronym{itsf}{ITSF}{NH/ME Inshore Trawl Survey\_Fall} +\newacronym{itss}{ITSS}{NH/ME Inshore Trawl Survey\_Spring} \newacronym{iucn}{IUCN}{International Union for the Conservation of Nature} \newacronym{iuu}{IUU}{illegal, unregulated, and unreported} \newacronym{iwcps}{IWCPS}{Integrated West Coast Pelagics Survey} @@ -480,17 +480,17 @@ \newacronym{jam}{JAM}{jeopardy or adverse modification} \newacronym{jcaeas}{JCAEAS}{Johnston Cetacean and Ecosystem Assessment Survey} \newacronym{joint us and canadian integrated acoustic and trawl survey}{Joint US and Canadian Integrated Acoustic and Trawl Survey}{Integrated West Coast Pelagics Survey} -\newacronym{jspcs}{JSPCS}{Juvenile Salmon PNW Coastal_Spring} -\newacronym{juvenile sablefish tagging}{Juvenile sablefish tagging}{MESA Gulf of Alaska Sablefish Tagging_Summer} -\newacronym{juvenile sablefish tagging survey}{Juvenile Sablefish Tagging Survey}{MESA Gulf of Alaska Sablefish Tagging_Summer} -\newacronym{juvenile salmon pnw coastal survey}{Juvenile Salmon PNW Coastal Survey}{Juvenile Salmon PNW Coastal_Spring} +\newacronym{jspcs}{JSPCS}{Juvenile Salmon PNW Coastal\_Spring} +\newacronym{juvenile sablefish tagging}{Juvenile sablefish tagging}{MESA Gulf of Alaska Sablefish Tagging\_Summer} +\newacronym{juvenile sablefish tagging survey}{Juvenile Sablefish Tagging Survey}{MESA Gulf of Alaska Sablefish Tagging\_Summer} +\newacronym{juvenile salmon pnw coastal survey}{Juvenile Salmon PNW Coastal Survey}{Juvenile Salmon PNW Coastal\_Spring} \newacronym{k}{K}{time constant} \newacronym{k-a}{K-A}{Korean-American} \newacronym{kbra}{KBRA}{Klamath Basin Restoration Agreement} \newacronym{kg}{kg}{kilogram} \newacronym{kg/tow}{kg/tow}{kilograms per tow} \newacronym{kmz}{KMZ}{Klamath management zone} -\newacronym{kodiak age-0/1 pacific cod nursery habitat}{Kodiak Age-0/1 Pacific Cod Nursery Habitat}{FBEP Kodiak Nearshore Fish Survey small boat_Summer} +\newacronym{kodiak age-0/1 pacific cod nursery habitat}{Kodiak Age-0/1 Pacific Cod Nursery Habitat}{FBEP Kodiak Nearshore Fish Survey small boat\_Summer} \newacronym{krfc}{KRFC}{Klamath River fall Chinook} \newacronym{laa}{LAA}{likely to adversely affect} \newacronym{lamp}{LAMP}{Local Area Management Plan} @@ -511,7 +511,7 @@ \newacronym{loa}{LOA}{length overall} \newacronym{loc}{LOC}{letter of concurrence} \newacronym{lof}{LOF}{list of fisheries} -\newacronym{longline survey}{Longline survey}{MESA Gulf of Alaska & Eastern Bering Sea & Aleutian Islands Longline_Summer} +\newacronym{longline survey}{Longline survey}{MESA Gulf of Alaska \& Eastern Bering Sea \& Aleutian Islands Longline\_Summer} \newacronym{lps}{LPS}{Large Pelagics Survey} \newacronym{lrp}{LRP}{limit reference point} \newacronym{lvpa}{LVPA}{Large Vessel Protected Area} @@ -521,17 +521,17 @@ \newacronym{ma}{MA}{Massachusetts} \newacronym{ma seine}{MA Seine}{Nantucket Sound, Massachusetts Estuarine Seine Survey} \newacronym{mab}{MAB}{Mid-Atlantic Bight} -\newacronym{madmf fall}{MADMF Fall}{Massachusetts DMF Bottom Trawl_Fall} -\newacronym{madmf spring}{MADMF Spring}{Massachusetts DMF Bottom Trawl_Spring} +\newacronym{madmf fall}{MADMF Fall}{Massachusetts DMF Bottom Trawl\_Fall} +\newacronym{madmf spring}{MADMF Spring}{Massachusetts DMF Bottom Trawl\_Spring} \newacronym{mafmc}{MAFMC}{Mid-Atlantic Fishery Management Council} \newacronym{maibs}{MAIBS}{Marianas Archipelago Insular Bottomfish Survey} -\newacronym{main hawaiian island (mhi) insular bottomfish survey (cooperative research)}{Main Hawaiian Island (MHI) Insular Bottomfish Survey (Cooperative Research)}{Hawaiian Archipelago Insular Bottomfish Survey (Cooperative Research)} +\newacronym{main hawaiian island -mhi- insular bottomfish survey -cooperative research-}{Main Hawaiian Island (MHI) Insular Bottomfish Survey (Cooperative Research)}{Hawaiian Archipelago Insular Bottomfish Survey (Cooperative Research)} \newacronym{mairfs}{MAIRFS}{Marianas Archipelago Insular Reef Fish Survey} \newacronym{malhb}{MALHB}{Mariana Archipelago Life History Bio-sampling} \newacronym{malss}{MALSS}{Massachusetts American Lobster Settlement Survey} \newacronym{marmap reef fish survey}{MARMAP Reef Fish Survey}{MARMAP/SEAMAP South Atlantic Reef Fish (SCDNR)} -\newacronym{massachusetts division of marine fisheries fall survey}{Massachusetts Division of Marine Fisheries Fall Survey}{Massachusetts DMF Bottom Trawl_Fall} -\newacronym{massachusetts division of marine fisheries spring survey}{Massachusetts Division of Marine Fisheries Spring Survey}{Massachusetts DMF Bottom Trawl_Spring} +\newacronym{massachusetts division of marine fisheries fall survey}{Massachusetts Division of Marine Fisheries Fall Survey}{Massachusetts DMF Bottom Trawl\_Fall} +\newacronym{massachusetts division of marine fisheries spring survey}{Massachusetts Division of Marine Fisheries Spring Survey}{Massachusetts DMF Bottom Trawl\_Spring} \newacronym{mavts}{MAVTS}{Massachusetts Ventless Trap Survey} \newacronym{mbnms}{MBNMS}{Monterey Bay National Marine Sanctuary} \newacronym{mbta}{MBTA}{Migratory Bird Treaty Act} @@ -546,8 +546,8 @@ \newacronym{me}{ME}{Maine} \newacronym{mei}{MEI}{Multivariate ENSO Index} \newacronym{melss}{MELSS}{Maine American Lobster Settlement Survey} -\newacronym{menh fall}{MENH Fall}{NH/ME Inshore Trawl Survey_Fall} -\newacronym{menh spring}{MENH Spring}{NH/ME Inshore Trawl Survey_Spring} +\newacronym{menh fall}{MENH Fall}{NH/ME Inshore Trawl Survey\_Fall} +\newacronym{menh spring}{MENH Spring}{NH/ME Inshore Trawl Survey\_Spring} \newacronym{mevts}{MEVTS}{Maine Ventless Trap Survey} \newacronym{mew}{MEW}{Model Evaluation Workgroup (for salmon)} \newacronym{mey}{MEY}{maximum economic yield} @@ -555,8 +555,8 @@ \newacronym{mfmt}{MFMT}{maximum fishing mortality threshold} \newacronym{mhhw}{MHHW}{mean higher high water level (high tide line)} \newacronym{mhi}{MHI}{Main Hawaiian Islands} -\newacronym{mhiibs-1}{MHIIBS-1}{Main Hawaiian Island (MHI) Insular Bottomfish Survey_Fall} -\newacronym{mhiibs-2}{MHIIBS-2}{Main Hawaiian Island (MHI) Insular Bottomfish Survey_Spring} +\newacronym{mhiibs-1}{MHIIBS-1}{Main Hawaiian Island (MHI) Insular Bottomfish Survey\_Fall} +\newacronym{mhiibs-2}{MHIIBS-2}{Main Hawaiian Island (MHI) Insular Bottomfish Survey\_Spring} \newacronym{micaeas}{MICAEAS}{Mariana Islands Cetacean and Ecosystem Assessment Survey} \newacronym{mitt}{MITT}{Mariana Islands Training and Testing} \newacronym{mm}{mm}{millimeter} @@ -589,17 +589,17 @@ \newacronym{mus}{MUS}{management unit species} \newacronym{mw}{MW}{megawatt} \newacronym{nafo}{NAFO}{Northwest Atlantic Fisheries Organization} -\newacronym{namaapnfmv}{NAMAAPNFMV}{Northeast Area Monitoring and Assessment Program (NEAMAP)_Fall (MDMR/VIMS)} -\newacronym{namaapnsmv}{NAMAAPNSMV}{Northeast Area Monitoring and Assessment Program (NEAMAP)_Spring (MDMR/VIMS)} +\newacronym{namaapnfmv}{NAMAAPNFMV}{Northeast Area Monitoring and Assessment Program (NEAMAP)\_Fall (MDMR/VIMS)} +\newacronym{namaapnsmv}{NAMAAPNSMV}{Northeast Area Monitoring and Assessment Program (NEAMAP)\_Spring (MDMR/VIMS)} \newacronym{nao}{NAO}{NOAA Administrative Order} \newacronym{national coral reef monitoring program - american samoa/pacific remote island areas}{National Coral Reef Monitoring Program - American Samoa/Pacific Remote Island Areas}{American Samoa Reef Assessment and Monitoring Program (ASRAMP) - National Coral Reef Monitoring Program (NCRMP)} \newacronym{nbbta}{NBBTA}{Northern Bristol Bay Trawl Area} -\newacronym{nbs trawl survey}{NBS trawl survey}{GAP-SAP Northern Bering Sea Bottom Trawl_Summer} +\newacronym{nbs trawl survey}{NBS trawl survey}{GAP-SAP Northern Bering Sea Bottom Trawl\_Summer} \newacronym{nbsra}{NBSRA}{Norther Bering Sea Research Area} \newacronym{nc}{NC}{North Carolina} \newacronym{nc pss}{NC PSS}{North Carolina Pamlico Sound Trawl Survey - SEAMAP-SA} \newacronym{ncadac}{NCADAC}{National Climate Assessment and Development Advisory Committee} -\newacronym{nccneff}{NCCNEFF}{Northern California Current (NCC) Ecosystem Forecasting_Fall} +\newacronym{nccneff}{NCCNEFF}{Northern California Current (NCC) Ecosystem Forecasting\_Fall} \newacronym{nccnefssuss}{NCCNEFSSUSS}{Northern California Current (NCC) Ecosystem Forecasting Survey -- Spring Upwelling Season Survey} \newacronym{ncdc}{NCDC}{National Climatic Data Center} \newacronym{ncdenr}{NCDENR}{North Carolina Department of Environment and Natural Resources} @@ -608,22 +608,22 @@ \newacronym{ncrmp}{NCRMP}{National Coral Reef Monitoring Program} \newacronym{ne}{NE}{northeast} \newacronym{neamap}{NEAMAP}{Northeast Area Monitoring and Assessment Program} -\newacronym{neamap fall}{NEAMAP Fall}{Northeast Area Monitoring and Assessment Program (NEAMAP)_Fall (MDMR/VIMS)} -\newacronym{neamap spring}{NEAMAP Spring}{Northeast Area Monitoring and Assessment Program (NEAMAP)_Spring (MDMR/VIMS)} +\newacronym{neamap fall}{NEAMAP Fall}{Northeast Area Monitoring and Assessment Program (NEAMAP)\_Fall (MDMR/VIMS)} +\newacronym{neamap spring}{NEAMAP Spring}{Northeast Area Monitoring and Assessment Program (NEAMAP)\_Spring (MDMR/VIMS)} \newacronym{nefmc}{NEFMC}{New England Fishery Management Council} \newacronym{nefsc}{NEFSC}{Northeast Fisheries Science Center} \newacronym{nefsc shrimp}{NEFSC Shrimp}{Gulf of Maine Northern Shrimp Survey} \newacronym{nefsc winter bottom trawl survey}{NEFSC Winter Bottom Trawl Survey}{Northeast Fisheries Science Center Winter Bottom Trawl Survey} \newacronym{nelha}{NELHA}{Natural Energy Laboratory of Hawaii Authority} \newacronym{nelss}{NELSS}{New Hampshire American Lobster Settlement Survey} -\newacronym{nemef}{NEMEF}{Northeast Ecosystem Monitoring (EcoMon)_Fall} -\newacronym{nemes_1}{NEMES_1}{Northeast Ecosystem Monitoring (EcoMon)_Spring} -\newacronym{nemes_2}{NEMES_2}{Northeast Ecosystem Monitoring (EcoMon)_Summer} -\newacronym{nemew}{NEMEW}{Northeast Ecosystem Monitoring (EcoMon)_Winter} +\newacronym{nemef}{NEMEF}{Northeast Ecosystem Monitoring (EcoMon)\_Fall} +\newacronym{nemes-1}{NEMES-1}{Northeast Ecosystem Monitoring (EcoMon)\_Spring} +\newacronym{nemes-2}{NEMES-2}{Northeast Ecosystem Monitoring (EcoMon)\_Summer} +\newacronym{nemew}{NEMEW}{Northeast Ecosystem Monitoring (EcoMon)\_Winter} \newacronym{nepa}{NEPA}{National Environmental Policy Act} \newacronym{nesdis}{NESDIS}{National Environmental Satellite, Data, and Information Service} \newacronym{nfscwbts}{NFSCWBTS}{Northeast Fisheries Science Center Winter Bottom Trawl Survey} -\newacronym{nfsnatmpi}{NFSNATMPI}{Northern Fur Seal (NFS) Abundance Trend Monitoring_Pribilof Island} +\newacronym{nfsnatmpi}{NFSNATMPI}{Northern Fur Seal (NFS) Abundance Trend Monitoring\_Pribilof Island} \newacronym{nfwf}{NFWF}{National Fish and Wildlife Foundation} \newacronym{ngo}{NGO}{non-governmental organization} \newacronym{nh}{NH}{New Hampshire} @@ -656,19 +656,19 @@ \newacronym{nops}{NOPS}{Notice Of Permit Sanctions} \newacronym{nor}{NOR}{net operating revenue} \newacronym{norpac}{NORPAC}{North Pacific Database Program} -\newacronym{north pacific nearshore fish survey}{North Pacific Nearshore Fish Survey}{FBEP Kodiak Nearshore Fish Survey small boat_Summer} -\newacronym{north pacific right whale_summer}{North Pacific Right Whale_Summer}{CAEP Gulf of Alaska North Pacific Right Whale_Summer} -\newacronym{northeast area monitoring and assessment program (fall)}{Northeast Area Monitoring and Assessment Program (Fall)}{Northeast Area Monitoring and Assessment Program (NEAMAP)_Fall (MDMR/VIMS)} -\newacronym{northeast area monitoring and assessment program (spring)}{Northeast Area Monitoring and Assessment Program (Spring)}{Northeast Area Monitoring and Assessment Program (NEAMAP)_Spring (MDMR/VIMS)} -\newacronym{northeast fisheries science center atlantic surfclam and ocean quahog survey}{Northeast Fisheries Science Center Atlantic surfclam and Ocean Quahog Survey}{Atlantic Surf Clam & Ocean Quahog Dredge} -\newacronym{northeast fisheries science center fall bottom trawl survey}{Northeast Fisheries Science Center Fall Bottom Trawl Survey}{Bottom Trawl Survey_Fall} +\newacronym{north pacific nearshore fish survey}{North Pacific Nearshore Fish Survey}{FBEP Kodiak Nearshore Fish Survey small boat\_Summer} +\newacronym{north pacific right whale-summer}{North Pacific Right Whale-Summer}{CAEP Gulf of Alaska North Pacific Right Whale\_Summer} +\newacronym{northeast area monitoring and assessment program -fall-}{Northeast Area Monitoring and Assessment Program (Fall)}{Northeast Area Monitoring and Assessment Program (NEAMAP)\_Fall (MDMR/VIMS)} +\newacronym{northeast area monitoring and assessment program -spring-}{Northeast Area Monitoring and Assessment Program (Spring)}{Northeast Area Monitoring and Assessment Program (NEAMAP)\_Spring (MDMR/VIMS)} +\newacronym{northeast fisheries science center atlantic surfclam and ocean quahog survey}{Northeast Fisheries Science Center Atlantic surfclam and Ocean Quahog Survey}{Atlantic Surf Clam \& Ocean Quahog Dredge} +\newacronym{northeast fisheries science center fall bottom trawl survey}{Northeast Fisheries Science Center Fall Bottom Trawl Survey}{Bottom Trawl Survey\_Fall} \newacronym{northeast fisheries science center shrimp survey}{Northeast Fisheries Science Center Shrimp Survey}{Gulf of Maine Northern Shrimp Survey} -\newacronym{northeast fisheries science center spring bottom trawl survey}{Northeast Fisheries Science Center Spring Bottom Trawl Survey}{Bottom Trawl Survey_Spring} -\newacronym{northern bering sea bottom trawl survey}{Northern Bering Sea Bottom Trawl Survey}{GAP-SAP Northern Bering Sea Bottom Trawl_Summer} -\newacronym{northern bering sea ecosystem survey}{Northern Bering Sea Ecosystem Survey}{EMA Northern Bering Sea Ecosystem Surface Trawl_Fall} -\newacronym{northern bering sea shelf bottom trawl survey}{Northern Bering Sea Shelf Bottom Trawl Survey}{GAP-SAP Northern Bering Sea Bottom Trawl_Summer} -\newacronym{northern california current (ncc) ecosystem forecasting_fall (across fy)}{$Northern California _{current} (NCC) Ecosystem Forecasting_Fall (across FY)$}{Northern California Current (NCC) Ecosystem Forecasting_Fall} -\newacronym{northern california current (ncc) ecosystem forecasting_summer}{$Northern California _{current} (NCC) Ecosystem Forecasting_Summer$}{Northern California Current (NCC) Ecosystem Forecasting Survey -- Spring Upwelling Season Survey} +\newacronym{northeast fisheries science center spring bottom trawl survey}{Northeast Fisheries Science Center Spring Bottom Trawl Survey}{Bottom Trawl Survey\_Spring} +\newacronym{northern bering sea bottom trawl survey}{Northern Bering Sea Bottom Trawl Survey}{GAP-SAP Northern Bering Sea Bottom Trawl\_Summer} +\newacronym{northern bering sea ecosystem survey}{Northern Bering Sea Ecosystem Survey}{EMA Northern Bering Sea Ecosystem Surface Trawl\_Fall} +\newacronym{northern bering sea shelf bottom trawl survey}{Northern Bering Sea Shelf Bottom Trawl Survey}{GAP-SAP Northern Bering Sea Bottom Trawl\_Summer} +\newacronym{northern california current -ncc- ecosystem forecasting-fall -across fy-}{$Northern California _{current} (NCC) Ecosystem Forecasting-Fall (across FY)$}{Northern California Current (NCC) Ecosystem Forecasting\_Fall} +\newacronym{northern california current -ncc- ecosystem forecasting-summer}{$Northern California _{current} (NCC) Ecosystem Forecasting-Summer$}{Northern California Current (NCC) Ecosystem Forecasting Survey -- Spring Upwelling Season Survey} \newacronym{northwest fisheries science center hook and line survey}{Northwest Fisheries Science Center Hook and Line Survey}{West Coast Rockfish Hook and Line} \newacronym{northwest fisheries science center west coast groundfish bottom trawl survey}{Northwest Fisheries Science Center West Coast Groundfish Bottom Trawl Survey}{West Coast Groundfish Bottom Trawl} \newacronym{nos}{NOS}{National Ocean Service} @@ -687,7 +687,7 @@ \newacronym{nsf}{NSF}{National Science Foundation} \newacronym{nsg}{NSG}{National Standard Guidelines} \newacronym{nsrkc}{NSRKC}{Norton Sound Red King Crab} -\newacronym{nsss}{NSSS}{Northeast Sea Scallop_Summer} +\newacronym{nsss}{NSSS}{Northeast Sea Scallop\_Summer} \newacronym{nwfsc}{NWFSC}{Northwest Fisheries Science Center} \newacronym{nwhi}{NWHI}{Northwestern Hawaiian Islands} \newacronym{nwifc}{NWIFC}{Northwest Indian Fisheries Commission} @@ -725,8 +725,8 @@ \newacronym{oy}{OY}{optimum yield} \newacronym{p*}{P*}{p-star} \newacronym{pacfin}{PacFIN}{Pacific Coast Fisheries Information Network} -\newacronym{pacific coast ocean observing system (paccoos) north ca (trinidad line)}{Pacific Coast Ocean Observing System (PacCOOS) North CA (Trinidad Line)}{Trinidad Head survey line} -\newacronym{pacific coast ocean observing system (paccoos) survey}{Pacific Coast Ocean Observing System (PacCOOS) Survey}{Trinidad Head survey line} +\newacronym{pacific coast ocean observing system -paccoos- north ca -trinidad line-}{Pacific Coast Ocean Observing System (PacCOOS) North CA (Trinidad Line)}{Trinidad Head survey line} +\newacronym{pacific coast ocean observing system -paccoos- survey}{Pacific Coast Ocean Observing System (PacCOOS) Survey}{Trinidad Head survey line} \newacronym{panama city laboratory reef fish trap/video}{Panama City Laboratory Reef Fish Trap/Video}{Gulf Video Surveys} \newacronym{pbf}{PBF}{pacific bluefin tuna} \newacronym{pbr}{PBR}{potential biological removal} @@ -752,7 +752,7 @@ \newacronym{pirkc}{PIRKC}{Pribilof Islands Red King Crab} \newacronym{piro}{PIRO}{Pacific Islands Regional Office, National Marine Fisheries Service} \newacronym{planbsmooth}{PlanBsmooth}{Plan B' model using log-linear regression and Loess smoothing} -\newacronym{plankton survey}{Plankton survey}{EcoFOCI Eastern Bering Sea Ichthyoplankton_Spring} +\newacronym{plankton survey}{Plankton survey}{EcoFOCI Eastern Bering Sea Ichthyoplankton\_Spring} \newacronym{pmus}{PMUS}{Pacific Pelagic Management Unit Species} \newacronym{pnw}{PNW}{Pacific Northwest} \newacronym{poc}{POC}{point of contact} @@ -840,7 +840,7 @@ \newacronym{s-r}{S-R}{stock-recruitment curve} \newacronym{sa}{SA}{spawning abundance} \newacronym{sabis}{SABIS}{South Atlantic Bight Ichthyoplankton Survey} -\newacronym{sablefish and groundfish longline survey}{Sablefish and Groundfish Longline Survey}{MESA Gulf of Alaska & Eastern Bering Sea & Aleutian Islands Longline_Summer} +\newacronym{sablefish and groundfish longline survey}{Sablefish and Groundfish Longline Survey}{MESA Gulf of Alaska \& Eastern Bering Sea \& Aleutian Islands Longline\_Summer} \newacronym{sabm}{SABM}{South Atlantic Bight MPA} \newacronym{sadl}{SADL}{South Atlantic Deepwater Longline Survey} \newacronym{sadls}{SADLS}{South Atlantic Deepwater longline} @@ -850,10 +850,10 @@ \newacronym{samsy}{$SA_{MSY}$}{spawning abundance at MSY} \newacronym{sap}{SAP}{stock assessment panel} \newacronym{sar}{SAR}{stock assessment report} -\newacronym{sardine (northern portion)}{Sardine (Northern Portion)}{Integrated West Coast Pelagics Survey} -\newacronym{sardine (southern portion)}{Sardine (Southern Portion)}{Integrated West Coast Pelagics Survey} -\newacronym{sardine - hake acoustic trawl survey (sake)}{Sardine - Hake Acoustic Trawl Survey (SaKe)}{Integrated West Coast Pelagics Survey} -\newacronym{sardine_summer}{Sardine_Summer}{Integrated West Coast Pelagics Survey} +\newacronym{sardine - hake acoustic trawl survey -sake-}{Sardine - Hake Acoustic Trawl Survey (SaKe)}{Integrated West Coast Pelagics Survey} +\newacronym{sardine -northern portion-}{Sardine (Northern Portion)}{Integrated West Coast Pelagics Survey} +\newacronym{sardine -southern portion-}{Sardine (Southern Portion)}{Integrated West Coast Pelagics Survey} +\newacronym{sardine-summer}{Sardine-Summer}{Integrated West Coast Pelagics Survey} \newacronym{sasc}{SASC}{Stock Assessment Subcommittee} \newacronym{saw}{SAW}{stock assessment workshop} \newacronym{saw/sarc}{SAW/SARC}{The Northeast Regional Stock Assessment Workshop and Stock Assessment Review Committee, respectively} @@ -867,55 +867,55 @@ \newacronym{sbthreshold}{$SB_{threshold}$}{threshold for spawning stock biomass that indicates overfished status} \newacronym{sc}{SC}{Standing Committee of the Western and Central Pacific Fisheries Commission} \newacronym{sca}{SCA}{statistical catch at age} -\newacronym{scallop survey}{Scallop Survey}{Northeast Sea Scallop_Summer} +\newacronym{scallop survey}{Scallop Survey}{Northeast Sea Scallop\_Summer} \newacronym{scdnr}{SCDNR}{South Carolina Department of Natural Resources} \newacronym{scs}{SCS}{small coastal shark complex} \newacronym{sdc}{SDC}{status determination criteria} -\newacronym{sea scallop dredge survey}{Sea Scallop Dredge Survey}{Northeast Sea Scallop_Summer} +\newacronym{sea scallop dredge survey}{Sea Scallop Dredge Survey}{Northeast Sea Scallop\_Summer} \newacronym{seamap}{SEAMAP}{Southeast Area Monitoring and Assessment Program} -\newacronym{seamap fall groundfish survey}{SEAMAP Fall Groundfish Survey}{SEAMAP-GOM Shrimp/Groundfish Trawl_Fall} -\newacronym{seamap fall plankton survey}{SEAMAP Fall Plankton Survey}{SEAMAP Plankton_Fall} +\newacronym{seamap fall groundfish survey}{SEAMAP Fall Groundfish Survey}{SEAMAP-GOM Shrimp/Groundfish Trawl\_Fall} +\newacronym{seamap fall plankton survey}{SEAMAP Fall Plankton Survey}{SEAMAP Plankton\_Fall} \newacronym{seamap gulf of mexico reef fish}{SEAMAP Gulf of Mexico Reef Fish}{Gulf Video Surveys} -\newacronym{seamap gulf of mexico reef fish monitoring (ffwcc)}{SEAMAP Gulf of Mexico Reef Fish Monitoring (FFWCC)}{SEAMAP Gulf of Mexico Reef Fish Monitoring (partner)} -\newacronym{seamap plankton_fall (fy21)}{SEAMAP Plankton_Fall (FY21)}{SEAMAP Plankton_Fall} +\newacronym{seamap gulf of mexico reef fish monitoring -ffwcc-}{SEAMAP Gulf of Mexico Reef Fish Monitoring (FFWCC)}{SEAMAP Gulf of Mexico Reef Fish Monitoring (partner)} +\newacronym{seamap plankton-fall -fy21-}{SEAMAP Plankton-Fall (FY21)}{SEAMAP Plankton\_Fall} \newacronym{seamap reef fish camera/trap}{SEAMAP Reef Fish Camera/Trap}{Gulf Video Surveys} \newacronym{seamap shark/red snapper bottom longline}{SEAMAP Shark/Red Snapper Bottom Longline}{SEFSC Shark/Red Snapper Bottom Longline Survey} -\newacronym{seamap south atlantic coastal fall trawl survey}{SEAMAP South Atlantic Coastal Fall Trawl Survey}{SEAMAP South Atlantic Coastal Trawl_Fall (SCDNR)} -\newacronym{seamap south atlantic coastal spring trawl survey}{SEAMAP South Atlantic Coastal Spring Trawl Survey}{SEAMAP South Atlantic Coastal Trawl_Spring (SCDNR)} -\newacronym{seamap south atlantic coastal summer trawl survey}{SEAMAP South Atlantic Coastal Summer Trawl Survey}{SEAMAP South Atlantic Coastal Trawl_Summer (SCDNR)} -\newacronym{seamap south atlantic coastal trawl_spring}{SEAMAP South Atlantic Coastal Trawl_Spring}{SEAMAP South Atlantic Coastal Trawl_Spring (SCDNR)} +\newacronym{seamap south atlantic coastal fall trawl survey}{SEAMAP South Atlantic Coastal Fall Trawl Survey}{SEAMAP South Atlantic Coastal Trawl\_Fall (SCDNR)} +\newacronym{seamap south atlantic coastal spring trawl survey}{SEAMAP South Atlantic Coastal Spring Trawl Survey}{SEAMAP South Atlantic Coastal Trawl\_Spring (SCDNR)} +\newacronym{seamap south atlantic coastal summer trawl survey}{SEAMAP South Atlantic Coastal Summer Trawl Survey}{SEAMAP South Atlantic Coastal Trawl\_Summer (SCDNR)} +\newacronym{seamap south atlantic coastal trawl-spring}{SEAMAP South Atlantic Coastal Trawl-Spring}{SEAMAP South Atlantic Coastal Trawl\_Spring (SCDNR)} \newacronym{seamap south atlantic nc red drum longline}{SEAMAP South Atlantic NC Red Drum Longline}{SEAMAP-SA Red Drum Bottom Longline Survey (partner)} -\newacronym{seamap south atlantic nc red drum longline (ncdenr)}{SEAMAP South Atlantic NC Red Drum Longline (NCDENR)}{SEAMAP-SA Red Drum Bottom Longline Survey (partner)} -\newacronym{seamap spring plankton survey}{SEAMAP Spring Plankton Survey}{SEAMAP Plankton_Spring} -\newacronym{seamap summer groundfish survey}{SEAMAP Summer Groundfish Survey}{SEAMAP-GOM Shrimp/Groundfish Trawl_Summer} +\newacronym{seamap south atlantic nc red drum longline -ncdenr-}{SEAMAP South Atlantic NC Red Drum Longline (NCDENR)}{SEAMAP-SA Red Drum Bottom Longline Survey (partner)} +\newacronym{seamap spring plankton survey}{SEAMAP Spring Plankton Survey}{SEAMAP Plankton\_Spring} +\newacronym{seamap summer groundfish survey}{SEAMAP Summer Groundfish Survey}{SEAMAP-GOM Shrimp/Groundfish Trawl\_Summer} \newacronym{seamap-c reef fish survey}{SEAMAP-C Reef Fish Survey}{SEAMAP-C Reef Fish Survey (PR-DNER)} \newacronym{seamap-c spiny lobster survey}{SEAMAP-C Spiny Lobster Survey}{SEAMAP-C Spiny Lobster Visual Survey (USVI-DFW)} \newacronym{seamap-gom bottom longline survey}{SEAMAP-GOM Bottom Longline Survey}{SEAMAP - GOM Bottom Longline Survey (partner)} -\newacronym{seamap-gom bottom longline survey (adcnr)}{SEAMAP-GOM Bottom Longline Survey (ADCNR)}{SEAMAP - GOM Bottom Longline Survey (partner)} -\newacronym{seamap-gom bottom longline survey (ldwf)}{SEAMAP-GOM Bottom Longline Survey (LDWF)}{SEAMAP - GOM Bottom Longline Survey (partner)} -\newacronym{seamap-gom bottom longline survey (tpwd)}{SEAMAP-GOM Bottom Longline Survey (TPWD)}{SEAMAP - GOM Bottom Longline Survey (partner)} -\newacronym{seamap-gom bottom longline survey (usm/gcrl)}{SEAMAP-GOM Bottom Longline Survey (USM/GCRL)}{SEAMAP - GOM Bottom Longline Survey (partner)} -\newacronym{seamap-gom shrimp/groundfish trawl_fall (adcnr)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Fall (ADCNR)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Fall (partner)} -\newacronym{seamap-gom shrimp/groundfish trawl_fall (ffwcc)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Fall (FFWCC)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Fall (partner)} -\newacronym{seamap-gom shrimp/groundfish trawl_fall (gcrl)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Fall (GCRL)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Fall (partner)} -\newacronym{seamap-gom shrimp/groundfish trawl_fall (ldwf)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Fall (LDWF)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Fall (partner)} -\newacronym{seamap-gom shrimp/groundfish trawl_fall (tpwd)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Fall (TPWD)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Fall (partner)} -\newacronym{seamap-gom shrimp/groundfish trawl_fall (usm/gcrl)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Fall (USM/GCRL)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Fall (partner)} -\newacronym{seamap-gom shrimp/groundfish trawl_summer (adcnr)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Summer (ADCNR)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Summer (partner)} -\newacronym{seamap-gom shrimp/groundfish trawl_summer (ffwcc)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Summer (FFWCC)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Summer (partner)} -\newacronym{seamap-gom shrimp/groundfish trawl_summer (gcrl)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Summer (GCRL)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Summer (partner)} -\newacronym{seamap-gom shrimp/groundfish trawl_summer (ldwf)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Summer (LDWF)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Summer (partner)} -\newacronym{seamap-gom shrimp/groundfish trawl_summer (tpwd)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Summer (TPWD)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Summer (partner)} -\newacronym{seamap-gom shrimp/groundfish trawl_summer (usm/gcrl)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Summer (USM/GCRL)}{SEAMAP-GOM Shrimp/Groundfish Trawl_Summer (partner)} -\newacronym{seamap-gom vertical line survey (adcnr)}{SEAMAP-GOM Vertical Line Survey (ADCNR)}{SEAMAP Gulf of Mexico Reef Fish Monitoring (partner)} -\newacronym{seamap-gom vertical line survey (ldwf)}{SEAMAP-GOM Vertical Line Survey (LDWF)}{SEAMAP Gulf of Mexico Reef Fish Monitoring (partner)} -\newacronym{seamap-gom vertical line survey (tpwd)}{SEAMAP-GOM Vertical Line Survey (TPWD)}{SEAMAP Gulf of Mexico Reef Fish Monitoring (partner)} -\newacronym{seamap-gom vertical line survey (usm/gcrl)}{SEAMAP-GOM Vertical Line Survey (USM/GCRL)}{SEAMAP Gulf of Mexico Reef Fish Monitoring (partner)} +\newacronym{seamap-gom bottom longline survey -adcnr-}{SEAMAP-GOM Bottom Longline Survey (ADCNR)}{SEAMAP - GOM Bottom Longline Survey (partner)} +\newacronym{seamap-gom bottom longline survey -ldwf-}{SEAMAP-GOM Bottom Longline Survey (LDWF)}{SEAMAP - GOM Bottom Longline Survey (partner)} +\newacronym{seamap-gom bottom longline survey -tpwd-}{SEAMAP-GOM Bottom Longline Survey (TPWD)}{SEAMAP - GOM Bottom Longline Survey (partner)} +\newacronym{seamap-gom bottom longline survey -usm/gcrl-}{SEAMAP-GOM Bottom Longline Survey (USM/GCRL)}{SEAMAP - GOM Bottom Longline Survey (partner)} +\newacronym{seamap-gom shrimp/groundfish trawl-fall -adcnr-}{SEAMAP-GOM Shrimp/Groundfish Trawl-Fall (ADCNR)}{SEAMAP-GOM Shrimp/Groundfish Trawl\_Fall (partner)} +\newacronym{seamap-gom shrimp/groundfish trawl-fall -ffwcc-}{SEAMAP-GOM Shrimp/Groundfish Trawl-Fall (FFWCC)}{SEAMAP-GOM Shrimp/Groundfish Trawl\_Fall (partner)} +\newacronym{seamap-gom shrimp/groundfish trawl-fall -gcrl-}{SEAMAP-GOM Shrimp/Groundfish Trawl-Fall (GCRL)}{SEAMAP-GOM Shrimp/Groundfish Trawl\_Fall (partner)} +\newacronym{seamap-gom shrimp/groundfish trawl-fall -ldwf-}{SEAMAP-GOM Shrimp/Groundfish Trawl-Fall (LDWF)}{SEAMAP-GOM Shrimp/Groundfish Trawl\_Fall (partner)} +\newacronym{seamap-gom shrimp/groundfish trawl-fall -tpwd-}{SEAMAP-GOM Shrimp/Groundfish Trawl-Fall (TPWD)}{SEAMAP-GOM Shrimp/Groundfish Trawl\_Fall (partner)} +\newacronym{seamap-gom shrimp/groundfish trawl-fall -usm/gcrl-}{SEAMAP-GOM Shrimp/Groundfish Trawl-Fall (USM/GCRL)}{SEAMAP-GOM Shrimp/Groundfish Trawl\_Fall (partner)} +\newacronym{seamap-gom shrimp/groundfish trawl-summer -adcnr-}{SEAMAP-GOM Shrimp/Groundfish Trawl-Summer (ADCNR)}{SEAMAP-GOM Shrimp/Groundfish Trawl\_Summer (partner)} +\newacronym{seamap-gom shrimp/groundfish trawl-summer -ffwcc-}{SEAMAP-GOM Shrimp/Groundfish Trawl-Summer (FFWCC)}{SEAMAP-GOM Shrimp/Groundfish Trawl\_Summer (partner)} +\newacronym{seamap-gom shrimp/groundfish trawl-summer -gcrl-}{SEAMAP-GOM Shrimp/Groundfish Trawl-Summer (GCRL)}{SEAMAP-GOM Shrimp/Groundfish Trawl\_Summer (partner)} +\newacronym{seamap-gom shrimp/groundfish trawl-summer -ldwf-}{SEAMAP-GOM Shrimp/Groundfish Trawl-Summer (LDWF)}{SEAMAP-GOM Shrimp/Groundfish Trawl\_Summer (partner)} +\newacronym{seamap-gom shrimp/groundfish trawl-summer -tpwd-}{SEAMAP-GOM Shrimp/Groundfish Trawl-Summer (TPWD)}{SEAMAP-GOM Shrimp/Groundfish Trawl\_Summer (partner)} +\newacronym{seamap-gom shrimp/groundfish trawl-summer -usm/gcrl-}{SEAMAP-GOM Shrimp/Groundfish Trawl-Summer (USM/GCRL)}{SEAMAP-GOM Shrimp/Groundfish Trawl\_Summer (partner)} +\newacronym{seamap-gom vertical line survey -adcnr-}{SEAMAP-GOM Vertical Line Survey (ADCNR)}{SEAMAP Gulf of Mexico Reef Fish Monitoring (partner)} +\newacronym{seamap-gom vertical line survey -ldwf-}{SEAMAP-GOM Vertical Line Survey (LDWF)}{SEAMAP Gulf of Mexico Reef Fish Monitoring (partner)} +\newacronym{seamap-gom vertical line survey -tpwd-}{SEAMAP-GOM Vertical Line Survey (TPWD)}{SEAMAP Gulf of Mexico Reef Fish Monitoring (partner)} +\newacronym{seamap-gom vertical line survey -usm/gcrl-}{SEAMAP-GOM Vertical Line Survey (USM/GCRL)}{SEAMAP Gulf of Mexico Reef Fish Monitoring (partner)} \newacronym{seamap-sa north carolina pamlico sound trawl survey}{SEAMAP-SA North Carolina Pamlico Sound Trawl Survey}{SEAMAP South Atlantic North Carolina Pamlico Sound Trawl (NCDENR)} -\newacronym{seamap-sa red drum bottom longline survey (gadnr)}{SEAMAP-SA Red Drum Bottom Longline Survey (GADNR)}{SEAMAP-SA Red Drum Bottom Longline Survey (partner)} -\newacronym{seamap-sa red drum bottom longline survey (ncdenr)}{SEAMAP-SA Red Drum Bottom Longline Survey (NCDENR)}{SEAMAP-SA Red Drum Bottom Longline Survey (partner)} -\newacronym{seamap-sa red drum bottom longline survey (scdnr)}{SEAMAP-SA Red Drum Bottom Longline Survey (SCDNR)}{SEAMAP-SA Red Drum Bottom Longline Survey (partner)} -\newacronym{secm survey}{SECM survey}{EMA Southeast Alaska Coastal Monitoring_Summer} +\newacronym{seamap-sa red drum bottom longline survey -gadnr-}{SEAMAP-SA Red Drum Bottom Longline Survey (GADNR)}{SEAMAP-SA Red Drum Bottom Longline Survey (partner)} +\newacronym{seamap-sa red drum bottom longline survey -ncdenr-}{SEAMAP-SA Red Drum Bottom Longline Survey (NCDENR)}{SEAMAP-SA Red Drum Bottom Longline Survey (partner)} +\newacronym{seamap-sa red drum bottom longline survey -scdnr-}{SEAMAP-SA Red Drum Bottom Longline Survey (SCDNR)}{SEAMAP-SA Red Drum Bottom Longline Survey (partner)} +\newacronym{secm survey}{SECM survey}{EMA Southeast Alaska Coastal Monitoring\_Summer} \newacronym{secoora}{SECOORA}{Southeast Coastal Ocean Observing Regional Association} \newacronym{sedar}{SEDAR}{Southeast Data, Assessment, and Review} \newacronym{sefis}{SEFIS}{Southeast Fishery-Independent Survey (SEFIS)} @@ -936,14 +936,14 @@ \newacronym{sg}{SG}{snapper grouper} \newacronym{sgblsp}{SGBLSP}{SEAMAP - GOM Bottom Longline Survey (partner)} \newacronym{sgmrfmp}{SGMRFMP}{SEAMAP Gulf of Mexico Reef Fish Monitoring (partner)} -\newacronym{sgsgtf}{SGSGTF}{SEAMAP-GOM Shrimp/Groundfish Trawl_Fall} -\newacronym{sgsgtfp}{SGSGTFP}{SEAMAP-GOM Shrimp/Groundfish Trawl_Fall (partner)} -\newacronym{sgsgts}{SGSGTS}{SEAMAP-GOM Shrimp/Groundfish Trawl_Summer} -\newacronym{sgsgtsp}{SGSGTSP}{SEAMAP-GOM Shrimp/Groundfish Trawl_Summer (partner)} +\newacronym{sgsgtf}{SGSGTF}{SEAMAP-GOM Shrimp/Groundfish Trawl\_Fall} +\newacronym{sgsgtfp}{SGSGTFP}{SEAMAP-GOM Shrimp/Groundfish Trawl\_Fall (partner)} +\newacronym{sgsgts}{SGSGTS}{SEAMAP-GOM Shrimp/Groundfish Trawl\_Summer} +\newacronym{sgsgtsp}{SGSGTSP}{SEAMAP-GOM Shrimp/Groundfish Trawl\_Summer (partner)} \newacronym{sharkwg}{SHARKWG}{Shark Working Group, ISC} \newacronym{shicaeash}{SHICAEASH}{SWFSC - Hawaiian Islands Cetacean and Ecosystem Assessment Survey (HICEAS)} \newacronym{shrimp survey}{Shrimp Survey}{Gulf of Maine Northern Shrimp Survey} -\newacronym{shrimp survey (asmfc) northern shrimp}{Shrimp Survey (ASMFC) Northern Shrimp}{Gulf of Maine Northern Shrimp Survey} +\newacronym{shrimp survey -asmfc- northern shrimp}{Shrimp Survey (ASMFC) Northern Shrimp}{Gulf of Maine Northern Shrimp Survey} \newacronym{sia}{SIA}{social impact assessment} \newacronym{sir}{SIR}{supplemental information report} \newacronym{smast}{SMAST}{School for Marine Science and Technology (New Bedford, Maine)} @@ -961,23 +961,23 @@ \newacronym{sopp}{SOPP}{statement of organization, practices, and procedures} \newacronym{south atlantic bight ichthyoplankton survey}{South Atlantic Bight Ichthyoplankton Survey}{South Atlantic Bight Ichthyoplankton Survey} \newacronym{south atlantic bight mpa}{South Atlantic Bight MPA}{South Atlantic Bight MPA} -\newacronym{southeast coastal monitoring age-0 groundfish and salmon survey}{Southeast Coastal Monitoring Age-0 Groundfish and Salmon Survey}{EMA Southeast Alaska Coastal Monitoring_Summer} +\newacronym{southeast coastal monitoring age-0 groundfish and salmon survey}{Southeast Coastal Monitoring Age-0 Groundfish and Salmon Survey}{EMA Southeast Alaska Coastal Monitoring\_Summer} \newacronym{southern california hook & line survey}{Southern California Hook & Line Survey}{West Coast Rockfish Hook and Line} \newacronym{sovi}{SoVI}{social vulnerability index} \newacronym{sow}{SOW}{statement of work} \newacronym{spa}{SPA}{sanctuary preservation area} \newacronym{spc}{SPC}{Secretariat of the Pacific Community} -\newacronym{spf}{SPF}{SEAMAP Plankton_Fall} +\newacronym{spf}{SPF}{SEAMAP Plankton\_Fall} \newacronym{splash}{SPLASH}{Structure of Populations, Levels of Abundance, and Status of Humpbacks} \newacronym{spr}{SPR}{spawning potential ratio} -\newacronym{spring and fall plankton and oceanographic surveys}{Spring and Fall Plankton and Oceanographic Surveys}{EcoFOCI Eastern Bering Sea Ichthyoplankton_Spring} -\newacronym{spring bts}{Spring BTS}{Bottom Trawl Survey_Spring} -\newacronym{spring calcofi}{Spring CalCOFI}{CalCOFI_Spring} -\newacronym{spring california cooperative fisheries investigations survey}{Spring California Cooperative Fisheries Investigations Survey}{CalCOFI_Spring} +\newacronym{spring and fall plankton and oceanographic surveys}{Spring and Fall Plankton and Oceanographic Surveys}{EcoFOCI Eastern Bering Sea Ichthyoplankton\_Spring} +\newacronym{spring bts}{Spring BTS}{Bottom Trawl Survey\_Spring} +\newacronym{spring calcofi}{Spring CalCOFI}{CalCOFI\_Spring} +\newacronym{spring california cooperative fisheries investigations survey}{Spring California Cooperative Fisheries Investigations Survey}{CalCOFI\_Spring} \newacronym{spring ct lists}{Spring CT LISTS}{Spring Connecticut Department of Energy and Environmental Protection Marine Fisheries Program Long Island Sound Trawl Survey} -\newacronym{spring maine - new hampshire inshore trawl survey}{Spring Maine - New Hampshire Inshore Trawl Survey}{NH/ME Inshore Trawl Survey_Spring} -\newacronym{spring northeast fisheries science center ecosystem monitoring survey}{Spring Northeast Fisheries Science Center Ecosystem Monitoring Survey}{Northeast Ecosystem Monitoring (EcoMon)_Spring} -\newacronym{sps}{SPS}{SEAMAP Plankton_Spring} +\newacronym{spring maine - new hampshire inshore trawl survey}{Spring Maine - New Hampshire Inshore Trawl Survey}{NH/ME Inshore Trawl Survey\_Spring} +\newacronym{spring northeast fisheries science center ecosystem monitoring survey}{Spring Northeast Fisheries Science Center Ecosystem Monitoring Survey}{Northeast Ecosystem Monitoring (EcoMon)\_Spring} +\newacronym{sps}{SPS}{SEAMAP Plankton\_Spring} \newacronym{srd}{SRD}{science and research director} \newacronym{srdblsp}{SRDBLSP}{SEAMAP-SA Red Drum Bottom Longline Survey (partner)} \newacronym{srfc}{SRFC}{Sacramento River fall Chinook} @@ -989,9 +989,9 @@ \newacronym{srkwwg}{SRKWWG}{Ad Hoc Southern Resident Killer Whale Workgroup} \newacronym{srt}{SRT}{status review team} \newacronym{ss3}{SS3}{stock synthesis} -\newacronym{ssactfs}{SSACTFS}{SEAMAP South Atlantic Coastal Trawl_Fall (SCDNR)} -\newacronym{ssactss_1}{SSACTSS_1}{SEAMAP South Atlantic Coastal Trawl_Spring (SCDNR)} -\newacronym{ssactss_2}{SSACTSS_2}{SEAMAP South Atlantic Coastal Trawl_Summer (SCDNR)} +\newacronym{ssactfs}{SSACTFS}{SEAMAP South Atlantic Coastal Trawl\_Fall (SCDNR)} +\newacronym{ssactss-1}{SSACTSS-1}{SEAMAP South Atlantic Coastal Trawl\_Spring (SCDNR)} +\newacronym{ssactss-2}{SSACTSS-2}{SEAMAP South Atlantic Coastal Trawl\_Summer (SCDNR)} \newacronym{ssancpstn}{SSANCPSTN}{SEAMAP South Atlantic North Carolina Pamlico Sound Trawl (NCDENR)} \newacronym{ssbmsy}{$SSB_{MSY}$}{spawning stock biomass at MSY} \newacronym{ssbmsy proxy}{$SSB_{MSY proxy}$}{proxy value for spawning stock biomass estimation for maximum sustainable yield} @@ -1010,16 +1010,16 @@ \newacronym{star panel}{STAR Panel}{stock assessment review panel} \newacronym{std}{STD}{standard deviation} \newacronym{stdn}{STDN}{Sea Turtle Disentanglement Network} -\newacronym{steller sea lion vital rate and pup health studies}{Steller Sea Lion Vital Rate and Pup Health Studies}{AEP Gulf of Alaska/Aleutian Islands W. Stock Steller Sea Lion Vital Rates_Spring} +\newacronym{steller sea lion vital rate and pup health studies}{Steller Sea Lion Vital Rate and Pup Health Studies}{AEP Gulf of Alaska/Aleutian Islands W. Stock Steller Sea Lion Vital Rates\_Spring} \newacronym{stf}{STF}{subtropical front} \newacronym{stj}{STJ}{St. Johns, US Virgin Islands} -\newacronym{structure of populations, levels of abundance and status of humpback whales (splash)}{Structure of Populations, Levels of Abundance and Status of Humpback Whales (SPLASH)}{West Coast Marine Mammal Survey, Part 2} +\newacronym{structure of populations, levels of abundance and status of humpback whales -splash-}{Structure of Populations, Levels of Abundance and Status of Humpback Whales (SPLASH)}{West Coast Marine Mammal Survey, Part 2} \newacronym{stx}{STX}{St. Croix, US Virgin Islands} -\newacronym{summer acoustic-trawl survey}{Summer Acoustic-Trawl Survey}{MACE Eastern Bering Sea Pollock Acoustic Trawl_Summer} -\newacronym{summer calcofi}{Summer CalCOFI}{CalCOFI_Summer} -\newacronym{summer california cooperative fisheries investigations survey}{Summer California Cooperative Fisheries Investigations Survey}{CalCOFI_Summer} -\newacronym{summer northeast fisheries science center ecosystem monitoring survey}{Summer Northeast Fisheries Science Center Ecosystem Monitoring Survey}{Northeast Ecosystem Monitoring (EcoMon)_Summer} -\newacronym{summer pollock survey}{Summer Pollock Survey}{MACE Eastern Bering Sea Pollock Acoustic Trawl_Summer} +\newacronym{summer acoustic-trawl survey}{Summer Acoustic-Trawl Survey}{MACE Eastern Bering Sea Pollock Acoustic Trawl\_Summer} +\newacronym{summer calcofi}{Summer CalCOFI}{CalCOFI\_Summer} +\newacronym{summer california cooperative fisheries investigations survey}{Summer California Cooperative Fisheries Investigations Survey}{CalCOFI\_Summer} +\newacronym{summer northeast fisheries science center ecosystem monitoring survey}{Summer Northeast Fisheries Science Center Ecosystem Monitoring Survey}{Northeast Ecosystem Monitoring (EcoMon)\_Summer} +\newacronym{summer pollock survey}{Summer Pollock Survey}{MACE Eastern Bering Sea Pollock Acoustic Trawl\_Summer} \newacronym{suny}{SUNY}{State University of New York} \newacronym{surveymeans}{SURVEYMEANS}{SAS procedure for estimating characteristics of a survey population using statistics computed from a survey sample} \newacronym{sw}{SW}{Southwest} @@ -1092,17 +1092,17 @@ \newacronym{wcvi}{WCVI}{West Coast Vancouver Island} \newacronym{wdfw}{WDFW}{Washington Department of Fish and Wildlife} \newacronym{west coast fin whale population structure}{West Coast Fin Whale Population Structure}{West Coast Marine Mammal Survey, Part 2} -\newacronym{west coast groundfish bottom trawl_fall}{West Coast Groundfish Bottom Trawl_Fall}{West Coast Groundfish Bottom Trawl} -\newacronym{west coast groundfish bottom trawl_spring}{West Coast Groundfish Bottom Trawl_Spring}{West Coast Groundfish Bottom Trawl} +\newacronym{west coast groundfish bottom trawl-fall}{West Coast Groundfish Bottom Trawl-Fall}{West Coast Groundfish Bottom Trawl} +\newacronym{west coast groundfish bottom trawl-spring}{West Coast Groundfish Bottom Trawl-Spring}{West Coast Groundfish Bottom Trawl} \newacronym{west coast pelagic fish survey}{West Coast Pelagic Fish Survey}{Integrated West Coast Pelagics Survey} \newacronym{wets}{WETS}{wave energy test site} \newacronym{wfoa}{WFOA}{Western Fishboat Owners Association} \newacronym{wgoa}{WGOA}{Western Gulf of Alaska} \newacronym{wham}{WHAM}{Woods Hole Assessment Model} \newacronym{whoi}{WHOI}{Woods Hole Oceanographic Institute, MA} -\newacronym{winter calcofi}{Winter CalCOFI}{CalCOFI_Winter} -\newacronym{winter california cooperative fisheries investigations survey}{Winter California Cooperative Fisheries Investigations Survey}{CalCOFI_Winter} -\newacronym{winter northeast fisheries science center ecosystem monitoring survey}{Winter Northeast Fisheries Science Center Ecosystem Monitoring Survey}{Northeast Ecosystem Monitoring (EcoMon)_Winter} +\newacronym{winter calcofi}{Winter CalCOFI}{CalCOFI\_Winter} +\newacronym{winter california cooperative fisheries investigations survey}{Winter California Cooperative Fisheries Investigations Survey}{CalCOFI\_Winter} +\newacronym{winter northeast fisheries science center ecosystem monitoring survey}{Winter Northeast Fisheries Science Center Ecosystem Monitoring Survey}{Northeast Ecosystem Monitoring (EcoMon)\_Winter} \newacronym{wpacfin}{WPacFIN}{Western Pacific Fishery Information Network, NMFS} \newacronym{wpfmc}{WPFMC}{Western Pacific Regional Fishery Management Council} \newacronym{wpue}{WPUE}{weight per unit effort} diff --git a/inst/resources/affiliation_info.csv b/inst/resources/affiliation_info.csv index 4f0d341c..2ec87b7c 100644 --- a/inst/resources/affiliation_info.csv +++ b/inst/resources/affiliation_info.csv @@ -1,9 +1,9 @@ affiliation,office,name,address,city,state,country,postal-code AFSC-NOR,AFSC,NOAA Fisheries Alaska Fisheries Science Center,2032 SE OSU Drive Building 955,Newport,OR,U.S.A.,97365-2097 -AFSC-SWA,AFSC,NOAA Fisheries Alaska Fisheries Science Center,2725 Montlake Boulevard East,Seattle,WA,U.S.A.,98112-2097 +AFSC-SWA-montlake,AFSC,NOAA Fisheries Alaska Fisheries Science Center,2725 Montlake Boulevard East,Seattle,WA,U.S.A.,98112-2097 AFSC-JAK,AFSC,NOAA Fisheries Alaska Fisheries Science Center,17109 Point Lena Loop Road,Juneau,AK,U.S.A.,99801 AFSC,AFSC,NOAA Fisheries Alaska Fisheries Science Center,17109 Point Lena Loop Road,Juneau,AK,U.S.A.,99801 -AFSC-WA,AFSC,NOAA Fisheries Alaska Fisheries Science Center,7600 Sand Point Way N.E.,Seattle,WA,U.S.A.,98115 +AFSC-SWA-sand,AFSC,NOAA Fisheries Alaska Fisheries Science Center,7600 Sand Point Way N.E.,Seattle,WA,U.S.A.,98115 AFSC-ABL,AFSC,NOAA Fisheries Alaska Fisheries Science Center,17109 Point Lena Loop Road,Juneau,AK,U.S.A.,99801 CDFW,CDFW,California Department of Fish and Wildlife,"1123 Industrial Rd., Suite 300",San Carlos,CA,U.S.A.,94070 CDFW-SB,CDFW,California Department of Fish and Wildlife Marine Region,"1933 Cliff Drive, Suite 9",Santa Barbara,CA,U.S.A.,93109 diff --git a/inst/templates/safe/01c_plan-team.qmd b/inst/templates/safe/01c_plan-team.qmd index fead1e20..d1af6b2b 100644 --- a/inst/templates/safe/01c_plan-team.qmd +++ b/inst/templates/safe/01c_plan-team.qmd @@ -5,29 +5,33 @@ ```{r} #| eval: false #| echo: false +# install.packages("devtools") +# devtools::install_github("BenWilliams-NOAA/safe") + +year <- format(Sys.time(), "%Y") + ptdata <- safe::ptdata -flextable::font( - flextable::footnote(flextable::flextable(ptdata), - j = 3, part = "header", ref_symbols = "1", - value = flextable::as_paragraph("Total biomass (age 4+) estimates from age-structured model.") - ), - fontname = "Times New Roman", - part = "all" -) %>% - flextable::footnote( - i = 2, j = 7, part = "body", ref_symbols = "2", - value = flextable::as_paragraph( - flextable::as_chunk(paste0(paste0("Current as of ", date, " . Source: NMFS Alaska Regional Office Catch Accounting System -via the AKFIN database (http://www.akfin.org)."))) - ) - ) %>% - flextable::set_formatter(Year = function(x) sprintf("%s", x)) %>% - flextable::merge_at(i = 1:4, j = 1) %>% - flextable::hrule(rule = "exact") %>% - flextable::hline_top(part = "all") %>% - flextable::hline_bottom() %>% - flextable::fix_border_issues() +ptdata |> + gt::gt() |> + gt::tab_footnote( + footnote = "Total biomass (age 4+) estimates from age-structured model.", + locations = gt::cells_column_labels(columns = Biomass) + ) |> + gt::tab_footnote( + footnote = paste0("Current as of ", year, ". Source: NMFS Alaska Regional Office Catch Accounting System +via the AKFIN database (http://www.akfin.org)."), + locations = cells_column_labels(columns = Catch) + ) |> + gt::fmt_integer(columns = Year, sep_mark = "") |> + gt::fmt_integer(columns = Biomass:Catch, sep_mark = ",") |> + gt::tab_options( + column_labels.font.weight = "bold", + table_body.hlines.style = "none" + ) |> + gt::sub_missing( + missing_text = "" + ) ``` {{< pagebreak >}} @@ -37,51 +41,43 @@ via the AKFIN database (http://www.akfin.org)."))) #| echo: false ptdata2 <- safe::ptdata2 -flextable::font( - flextable::footnote(flextable::flextable(ptdata2[-1, ]), - j = 6, part = "header", ref_symbols = "2", - value = flextable::as_paragraph(flextable::as_chunk( - paste0(paste0( - "Current as of ", date, - " . Source: NMFS Alaska Regional Office Catch Accounting System -via the AKFIN database (http://www.akfin.org)." - )) - )) - ), - fontname = "Times New Roman", - part = "all" -) %>% - flextable::add_header(values = ptdata2[1, ]) %>% - flextable::border_remove() %>% - flextable::merge_at(j = 1) %>% - flextable::compose( - i = 1, j = 3:6, - value = flextable::as_paragraph(as.character(year - 1)), - part = "header" - ) %>% - flextable::compose( - i = 1, j = 7:8, - value = flextable::as_paragraph(as.character(year)), - part = "header" - ) %>% - flextable::compose( - i = 1, j = 9:10, - value = flextable::as_paragraph(as.character(year + 1)), - part = "header" - ) %>% - flextable::merge_at(i = 1, j = 3:6, part = "header") %>% - flextable::merge_at(i = 1, j = 7:8, part = "header") %>% - flextable::merge_at(i = 1, j = 9:10, part = "header") %>% - flextable::align(i = 1, part = "header", align = "center") %>% - flextable::compose( - i = 2, j = 7:10, - value = flextable::as_paragraph(rep(c("ABC", "OFL"), 2)), - part = "header" - ) %>% - flextable::hline_top(part = "body") %>% - flextable::hline_top(part = "header") %>% - flextable::vline(j = c(2, 6, 8)) %>% - flextable::hline_bottom(part = "body") %>% - flextable::fix_border_issues(part = "all") %>% - flextable::set_table_properties(width = .5, layout = "autofit") +year <- format(Sys.time(), "%Y") +date <- Sys.Date() + +yr_prev <- ptdata2[1, 3] # "2021" +yr_curr <- ptdata2[1, 7] # "2022" +yr_next <- ptdata2[1, 9] # "2023" + +ptdata2[-1, ] |> + gt::gt() |> + gt::tab_options( + column_labels.font.weight = "bold", + table_body.hlines.style = "none" + ) |> + gt::cols_label( + OFL = paste(yr_prev, "OFL"), + ABC = paste(yr_prev, "ABC"), + TAC = paste(yr_prev, "TAC"), + Catch = paste(yr_prev, "Catch"), + OFL.1 = paste(yr_curr, "ABC"), + ABC.1 = paste(yr_curr, "OFL"), + OFL.2 = paste(yr_next, "ABC"), + ABC.2 = paste(yr_next, "OFL") + ) |> + gt::tab_footnote( + footnote = paste0("Current as of ", date, ". Source: NMFS Alaska Regional Office Catch Accounting System via the AKFIN database (http://www.akfin.org)."), + locations = cells_column_labels(columns = 6) + ) |> + gt::fmt_integer() |> + gt::cols_align(align = "center", columns = 3:10) |> + gt::cols_align(align = "left", columns = 1:2) |> + gt::sub_missing( + missing_text = "" + ) |> + gt::tab_style( + style = cell_borders(sides = "right", color = "mediumgrey", weight = px(2)), + locations = list( + cells_body(columns = c(6, 8)), + cells_column_labels(columns = c(6, 8)) + ) ) ``` diff --git a/inst/templates/safe/05_data.qmd b/inst/templates/safe/05_data.qmd index ebbcd6bd..7ca3c533 100644 --- a/inst/templates/safe/05_data.qmd +++ b/inst/templates/safe/05_data.qmd @@ -32,15 +32,12 @@ data.frame( "1991-1997, 2003, 2007, 2009, 2011, 2013, 2015, 2017, 2019" ) ) |> - flextable::flextable() |> - flextable::width(j = ~Source, width = 1) |> - flextable::width(j = ~Data, width = 1.5) |> - flextable::width(j = ~Years, width = 4) |> - flextable::merge_v(j = 1) |> - flextable::font(fontname = "Times", part = "all") |> - flextable::fontsize(size = 10) |> - flextable::theme_vanilla() |> - flextable::fix_border_issues() + gt::gt() |> + gt::cols_width( + Source ~ px(100), + Data ~ px(150), + Years ~ px(400) + ) ``` ## Fishery diff --git a/man/ID_tbl_length_class.Rd b/man/ID_tbl_length_class.Rd new file mode 100644 index 00000000..8ff82d41 --- /dev/null +++ b/man/ID_tbl_length_class.Rd @@ -0,0 +1,30 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ID_tbl_length_class.R +\name{ID_tbl_length_class} +\alias{ID_tbl_length_class} +\title{Identify table length class} +\usage{ +ID_tbl_length_class(tables_dir, plot_name) +} +\arguments{ +\item{tables_dir}{The location of the "tables" folder, which contains tables +files.} + +\item{plot_name}{Name of the .rda file containing the table} +} +\value{ +The length class of a table: regular or long. The result +will determine whether the table can be rendered on a page +as-is, or if it needs to be split across multiple pages. +} +\description{ +Identify table length class +} +\examples{ +\dontrun{ +ID_tbl_length_class( + plot_name = "indices.abundance_table.rda", + tables_dir = here::here() +) +} +} diff --git a/man/ID_tbl_width_class.Rd b/man/ID_tbl_width_class.Rd index 35de7dd8..da234fdb 100644 --- a/man/ID_tbl_width_class.Rd +++ b/man/ID_tbl_width_class.Rd @@ -19,7 +19,7 @@ be resized, rotated, and/or split across multiple pages.} } \value{ The width class of a table: regular, wide, or extra-wide. The result -will determine whether the table that can be rendered on a portrait page +will determine whether the table can be rendered on a portrait page as-is, or if it needs to be resized, rotated, and/or split across multiple pages. } \description{ diff --git a/man/export_split_tbls.Rd b/man/export_split_tbls.Rd index dcd184f7..245bfa7f 100644 --- a/man/export_split_tbls.Rd +++ b/man/export_split_tbls.Rd @@ -18,7 +18,7 @@ files.} \item{essential_columns}{The columns that will be retained between the split tables, formatted as a sequence (e.g., 1:2 for columns 1-2, or 1 for a single -column. Example: for the indices table, this could be the year column.} +column). Example: for the indices table, this could be the year column.} } \value{ The number of split tables diff --git a/man/gt_split.Rd b/man/gt_split.Rd new file mode 100644 index 00000000..c04cd18c --- /dev/null +++ b/man/gt_split.Rd @@ -0,0 +1,106 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils.R +\name{gt_split} +\alias{gt_split} +\title{Split a table into a group of tables (a \code{gt_group})} +\usage{ +gt_split(data, row_every_n = NULL, row_slice_i = NULL, col_slice_at = NULL) +} +\arguments{ +\item{data}{\emph{The gt table data object} + +\verb{obj:} // \strong{required} + +This is the \strong{gt} table object that is commonly created through use of the +\code{\link[gt:gt]{gt::gt()}} function.} + +\item{row_every_n}{\emph{Split at every n rows} + +\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) + +A directive to split at every \emph{n} number of rows. This argument expects a +single numerical value.} + +\item{row_slice_i}{\emph{Row-slicing indices} + +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) + +An argument for splitting at specific row indices. Here, we expect either a +vector of index values or a function that evaluates to a numeric vector.} + +\item{col_slice_at}{\emph{Column-slicing locations} + +\verb{} // \emph{default:} \code{NULL} (\code{optional}) + +Any columns where vertical splitting across should occur. The splits occur +to the right of the resolved column names. Can either be a series of column +names provided in \code{c()}, a vector of column indices, or a select helper +function (e.g. \link[gt]{starts_with}, \link[gt]{ends_with}, \link[gt]{contains}, \link[gt]{matches}, +\link[gt]{num_range}, and \link[gt]{everything}).} +} +\value{ +An object of class \code{gt_group}. +} +\description{ +With a \strong{gt} table, you can split it into multiple tables and get that +collection in a \code{gt_group} object. This function is useful for those cases +where you want to section up a table in a specific way and print those +smaller tables across multiple pages (in RTF and Word outputs, primarily via +\link[gt]{gtsave}, or, with breaks between them when the output context is HTML. +} +\note{ +This function is a temporary export of asar, but all development and rights +belong to \code{rstudio/gt}. This function provides a fix to the function +introduced by a bug in gt v1.3.0. Until this is corrected in the package, we +are using the function here. Once this bug is patched, we will deprecate +and remove this function from asar and direct users to use the gt package +version of this function. +} +\section{Examples}{ + + +Use a subset of the \code{\link[gt:gtcars]{gt::gtcars}} dataset to create a \strong{gt} table. Format the +\code{msrp} column to display numbers as currency values, set column widths with +\link[gt]{cols_width}, and split the table at every five rows with \code{gt_split()}. +This creates a \code{gt_group} object containing two tables. Printing this object +yields two tables separated by a line break. + +\if{html}{\out{
}}\preformatted{gtcars |> + dplyr::slice_head(n = 10) |> + dplyr::select(mfr, model, year, msrp) |> + gt() |> + fmt_currency(columns = msrp) |> + cols_width( + year ~ px(80), + everything() ~ px(150) + ) |> + gt_split(row_every_n = 5) +}\if{html}{\out{
}} + +Use a smaller subset of the \code{\link[gt:gtcars]{gt::gtcars}} dataset to create a \strong{gt} table. +Format the \code{msrp} column to display numbers as currency values, set the table +width with \code{\link[gt:tab_options]{gt::tab_options()}} and split the table at the \code{model} column This +creates a \code{gt_group} object again containing two tables but this time we get +a vertical split. Printing this object yields two tables of the same width. + +\if{html}{\out{
}}\preformatted{gtcars |> + dplyr::slice_head(n = 5) |> + dplyr::select(mfr, model, year, msrp) |> + gt() |> + fmt_currency(columns = msrp) |> + tab_options(table.width = px(400)) |> + gt_split(col_slice_at = "model") +}\if{html}{\out{
}} +} + +\section{Function ID}{ + +14-2 +} + +\section{Function Introduced}{ + +\code{v0.9.0} (Mar 31, 2023) +} + +\concept{table group functions} diff --git a/man/render_lg_table.Rd b/man/render_lg_table.Rd index 8b4229e2..d8f39174 100644 --- a/man/render_lg_table.Rd +++ b/man/render_lg_table.Rd @@ -4,14 +4,14 @@ \alias{render_lg_table} \title{Split an extra-wide table into multiple tables} \usage{ -render_lg_table(report_flextable, essential_columns, tables_dir, plot_name) +render_lg_table(report_gt, essential_columns, tables_dir, plot_name) } \arguments{ -\item{report_flextable}{The extra-wide flextable.} +\item{report_gt}{The extra-wide gt table.} \item{essential_columns}{The columns that will be retained between the split tables, formatted as a sequence (e.g., 1:2 for columns 1-2, or 1 for a single -column. Example: for the indices table, this could be the year column.} +column). Example: for the indices table, this could be the year column.} \item{tables_dir}{The location of the "tables" folder, which contains tables files.} @@ -27,14 +27,14 @@ Split an extra-wide table into multiple tables \examples{ \dontrun{ render_lg_table( - report_flextable = indices_table, + report_gt = indices_table, essential_columns = 1, tables_dir = here::here(), plot_name = "indices.abundance_table.rda" ) render_lg_table( - report_flextable = important_table, + report_gt = important_table, essential_columns = 1:3, tables_dir = "data", plot_name = "bnc_table.rda" diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index 7c77b5e7..4c3040ee 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -6,6 +6,12 @@ navbar: home: icon: fas fa-home fa-lg href: index.html + + overview: + text: Project Overview + icon: fas fa-info-circle + href: workflows-one-pager.pdf + target: "_blank" reference: text: Functions diff --git a/pkgdown/assets/asar_cheatsheet.pdf b/pkgdown/assets/asar_cheatsheet.pdf index 9e29527e..d988951f 100644 Binary files a/pkgdown/assets/asar_cheatsheet.pdf and b/pkgdown/assets/asar_cheatsheet.pdf differ diff --git a/pkgdown/assets/workflows-one-pager.pdf b/pkgdown/assets/workflows-one-pager.pdf new file mode 100644 index 00000000..70d474fa Binary files /dev/null and b/pkgdown/assets/workflows-one-pager.pdf differ diff --git a/tests/testthat/test-ID_tbl_length_class.R b/tests/testthat/test-ID_tbl_length_class.R new file mode 100644 index 00000000..362a4ff8 --- /dev/null +++ b/tests/testthat/test-ID_tbl_length_class.R @@ -0,0 +1,103 @@ +test_that("Table length calculated correctly for regular table", { + # make sample dataset + library(gt) + test_table <- data.frame( + year = rep(seq(1987, 2000, 1), times = 3), + estimate = rep(rnorm(42, mean = 1000, sd = 100)), + label = rep(c("spawning_biomass", "catch", "abundance"), each = 14) + ) |> + tidyr::pivot_wider(id_cols = year, names_from = label, values_from = estimate) |> + gt() + + rda <- list( + "table" = test_table, + "caption" = "test_caption" + ) + + tbl_path <- fs::path(getwd(), "tables") + dir.create(tbl_path) + save(rda, file = fs::path(getwd(), "tables", "indices.abundance_table.rda")) + + # regular length + tbl_width <- ID_tbl_length_class( + plot_name = "indices.abundance", + tables_dir = getwd() + ) + + expected_output <- "regular" + expect_equal(tbl_width, expected_output) + + # erase temporary testing files + unlink(tbl_path, recursive = T) +}) + +test_that("Table lengths calculated correctly for a long table", { + # make sample dataset + library(gt) + test_table <- data.frame( + species = sample(c("Tuna", "Cod", "Trout", "Salmon"), 20, replace = TRUE), + location = c( + "Providence_Rhode_Island", + "Narragansett_Bay", + "Point_Judith_Pond", + "Block_Island_Sound", + "Cape_Cod_Bay", + "Georges_Bank", + "Gulf_of_Maine", + "Montauk_New_York", + "Hudson_Canyon", + "Long_Island_Sound", + "Chesapeake_Bay", + "Outer_Banks_NC", + "Florida_Keys", + "Gulf_of_Mexico", + "Monterey_Bay_CA", + "Puget_Sound_WA", + "Kodiak_Alaska", + "Bering_Sea", + "Hawaiian_Islands", + "Sargasso_Sea", + "Buzzards_Bay_MA", + "Stellwagen_Bank", + "Vineyard_Sound", + "Great_South_Channel", + "Casco_Bay_Maine", + "Grand_Banks", + "Scotian_Shelf", + "Delaware_Bay", + "Pamlico_Sound_NC", + "Charleston_Bump_SC", + "Gray_Reef_GA", + "St_Johns_River_FL", + "Mobile_Bay_AL", + "Flower_Garden_Banks", + "Channel_Islands_CA", + "Columbia_River_Estuary", + "Gulf_of_the_Farallones", + "Aleutian_Islands", + "Chukchi_Sea", + "Beaufort_Sea" + ) + ) |> + gt() + + rda <- list( + "table" = test_table, + "caption" = "test_caption" + ) + + tbl_path <- fs::path(getwd(), "tables") + dir.create(tbl_path) + save(rda, file = fs::path(getwd(), "tables", "bnc_table.rda")) + + tbl_width2 <- ID_tbl_length_class( + plot_name = "bnc", + tables_dir = getwd() + ) + + expected_output <- "long" + expect_equal(tbl_width2, expected_output) + + # erase temporary testing files + unlink(tbl_path, recursive = T) +}) diff --git a/tests/testthat/test-ID_tbl_width_class.R b/tests/testthat/test-ID_tbl_width_class.R index 8e15f8c1..86d3e19e 100644 --- a/tests/testthat/test-ID_tbl_width_class.R +++ b/tests/testthat/test-ID_tbl_width_class.R @@ -1,13 +1,13 @@ test_that("Table widths calculated correctly for wide table", { # make sample dataset - library(flextable) + library(gt) test_table <- data.frame( year = rep(seq(1987, 2024, 1), times = 3), estimate = rep(rnorm(38, mean = 1000, sd = 100), times = 6), label = rep(c("spawning_biomass", "catch", "abundance", "new_col1", "new_col2", "new_col3"), each = 38) ) |> tidyr::pivot_wider(id_cols = year, names_from = label, values_from = estimate) |> - flextable() + gt() rda <- list( "table" = test_table, @@ -34,7 +34,7 @@ test_that("Table widths calculated correctly for wide table", { test_that("Table widths calculated correctly for extra-wide table", { # make sample dataset - library(flextable) + library(gt) test_table <- data.frame( species = sample(c("Tuna", "Cod", "Trout", "Salmon"), 20, replace = TRUE), location = c( @@ -62,7 +62,7 @@ test_that("Table widths calculated correctly for extra-wide table", { is_tagged = sample(c(TRUE, FALSE), 20, replace = TRUE) ) |> tidyr::pivot_wider(id_cols = species, names_from = location, values_from = is_tagged) |> - flextable() + gt() rda <- list( "table" = test_table, diff --git a/tests/testthat/test-create_tables_doc.R b/tests/testthat/test-create_tables_doc.R index 9bdbbcde..2429cd3f 100644 --- a/tests/testthat/test-create_tables_doc.R +++ b/tests/testthat/test-create_tables_doc.R @@ -33,56 +33,56 @@ test_that("Creates expected start of nearly empty tables doc", { # "fixtures", "ss3_models_converted", "Hake_2018", # "std_output.rda" # )) -# +# # stockplotr::table_landings(out_new, # make_rda = TRUE # ) -# +# # # create tables doc # create_tables_doc( # subdir = getwd(), # tables_dir = getwd() # ) -# +# # # read in tables doc # table_content <- readLines("08_tables.qmd") # # extract first 7 lines # head_table_content <- head(table_content, 7) # # remove line numbers and collapse # fc_pasted <- paste(head_table_content, collapse = "") -# +# # # expected tables doc head # expected_head_table_content <- "# Tables {#sec-tables} ```{r} #| label: 'set-rda-dir-tbls'#| echo: false #| warning: false #| include: false" -# +# # # test expectation of start of tables doc # testthat::expect_equal( # fc_pasted, # expected_head_table_content # ) -# +# # # erase temporary testing files # file.remove(fs::path(getwd(), "08_tables.qmd")) # file.remove(fs::path(getwd(), "captions_alt_text.csv")) # unlink(fs::path(getwd(), "tables"), recursive = T) # }) - +# # test_that("Throws warning if chunks with identical labels", { # # load sample dataset # load(file.path( # "fixtures", "ss3_models_converted", "Hake_2018", # "std_output.rda" # )) -# +# # stockplotr::table_landings(out_new, # make_rda = TRUE # ) -# +# # # create tables doc # create_tables_doc( # subdir = getwd(), # tables_dir = getwd() # ) -# +# # expect_message( # create_tables_doc( # subdir = getwd(), @@ -90,51 +90,51 @@ test_that("Creates expected start of nearly empty tables doc", { # ), # "Tables doc will not render if chunks have identical labels." # ) -# +# # # erase temporary testing files # file.remove(fs::path(getwd(), "08_tables.qmd")) # file.remove(fs::path(getwd(), "captions_alt_text.csv")) # unlink(fs::path(getwd(), "tables"), recursive = T) # }) - +# # test_that("Formerly empty tables doc renders correctly", { # # create empty tables doc # create_template() -# +# # # load sample dataset # load(file.path( # "fixtures", "ss3_models_converted", "Hake_2018", # "std_output.rda" # )) -# +# # stockplotr::table_landings( # dat = out_new, # make_rda = TRUE, -# module = "TIME_SERIES" +# module = "CATCH" # ) -# +# # # rerender tables doc, appending new table # create_tables_doc( # subdir = file.path(getwd(), "report"), # tables_dir = getwd() # ) -# +# # # read in tables doc # table_content <- readLines(file.path(getwd(), "report", "08_tables.qmd")) # # extract first 8 lines # head_table_content <- head(table_content, 8) # # remove line numbers and collapse # fc_pasted <- paste(head_table_content, collapse = "") -# +# # # expected tables doc head -# expected_head_table_content <- "# Tables {#sec-tables} ```{r} #| label: 'set-rda-dir-figs'#| echo: false #| warnings: false #| eval: true" -# +# expected_head_table_content <- "# Tables {#sec-tables} ```{r} #| label: 'set-rda-dir-tbls'#| echo: false #| warning: false #| include: false" +# # # test expectation of start of tables doc # expect_equal( # fc_pasted, # expected_head_table_content # ) -# +# # # erase temporary testing files # file.remove(fs::path(getwd(), "08_tables.qmd")) # file.remove(fs::path(getwd(), "captions_alt_text.csv")) diff --git a/tests/testthat/test-export_split_tbls.R b/tests/testthat/test-export_split_tbls.R index 47987b62..d55434e1 100644 --- a/tests/testthat/test-export_split_tbls.R +++ b/tests/testthat/test-export_split_tbls.R @@ -1,34 +1,86 @@ -# test_that("Number of split tables is calculated correctly for converted bam model", { -# # read in sample dataset -# dat <- utils::read.csv( -# file = fs::path("fixtures", "bam_models_converted", "bsb_conout.csv") +# test_that("Number of split tables is calculated correctly for 1 table", { +# library(gt) +# load(file.path( +# "fixtures", "ss3_models_converted", "Hake_2018", +# "std_output.rda" +# )) +# +# stockplotr::table_landings(out_new, +# module = "CATCH", +# make_rda = TRUE # ) -# -# # bam model with table split into 2 -# stockplotr::table_indices(dat, -# make_rda = TRUE +# +# +# # indices table +# num_tabs <- export_split_tbls( +# tables_dir = getwd(), +# plot_name = "landings_table.rda", +# essential_columns = 1 +# ) +# +# # expect 1 table +# expected_output <- 1 +# expect_equal(num_tabs, expected_output) +# +# # erase temporary testing files +# file.remove(fs::path(getwd(), "captions_alt_text.csv")) +# unlink(fs::path(getwd(), "tables"), recursive = T) +# }) +# +# +# test_that("Number of split tables is calculated correctly for 3 tables", { +# library(gt) +# load(file.path( +# "fixtures", "ss3_models_converted", "Hake_2018", +# "std_output.rda" +# )) +# +# stockplotr::table_landings(out_new, +# module = "CATCH", +# make_rda = TRUE # ) -# +# +# load(file.path("tables", "landings_table.rda")) +# +# wider_df <- cbind( +# rda$table$`_data`, +# data.frame( +# Col1 = 1:52, +# Col2 = 52:103, +# Col3 = 104:155, +# Col4 = 156:207, +# Col5 = 208:259, +# Col6 = 260:311, +# Col7 = 312:363, +# Col8 = 364:415 +# ) +# ) |> +# gt() +# +# rda$table <- wider_df +# save(rda, file = file.path(getwd(), "tables", "landings_table.rda")) +# # # indices table # num_tabs <- export_split_tbls( # tables_dir = getwd(), -# plot_name = "indices.abundance_table.rda", +# plot_name = "landings_table.rda", # essential_columns = 1 # ) -# -# # expect 2 tables -# expected_output <- 2 +# +# # expect 3 tables +# expected_output <- 3 # expect_equal(num_tabs, expected_output) -# -# # expect to see an "indices.abundance_table_split.rda" file -# expect_no_error("indices.abundance_table_split.rda" %in% list.files(file.path("tables"))) -# +# +# # expect to see an "landings_table_split.rda" file +# expect_no_error("landings_table_split.rda" %in% list.files(file.path("tables"))) +# # # expect that an object "table_list" imported into environment -# expect_no_error(load(file.path("tables", "indices.abundance_table_split.rda"))) -# -# expect_equal(length(table_list), 2) -# +# expect_no_error(load(file.path("tables", "landings_table_split.rda"))) +# +# expect_equal(length(table_list), 3) +# # # erase temporary testing files # file.remove(fs::path(getwd(), "captions_alt_text.csv")) # unlink(fs::path(getwd(), "tables"), recursive = T) +# # }) diff --git a/tests/testthat/test-render_lg_table.R b/tests/testthat/test-render_lg_table.R index d4b799e2..a7fad84e 100644 --- a/tests/testthat/test-render_lg_table.R +++ b/tests/testthat/test-render_lg_table.R @@ -1,30 +1,33 @@ test_that("accurate number of split tables identified", { + library(gt) # make very wide table ft <- as.data.frame(faithful) |> t() |> as.data.frame() |> dplyr::select(1:50) |> - flextable::flextable() + gt::gt() dir.create("tables") # 0 essential columns - tables_test1 <- render_lg_table(ft, + tables_test1 <- render_lg_table( + report_gt = ft, essential_columns = 0, tables_dir = getwd(), plot_name = "test_plot1.rda" ) - expect_equal(tables_test1, 5) + expect_equal(tables_test1, 10) # 2 essential columns - tables_test2 <- render_lg_table(ft, + tables_test2 <- render_lg_table( + report_gt = ft, essential_columns = 1:2, tables_dir = getwd(), plot_name = "test_plot2.rda" ) - expect_equal(tables_test2, 5) + expect_equal(tables_test2, 16) # make very very wide table @@ -32,7 +35,7 @@ test_that("accurate number of split tables identified", { t() |> as.data.frame() |> dplyr::select(1:70) |> - flextable::flextable() + gt::gt() # 0 essential columns tables_test3 <- render_lg_table(ft, @@ -41,7 +44,7 @@ test_that("accurate number of split tables identified", { plot_name = "test_plot3.rda" ) - expect_equal(tables_test3, 7) + expect_equal(tables_test3, 14) # 3 essential columns tables_test4 <- render_lg_table(ft, @@ -50,7 +53,7 @@ test_that("accurate number of split tables identified", { plot_name = "test_plot4.rda" ) - expect_equal(tables_test4, 7) + expect_equal(tables_test4, 34) # make slightly wide table @@ -58,7 +61,7 @@ test_that("accurate number of split tables identified", { t() |> as.data.frame() |> dplyr::select(1:20) |> - flextable::flextable() + gt::gt() # 0 essential columns tables_test5 <- render_lg_table(ft, @@ -67,7 +70,7 @@ test_that("accurate number of split tables identified", { plot_name = "test_plot5.rda" ) - expect_equal(tables_test5, 2) + expect_equal(tables_test5, 4) # 3 essential columns tables_test6 <- render_lg_table(ft, @@ -76,7 +79,7 @@ test_that("accurate number of split tables identified", { plot_name = "test_plot6.rda" ) - expect_equal(tables_test6, 2) + expect_equal(tables_test6, 9) # erase temporary testing files unlink(fs::path(getwd(), "tables"), recursive = T) @@ -88,7 +91,7 @@ test_that("table_list saved as an rda", { t() |> as.data.frame() |> dplyr::select(1:50) |> - flextable::flextable() + gt::gt() dir.create("tables") diff --git a/vignettes/accessibility_guide.Rmd b/vignettes/accessibility_guide.Rmd index 592d5f1a..ffe5a9cf 100644 --- a/vignettes/accessibility_guide.Rmd +++ b/vignettes/accessibility_guide.Rmd @@ -185,6 +185,8 @@ recruitment_alt_text <- new_alt_text 3. As stated earlier, if you see text that looks like a placeholder (e.g., "The x axis, showing the year, spans from B.start.year to B.end.year..."), that means that there was at least one instance where our tool failed to extract a specific value from the model results and substitute it into the placeholder. Please make sure that your alt text and captions contain the expected values before moving forward with your report. Check out the inst/resources/captions_alt_text_template.csv file in the `stockplotr` package to view the template with placeholders. The same package's `write_captions()` function shows how values are extracted from the model results and substituted into the placeholders. +4. If you add a special character (e.g., percentage sign (%) or dollar sign ($); see [full list on this wiki page](https://en.wikibooks.org/wiki/LaTeX/Special_Characters#Other_symbols)), please add two backslashes before the character to avoid issues compiling your report later on (specifically, the conversion from Quarto to LaTeX via Pandoc, and then compilation of the LaTeX report after running `add_accessibility()` or `add_alttext()`). For example, "The 95% CI" would be written as "The 95\\\\% CI". + ### More resources Looking for more resources for writing alt text? Check out the [NOAA Library's website for creating accessible documents](https://library.noaa.gov/Section508/CreatingDocs).