diff --git a/R/create_tables_doc.R b/R/create_tables_doc.R index d76cf843..5e788a8c 100644 --- a/R/create_tables_doc.R +++ b/R/create_tables_doc.R @@ -31,7 +31,7 @@ create_tables_doc <- function(resdir = NULL, add_chunk( paste0("rda_dir <- '", rda_dir, "/rda_files'"), label = "set-rda-dir-tbls", - eval = "false" + eval = "true" ), "\n" ) @@ -51,7 +51,7 @@ rm(rda)\n indices_table <- indices_table_rda$table indices_cap <- indices_table_rda$cap"), label = "tbl-indices-setup", - eval = "true" + eval = "false" ), "\n" ) diff --git a/R/create_template.R b/R/create_template.R index 57d9d468..61c5f7c1 100644 --- a/R/create_template.R +++ b/R/create_template.R @@ -100,19 +100,19 @@ #' using the image included in the project's repository. #' @param bib_file File path to a .bib file used for citing references in #' the report -#' @param rda_dir The location of the folder containing .rda files -#' ("rda_files") already made with `satf`, or, if the user has not used -#' `satf` to make those .rda files already, rda_dir represents the location -#' that will contain .rda files in an "rda_files" folder. The folder would have -#' been made with `satf::exp_all_figs_tables()`, or by exporting files -#' by running individual `satf` figure- and table-generating functions. -#' If you have used `satf` to generate these .rda files, you can leave -#' the arguments below blank. +#' @param rda_dir If the user has already created .rda files containing +#' figures, tables, alt text, and captions with `satf`, rda_dir represents +#' the location of the folder containing these .rda files ("rda_files"). +#' Otherwise, if the user has not used `satf` to make those .rda files already, +#' those files will be generated automatically and placed within the "report" +#' folder within the `file_dir`. The "rda_files" folder would have been +#' made with `satf::exp_all_figs_tables()`, or by exporting files by running individual +#' `satf` figure- and table-generating functions. If you have used `satf` to +#' generate these .rda files, you can leave the arguments below blank. NOTE: +#' If an "rda_files" folder is detected within rda_dir, .rda files will not be +#' regenerated. +#' @param end_year The last year of assessment. The default is year - 1. #' @inheritParams satf::plot_recruitment -#' @param make_rda This argument is automatically assessed based on the presence -#' or absence of .rda files and should be left blank. TRUE/FALSE; indicate -#' whether to produce an .rda file containing a list with the figure/table, -#' caption, and alternative text (if figure) for each figure and table. #' @param ref_line An argument inherited from `satf::plot_spawning_biomass.R`. #' A string specifying the type of reference you want to #' compare spawning biomass to. The default is `"target"`, which looks for @@ -146,6 +146,7 @@ #' create_template( #' new_section = "a_new_section", #' section_location = "before-introduction", +#' rda_dir = here::here() #' ) #' #' @@ -163,6 +164,7 @@ #' model = "SS3", #' new_section = "an_additional_section", #' section_location = "after-introduction", +#' rda_dir = here::here() #' ) #' #' asar::create_template( @@ -177,7 +179,8 @@ #' new_section = c("a_new_section", "another_new_section"), #' section_location = c("before-introduction", "after-introduction"), #' custom = TRUE, -#' custom_sections = c("executive_summary", "introduction") +#' custom_sections = c("executive_summary", "introduction"), +#' rda_dir = here::here() #' ) #' #' create_template( @@ -216,14 +219,13 @@ #' rda_dir = "C:/Users/Documents", #' unit_label = "metric tons", #' scale_amount = 1, -#' end_year = NULL, +#' end_year = 2022, #' n_projected_years = 10, #' relative = FALSE, -#' make_rda = FALSE, -#' ref_line = c("target", "MSY", "msy", "unfished"), +#' ref_line = "target", #' spawning_biomass_label = "metric tons", #' recruitment_label = "metric tons", -#' ref_line_sb = c("target", "MSY", "msy", "unfished") +#' ref_line_sb = "target" #' ) #' } #' @@ -262,13 +264,12 @@ create_template <- function( add_image = FALSE, spp_image = NULL, bib_file = "asar_references.bib", - rda_dir = NULL, + rda_dir = getwd(), unit_label = "metric tons", scale_amount = 1, end_year = NULL, n_projected_years = 10, relative = FALSE, - make_rda = FALSE, ref_line = c("target", "MSY", "msy", "unfished"), spawning_biomass_label = "metric tons", recruitment_label = "metric tons", @@ -279,6 +280,11 @@ create_template <- function( year <- format(as.POSIXct(Sys.Date(), format = "%YYYY-%mm-%dd"), "%Y") } + # If analyst forgets to add end year, default will be year - 1 + if (is.null(end_year)) { + end_year <- as.numeric(year) - 1 + } + # Name report if (!is.null(type)) { report_name <- paste0( @@ -420,7 +426,8 @@ create_template <- function( # Create tables qmd if (include_tables) { if (!is.null(resdir) | !is.null(model_results) | !is.null(model)) { - if (!is.null(rda_dir) & !is.null(end_year)){ + # if there is an existing folder with "rda_files" in the rda_dir: + if(dir.exists(fs::path(rda_dir, "rda_files"))){ create_tables_doc( resdir = resdir, model_results = model_results, @@ -428,14 +435,16 @@ create_template <- function( subdir = subdir, rda_dir = rda_dir ) - - } else { - tables_doc <- paste0( - "### Tables \n \n", - "Please refer to the `satf` package downloaded from remotes::install_github('nmfs-ost/satf') to add premade tables." - ) - utils::capture.output(cat(tables_doc), file = fs::path(subdir, "08_tables.qmd"), append = FALSE) - warning("Rda directory and/or arguments needed to create .rda files not defined.") + # if there isn't an existing folder with "rda_files" in the rda_dir, + # and the rda_files will be placed in the subdir: + } else { + create_tables_doc( + resdir = resdir, + model_results = model_results, + model = model, + subdir = subdir, + rda_dir = subdir + ) } } else { tables_doc <- paste0( @@ -457,7 +466,8 @@ create_template <- function( # Create figures qmd if (include_figures) { if (!is.null(resdir) | !is.null(model_results) | !is.null(model)) { - if (!is.null(rda_dir) & !is.null(end_year)){ + # if there is an existing folder with "rda_files" in the rda_dir: + if(dir.exists(fs::path(rda_dir, "rda_files"))){ create_figures_doc( resdir = resdir, model_results = model_results, @@ -466,15 +476,19 @@ create_template <- function( year = year, rda_dir = rda_dir ) - } else { - figures_doc <- paste0( - "### Figures \n \n", - "Please refer to the `satf` package downloaded from remotes::install_github('nmfs-ost/satf') to add premade figures." - ) - utils::capture.output(cat(figures_doc), file = fs::path(subdir, "09_figures.qmd"), append = FALSE) - warning("Rda directory and/or arguments needed to create .rda files not defined.") - } - } else { + # if there isn't an existing folder with "rda_files" in the rda_dir, + # and the rda_files will be placed in the subdir: + } else { + create_figures_doc( + resdir = resdir, + model_results = model_results, + model = model, + subdir = subdir, + year = year, + rda_dir = subdir + ) + } + } else { figures_doc <- paste0( "### Figures \n \n", "Please refer to the `satf` package downloaded from remotes::install_github('nmfs-ost/satf') to add premade figures." @@ -769,9 +783,9 @@ create_template <- function( } # run satf::exp_all_figs_tables() if rda files not premade - if (!is.null(rda_dir) & !is.null(end_year)){ - - if(!dir.exists(file.path(rda_dir, "rda_files"))){ + # output folder: subdir + if(!dir.exists(fs::path(rda_dir, "rda_files"))){ + if (!is.null(resdir) | !is.null(model_results)) { # load converted output output <- utils::read.csv(paste0(resdir, "/", model_results)) @@ -785,14 +799,14 @@ create_template <- function( n_projected_years = n_projected_years, relative = relative, make_rda = TRUE, - rda_dir = rda_dir, + rda_dir = subdir, ref_line = ref_line, spawning_biomass_label = spawning_biomass_label, recruitment_label = recruitment_label, ref_line_sb = ref_line_sb - ) + ) + } } - } # print("_______Standardized output data________") @@ -821,7 +835,7 @@ create_template <- function( " ", "dplyr::summarize(max_val = max(year)) |> \n", " ", "dplyr::pull(max_val))-10", "\n", # for quantities - don't want any values that are split by factor - "# subset output to remove quantities that are fplit by factor \n", + "# subset output to remove quantities that are split by factor \n", "output2 <- output |> \n", " ", "dplyr::filter(is.na(season), \n", " ", " ", "is.na(fleet), \n", diff --git a/inst/resources/affiliation_info.csv b/inst/resources/affiliation_info.csv index 94e81baa..9a2d52b2 100644 --- a/inst/resources/affiliation_info.csv +++ b/inst/resources/affiliation_info.csv @@ -1,9 +1,22 @@ affiliation,office,name,address,city,state,country,postal-code -OST-MD,OST,Office of Science and Technology,1315 East-West Highway,Silver Spring,MD,U.S.A.,20910 +AFSC-NOR,AFSC,Alaska Fisheries Science Center,2032 SE OSU Drive Building 955,Newport,OR,U.S.A.,97365-2097 +AFSC-SWA,AFSC,Alaska Fisheries Science Center,2725 Montlake Boulevard East,Seattle,WA,U.S.A.,98112-2097 +AFSC-JAK,AFSC,Alaska Fisheries Science Center,17109 Point Lena Loop Road,Juneau,AK,U.S.A.,99801 +AFSC,AFSC,Alaska Fisheries Science Center,17109 Point Lena Loop Road,Juneau,AK,U.S.A.,99801 +AFSC-WA,AFSC,Alaska Fisheries Science Center,7600 Sand Point Way N.E.,Seattle,WA,U.S.A.,98115 +AFSC-ABL,AFSC,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 NEFSC,NEFSC,Northeast Fisheries Science Center,166 Water Street,Woods Hole,MA,U.S.A.,2543 NEFSC-WHMA,NEFSC,Northeast Fisheries Science Center,166 Water Street,Woods Hole,MA,U.S.A.,2543 NEFSC-NRI,NEFSC,Northeast Fisheries Science Center,28 Tarzwell Drive,Narragansett,RI,U.S.A.,2882 NEFSC-MCT,NEFSC,Northeast Fisheries Science Center,212 Rogers Avenue,Milford,CT,U.S.A.,6460 +NWFSC,NWFSC,Northwest Fisheries Science Center,2725 Montlake Boulevard East,Seattle,WA,U.S.A.,98112-2097 +NWFSC-NOR,NWFSC,Northwest Fisheries Science Center,2032 SE OSU Drive Building 955,Newport,OR,U.S.A.,97365-2097 +NWFSC-SWA,NWFSC,Northwest Fisheries Science Center,2725 Montlake Boulevard East,Seattle,WA,U.S.A.,98112-2097 +ODFW,ODFW,Oregon Department of Fish and Wildlife,2040 Southeast Marine Science Drive,Newport,OR,U.S.A.,97365 +OST-MD,OST,Office of Science and Technology,1315 East-West Highway,Silver Spring,MD,U.S.A.,20910 +PIFSC,PIFSC,Pacific Islands Fisheries Science Center,1845 Wasp Boulevard,Honolulu,HI,U.S.A.,96818 +PSMFC,NWFSC,Pacific States Marine Fisheries Commission,2725 Montlake Boulevard East,Seattle,WA,U.S.A.,98112-2097 SEFSC,SEFSC,Southeast Fisheries Science Center,75 Virginia Beach Drive,Miami,FL,U.S.A.,33149 SEFSC-MFL,SEFSC,Southeast Fisheries Science Center,75 Virginia Beach Drive,Miami,FL,U.S.A.,33149 SEFSC-BNC,SEFSC,Southeast Fisheries Science Center,101 Pivers Island Road,Beaufort,NC,U.S.A.,28516 @@ -11,13 +24,8 @@ SEFSC-PCFL,SEFSC,Southeast Fisheries Science Center,3500 Delwood Beach Road,Pana SEFSC-GTX,SEFSC,Southeast Fisheries Science Center,4700 Avenue U,Galveston,TX,U.S.A.,77551 SEFSC-PMS,SEFSC,Southeast Fisheries Science Center,3209 Frederic Street,Pascagoula,MS,U.S.A.,39567 SEFSC-LLA,SEFSC,Southeast Fisheries Science Center,646 Cajundome Boulevard,Lafayette,LA,U.S.A.,70506 -NWFSC,NWFSC,Northwest Fisheries Science Center,2725 Montlake Boulevard East,Seattle,WA,U.S.A.,98112-2097 -NWFSC-NOR,NWFSC,Northwest Fisheries Science Center,2032 SE OSU Drive Building 955,Newport,OR,U.S.A.,97365-2097 -NWFSC-SWA,NWFSC,Northwest Fisheries Science Center,2725 Montlake Boulevard East,Seattle,WA,U.S.A.,98112-2097 SWFSC-LJCA,SWFSC,Southwest Fisheries Science Center,8901 La Jolla Shores Drive,La Jolla,CA,U.S.A.,92037 -AFSC-NOR,AFSC,Alaska Fisheries Science Center,2032 SE OSU Drive Building 955,Newport,OR,U.S.A.,97365-2097 -AFSC-SWA,AFSC,Alaska Fisheries Science Center,2725 Montlake Boulevard East,Seattle,WA,U.S.A.,98112-2097 -AFSC-JAK,AFSC,Alaska Fisheries Science Center,17109 Point Lena Loop Road,Juneau,AK,U.S.A.,99801 -AFSC,AFSC,Alaska Fisheries Science Center,17109 Point Lena Loop Road,Juneau,AK,U.S.A.,99801 -PIFSC,PIFSC,Pacific Islands Fisheries Science Center,1845 Wasp Boulevard,Honolulu,HI,U.S.A.,96818 -AFSC-ABL,AFSC,Alaska Fisheries Science Center,17109 Point Lena Loop Road,Juneau,AK,U.S.A.,99801 +SWFSC-SC,SWFSC,Southwest Fisheries Science Center,110 McAllister Way,Santa Cruz,CA,U.S.A.,95060 +UAF,UAF,University of Alaska Fairbanks,"Department of Fisheries at Lena Point, College of Fisheries and Ocean Sciences, University of Alaska Fairbanks, 17101 Point Lena Loop Rd",Juneau,AK,U.S.A.,99801 +WCR,WCR,West Coast Region,7600 Sand Point Way N.E.,Seattle,WA,U.S.A.,98115 +WDFW,WDFW,Washington Department of Fish and Wildlife,600 Capital Way North,Olympia,WA,U.S.A.,98501 diff --git a/inst/resources/authorship.csv b/inst/resources/authorship.csv index a070741a..a154c9cb 100644 --- a/inst/resources/authorship.csv +++ b/inst/resources/authorship.csv @@ -2,48 +2,62 @@ last,first,mi,office Adams,Charles,,NEFSC Ailloud,Lisa,,SEFSC Allen Akselrud,Caitlin,,SWFSC-LJCA -Berger,Aaron,M.,NWFSC-SWA +Berger,Aaron,M.,NWFSC-NOR +Beyer,Sabrina,,NWFSC-SWA +Bizzarro,Joseph,J.,SWFSC-SC Blackhart,Kristan,,NEFSC Boucher,Jason,,NEFSC Brodziak,John,,PIFSC Brown,Russell,W.,NEFSC-WHMA +Budrick,John,E.,CDFW Carvalho,Felipe,,PIFSC Chang,Jui-Han,,NEFSC Chute,Toni,,NEFSC +Coates,Julia,,CDFW Cope,Jason,M.,NWFSC-SWA Correa,Giancarlo,M.,AFSC Curti,Kiersten,,NEFSC Damiano,Matt,,SEFSC Deary,Alison,L.,AFSC Deroba,Jon,,NEFSC +Dick,E.,J.,SWFSC-SC Dorn,Martin,W.,AFSC Ducharme-Barth,Nicholas,,PIFSC Dunn,Alex,,NEFSC +Feddern,Megan,L.,NWFSC-SWA Ferriss,Bridget,E.,AFSC -Field,John,,SWFSC +Field,John,,SWFSC-SC Fitchett,Mark,D.,PIFSC Forrestal,Francesca,,SEFSC-MFL -Gertseva,Vladlena,,NWFSC -Haltuch,Melissa,A.,AFSC-SWA +Gertseva,Vladlena,,NWFSC-SWA +Haltuch,Melissa,A.,AFSC-WA Hamel,Owen,S.,NWFSC-SWA Hart,Dvora,,NEFSC +Hastie,Jim,,NWFSC-SWA Havron,Andrea,,OST +Head,Melissa,A.,NWFSC-SWA Hendrickson,Lisa,,NEFSC Hennen,Dan,,NEFSC +Hernvann,Pierre-Yves,,NWFSC-SWA Hill,Kevin,T.,SWFSC-LJCA +Hillier,Lisa,K.,WDFW +Hinton,Kristen,E.,WDFW Johnson,Kelli,F.,NWFSC-SWA Jones,Andy,,NEFSC -Kapur,Maia,R.,PIFSC +Kapur,Maia,S.,AFSC-WA Kuriyama,Peter,T.,SWFSC-LJCA +Lam,Laurel,S.,PSMFC Langseth,Brian,J.,NWFSC-SWA Legault,Chris,,NEFSC Levine,Mike,,AFSC -Marshall,Kristan,,NWFSC +Marshall,Kristan,,NWFSC-SWA +Matson,Sean,E.,WCR McGowan,David,W.,AFSC Methot,Richard,,NWFSC -Monk,Melissa,,SWFSC +Monk,Melissa,,SWFSC-SC Monnahan,Cole,C.,AFSC Nieland,Julie,,NEFSC +Niles,Corey,B.,WDFW Nitschke,Paul,,NEFSC O'Keefe,Cate,,NEFSC Oken,Kiva,L.,NWFSC-SWA @@ -51,6 +65,8 @@ Oshima,Megumi,,PIFSC Perretti,Charles,,NEFSC Rios,Adyan,,SEFSC Rogers,Lauren,,AFSC +Rogers,Tanya,L.,SWFSC-SC +Saas,Emma,M.,SWFSC-SC Sagarese,Skyler,,SEFSC-MFL Sculley,Michelle,,PIFSC Shank,Burton,,NEFSC @@ -58,21 +74,27 @@ Shertzer,Kyle,,SEFSC-BNC Shotwell,S.,Kalei,AFSC Siegfried,Katie,,SEFSC Sosebee,Karson,,NEFSC +Spies,Ingrid,,AFSC-WA Stawitz,Christine,,OST -Sullivan,Jane,,AFSC +Sullivan,Jane,Y.,AFSC Syslo,John,,PIFSC Taylor,Ian,G.,NWFSC-SWA Tolimieri,Nick,,NWFSC-SWA Traver,Michele,,NEFSC +Tsou,Tien-Shui,,WDFW Tyrell,Abigail,,NEFSC -Wassermann,Sophia,N.,AFSC-SWA +Veron,Matthieu,,AFSC-WA +Wallace,John,R.,NWFSC-SWA +Wassermann,Sophia,N.,AFSC-WA Wetzel,Chantel,R.,NWFSC-SWA +Whitman,Alison,D.,ODFW Wigley,Susan,,NEFSC Williams,Ben,,AFSC Williams,Erik,,SEFSC Wood,Anthony,,NEFSC Yau,Annie,J.,PIFSC Zador,Stephani,,AFSC +Zahner,Joshua,A.,UAF Zwolinski,Juan,P.,SWFSC-LJCA Snow,John,,AFSC Phantom,Danny,,NEFSC diff --git a/inst/resources/captions_alt_text_template.csv b/inst/resources/captions_alt_text_template.csv deleted file mode 100644 index c2f27a54..00000000 --- a/inst/resources/captions_alt_text_template.csv +++ /dev/null @@ -1,44 +0,0 @@ -label,type,caption,alt_text -kobe,figure,"Kobe plot showing stock status. Triangles delineate start and end years. Horizontal and vertical dashed lines delineate reference points for overfishing (i.e., F/F~MSY~>1) and overfished status (i.e., B/B~MSY~ <1) where MSY represents either actual maximum sustainable yield or a proxy for MSY.","A Kobe plot showing stock status from kobe_start_year to kobe_end_year. The x axis, showing overfished status (i.e., B/B~MSY~), spans from B_BMSY_min to B_BMSY_max and the y axis, showing overfishing (i.e., F/F~MSY~), spans from F_FMSY_min to F_FMSY_max. The B/B~MSY~ and F/F~MSY~ for end_year_kobe were B_BMSY_end_yr and F_FMSY_end_yr, respectively, indicating that the stock overfished_status_is_isnot overfished and overfishing_status_is_is_not experiencing overfishing." -biomass,figure,Biomass (B) time series. The horizontal dashed line represents the limit reference point (B_ref_pt B_ref_pt_unit).,"Line graph showing biomass time series. The x axis, showing the year, spans from B_start_year to B_end_year and the y axis, showing biomass in B_units, spans from B_min to B_max." -fishing_mortality,figure,Fishing mortality (F) over time. The horizontal dashed line represents the target reference point (F_ref_pt F_ref_pt_unit).,"Line graph showing fishing mortality over time . The x axis, showing the year, spans from F_start_year to F_end_year and the y axis, showing fishing mortality in F_units, spans from F_min to F_max." -landings,figure,Historical landings by fleet.,"Cumulative area plot showing historical landings. The x axis, showing the year, spans from landings_start_year to landings_end_year and the y axis, showing landings in landings_units, spans from landings_min to landings_max." -natural_mortality,figure,Natural mortality (M) for each age. ,"Line graph showing natural mortality. The x axis, showing age in M_units, spans from M_age_min to M_age_max and the y axis, showing the natural mortality rate per year, spans from M_rate_min to M_rate_max." -vonb_laa,figure,Aged and measured fish (points) and von Bertalanffy growth function (line) fit to the data.,"Point and line graph showing observations of measured age and length data as points and the von Bertalanffy relationship fit to this data as a line with 95% confidence intervals. The x axis, showing age in vonb_age_units, spans from vonb_age_min to vonb_age_max, and the y axis, showing length in vonb_length_units, spans from vonb_length_min to vonb_length_max." -length_type_conversion,figure,Length-type conversion relationship between total and fork length where points represent individual fish length measurement observations and the line is the fitted relationship.,"Point and line graph showing observations of measured fork length and measured total length from the same fish for conversion purposes as points, and a linear fit through those points as a line. The x axis, showing total length in total_length_units, spans from total_length_min to total_length_max and the y axis, showing fork length in fork_length_units, spans from fork_length_min to fork_length_max." -weight_length_converstion,figure,Weight-length conversion relationship where the points represent individual fish observations and the line is the fitted relationship. ,"Point and line graph showing observations of measured length and measured weight from the same fish for conversion purposes as points, and an exponential fit through those points as a line. The x axis, showing length in wl_length_units, spans from wl_length_min to wl_length_max, and the y axis, showing weight in wl_weight_units, spans from wl_weight_min to wl_weight_max." -maturity_schedule,figure,The relationship between the proportion mature and fish length. ,"Graph showing the relationship between fish maturity and length. Points, if present, show observations of maturity at different fish lengths and the line represents either the fit to the points, or the assumed or known maturity schedule. The x axis, showing length in prop_mat_length_units, spans from prop_mat_length_min to prop_mat_length_max and the y axis, showing the proportion mature, spans from 0--1." -fecundity_at_length,figure,Fecundity (in number of eggs) as a function of fish length. ,"Point and line graph showing observations of measured fecundity and measured length from the same fish and an exponential fit through those points displayed as a line. The x axis, showing length in fecundity_length_units, spans from fecundity_length_min to fecundity_length_max, and the y axis, showing fecundity in fecundity_units, spans from fecundity_min to fecundity_max." -CAA,figure,"Histograms showing the proportion of the catch in each age group for each year in which there is composition data, for fleet or survey fleet_or_survey_name.","Histograms for each year and fleet for which there is data (one per year grouped by fleet or survey), which show the proportion of the catch in each age group. The x axis of each histogram, showing age groups, span from caa_age_min to caa_age_max, while the y axis of each histogram, showing the proportion of the catch, spans from 0--1." -CAL,figure,"Histograms showing the proportion of the catch in each length group, each year for which there is composition data, for fleet or survey fleet_or_survey_name.","Histograms for each year and fleet for which there is data (one per year grouped by fleet or survey), which show the proportion of the catch in each length group. The x axis of each histogram contains length intervals that span from cal_length_min to cal_length_max, while the y axis of each histogram contains the proportion of the catch, which span from 0--1." -CPUE_indices,figure,Catch per unit effort (CPUE) over time for fleet or survey. 95% confidence intervals are shown for each survey/fleet.,"Line graph showing catch per unit effort (CPUE) over time for fleet or survey from cpue_start_year to cpue_end_year, stratified by survey/fleet. The x axis, showing the year, spans from cpue_start_year to cpue_end_year, and the y axis, showing CPUE in cpue_units, spans from cpue_min to cpue_max." -NAA,figure,Model estimate of population numbers at age over time. The relative size of each bubble for a given year and age indicates the relative abundance in that category compared with others. ,"Bubble plot showing relative age proportions over time. The x axis, showing the year, spans from bubble_start_year to bubble_end_year, and the y axis, showing age in bubble_age_units, spans from bubble_age_min to bubble_age_max." -mod_fit_catch,figure,Observed catch from the data input file (points) and model estimated catch (line) over time for fleet_or_survey_name. ,"Point and line graph showing observed catch from the data input file as points and model estimated catch as a line over time for fleet_or_survey_name. The x axis, showing years, spans from mod_fit_catch_start_year to mod_fit_catch_end_year and the y axis, showing catch in mod_fit_catch_units, spans from mod_fit_catch_min to mod_fit_catch_max." -mod_fit_abun,figure,Assessment model fits to input catch per unit of effort index values over time calculated from fleet_or_survey_name.,"Point and line graph showing the assessment model fit, displayed as a line, to input catch per unit effort index values, displayed as points over time, for fleet_or_survey_name. The x axis, showing years, spans from mod_fit_abun_start_year to mod_fit_abun_end_year, and the y axis, showing catch per unit effort in cpue_units, spans from cpue_min to cpue_max." -mod_fit_discards,figure,Observed discards (points) and model-estimated discards (line).,"Point and line graph showing the assessment model fit to observed discards. Observed discards are represented as points while the model fitted estimates are represented as a line over time for fleet_or_survey_name. The x axis, showing the year, spans from mod_fit_discards_start_year to mod_fit_discards_end_year, and the y axis, showing discards in mod_fit_discards_units, spans from mod_fit_discards_min to mod_fit_discards_max." -selectivity,figure,Length-based selectivity for each fleet and survey estimated by the assessment model.,"Line graph showing length-based selectivity for fleet_or_survey_name from selectivity_start_year to selectivity_end_year. The x axis, showing length in selectivity_length_units, spans from selectivity_length_min to selectivity_length_max, and the y axis, showing the proportion of the stock that the gear selects for, spans from 0--1." -sr,figure,Stock recruitment relationship estimated by the assessment model. ,"Point and line graph showing the relationship between spawning stock biomass and newly recruited sr_age_min fish as estimated by the assessment model. Points represent model estimates of recruitment each year as a function of spawning stock biomass, after adjusted by annual recruitment deviations. The line represents the best fit through the points for the spawning stock relationship selected for use in the assessment model. The x axis, showing spawning stock biomass in sr_ssb_units, spans from sr_ssb_min to sr_ssb_max, while the y axis, showing recruitment in sr_units, spans from sr_min to sr_max." -recruitment,figure,Estimated recruitment by the assessment model each year in recruitment_units.,"Line graph showing the assessment model estimated recruitment in unit for each year. The x axis, showing years, spans from recruitment_start_year to recruitment_end_year while the y axis, showing recruitment in recruitment_units, spans from recruitment_min to recruitment_max." -recruitment_deviations,figure,Annual deviations (on natural log scale) in the number of newly recruited fish the model estimates each year. ,"Scatterplot showing annual deviations in recruitment. Points have error bars and the dashed horizontal line at 0 represents no deviation from what would be estimated by the stock-recruit relationship. Positive values represent an increase in recruitment that year while negative values represent a decrease. The x axis, showing year, spans from recruit_dev_start_year to recruit_dev_end_year, while the y axis, showing the recruitment deviation, spans from recruit_dev_min to recruit_dev_max on a natural log scale." -tot_b,figure,Model-estimated biomass (B) time series. The horizontal dashed line represents the biomass limit reference point at biomass_ref_pt biomass_ref_pt_units.,"Line graph showing model-estimated biomass time series. The x axis, showing the year, spans from biomass_start_year to biomass_end_year, and the y axis, showing model-estimated biomass in biomass_units, spans from biomass_min to biomass_max." -spawning_biomass,figure,Model-estimated spawning stock biomass (SSB) time series. The horizontal dashed line represents the spawning stock biomass associated with the biomass limit reference point at ssb_ref_pt ssb_ref_pt_units.,"Line graph showing model-estimated spawning stock biomass. The x axis, showing the year, spans from ssb_start_year to ssb_end_year, and the y axis, showing model-estimated spawning stock biomass in ssb_units, spans from ssb_min to ssb_max." -spr,figure,Model-estimated spawning potential ratio (SPR) (SSB~current~/SSB~target~) time series. The horizontal dashed line represents the spawning potential ratio of the limit reference point at spr_ref_pt spr_ref_pt_units.,"Line graph showing model-estimated spawning potential ratio over time. The x axis, showing the year, spans from spr_start_year to spr_end_year and the y axis, showing model-estimated spawning potential ratio in SSB~current~/SSB~target~, spans from spr_min to spr_max." -pop_naa_baa,figure,Model-estimated population numbers at age and population biomass at age over time. The relative size of each bubble for a given year and age indicates the relative abundance or biomass in that category compared with others. ,"Bubble plot showing model-estimated population numbers at age and population biomass at age. The x axis, showing the year, spans from pop_naa_baa_start_year to pop_naa_baa_end_year, and the y axis, showing numbers of fish, spans from pop_naa_baa_fish_min to pop_naa_baa_fish_max." -proj_catch,figure,Forecasted catch in proj_catch_units over future years for different fishing mortality scenarios as indicated in the legend.,"Time series line graph showing forecasted catch over future years for different fishing mortality scenarios. The x axis, showing the year, spans from proj_catch_start_year to proj_catch_end_year, and the y axis, showing catch in proj_catch_units, spans from proj_catch_min to proj_catch_max." -proj_biomass,figure,Forecasted biomass in proj_biomass_units over future years for different fishing mortality scenarios as indicated in the legend. The horizontal dashed line represents the biomass limit reference point. ,"Time series line graph showing forecasted biomass over future years for different fishing mortality scenarios. The horizontal dashed line represents the biomass limit reference point. The x axis, showing the year, spans from proj_biomass_start_year to proj_biomass_end_year, and the y axis, showing biomass in proj_biomass_units, spans from proj_biomass_min to proj_biomass_max." -report_version_model_changes,table,Document version history briefly describing when major changes or updates are made to each version of the report., -projection_ts,table,Forecasted catch and biomass over future years for different fishing mortality scenarios. , -catch,table,Observed (points) and model estimated (line) catch over time for fleet catch_fleet., -life_history_params,table,Life history parameters used in the stock assessment model. The last column of the table indicates whether the parameters were estimated by the model or fixed., -landings,table,Landed catch by fleet and year in landings_tbl_units. , -discards,table,Discarded catch by fleet and year in discards_tbl_units., -age_length_key,table,Age-length key: the proportion of fish for each age that belong to a particular length group. , -indices_abundance,table,Calculated indices of abundance and their corresponding CVs for the fleets and surveys identified in the column headers. , -model_runs,table,"The base configuration and alternative sensitivity analysis configurations of the stock assessment model, in which parameters and/or data input streams are changed from one configuration to another.", -derived_quantities,table,Derived quantities calculated by the base configuration of the stock assessment model., -est_params,table,Parameters used in the base stock assessment model and whether the parameter was estimated by the model or fixed (i.e. not allowed to be estimated or changed by the model). CVs for estimated models are provided., -F_per_fleet_per_year,table,Partial fishing mortality estimates for each fleet in the assessment model., -B_div_N,table,"Historical biomass, abundance, and catch time series estimated by the base configuration of the stock assessment model.", -naa,table,Historical population abundance (numbers) estimated by the base model for each age group., -catchability,table,Catchability over time for fleet catchability_fleet., -sensitivity_runs,table,"Forecasted catch, biomass, spawning biomass, recruitment, fishing mortality, and stock status as projected from the base model configuration.", diff --git a/inst/resources/spp_img/Atlantic_menhaden.png b/inst/resources/spp_img/Atlantic_menhaden.png new file mode 100644 index 00000000..012624cc Binary files /dev/null and b/inst/resources/spp_img/Atlantic_menhaden.png differ diff --git a/inst/resources/spp_img/Big_skate.png b/inst/resources/spp_img/Big_skate.png new file mode 100644 index 00000000..b52dfb40 Binary files /dev/null and b/inst/resources/spp_img/Big_skate.png differ diff --git a/inst/resources/spp_img/Black_grouper.png b/inst/resources/spp_img/Black_grouper.png new file mode 100644 index 00000000..39b97852 Binary files /dev/null and b/inst/resources/spp_img/Black_grouper.png differ diff --git a/inst/resources/spp_img/Black_rockfish.png b/inst/resources/spp_img/Black_rockfish.png new file mode 100644 index 00000000..9ae9b3e1 Binary files /dev/null and b/inst/resources/spp_img/Black_rockfish.png differ diff --git a/inst/resources/spp_img/Blue_rockfish.png b/inst/resources/spp_img/Blue_rockfish.png new file mode 100644 index 00000000..25ff1c86 Binary files /dev/null and b/inst/resources/spp_img/Blue_rockfish.png differ diff --git a/inst/resources/spp_img/Brown_shrimp.png b/inst/resources/spp_img/Brown_shrimp.png new file mode 100644 index 00000000..57ad1e92 Binary files /dev/null and b/inst/resources/spp_img/Brown_shrimp.png differ diff --git a/inst/resources/spp_img/Cabezon.png b/inst/resources/spp_img/Cabezon.png new file mode 100644 index 00000000..260b2f57 Binary files /dev/null and b/inst/resources/spp_img/Cabezon.png differ diff --git a/inst/resources/spp_img/Canary_rockfish.png b/inst/resources/spp_img/Canary_rockfish.png new file mode 100644 index 00000000..53fd9f39 Binary files /dev/null and b/inst/resources/spp_img/Canary_rockfish.png differ diff --git a/inst/resources/spp_img/Cobia.png b/inst/resources/spp_img/Cobia.png new file mode 100644 index 00000000..f8398c70 Binary files /dev/null and b/inst/resources/spp_img/Cobia.png differ diff --git a/inst/resources/spp_img/Crimson_jobfish.png b/inst/resources/spp_img/Crimson_jobfish.png new file mode 100644 index 00000000..c0c42e36 Binary files /dev/null and b/inst/resources/spp_img/Crimson_jobfish.png differ diff --git a/inst/resources/spp_img/Deacon_rockfish.png b/inst/resources/spp_img/Deacon_rockfish.png new file mode 100644 index 00000000..5708e987 Binary files /dev/null and b/inst/resources/spp_img/Deacon_rockfish.png differ diff --git a/inst/resources/spp_img/Gag_grouper.png b/inst/resources/spp_img/Gag_grouper.png new file mode 100644 index 00000000..f0bac9d9 Binary files /dev/null and b/inst/resources/spp_img/Gag_grouper.png differ diff --git a/inst/resources/spp_img/Gray_triggerfish.png b/inst/resources/spp_img/Gray_triggerfish.png new file mode 100644 index 00000000..4aeebc8d Binary files /dev/null and b/inst/resources/spp_img/Gray_triggerfish.png differ diff --git a/inst/resources/spp_img/Greater_amberjack.png b/inst/resources/spp_img/Greater_amberjack.png new file mode 100644 index 00000000..f2a4ee63 Binary files /dev/null and b/inst/resources/spp_img/Greater_amberjack.png differ diff --git a/inst/resources/spp_img/King_mackerel.png b/inst/resources/spp_img/King_mackerel.png new file mode 100644 index 00000000..c8e534ce Binary files /dev/null and b/inst/resources/spp_img/King_mackerel.png differ diff --git a/inst/resources/spp_img/Lingcod.png b/inst/resources/spp_img/Lingcod.png new file mode 100644 index 00000000..ac5af8c2 Binary files /dev/null and b/inst/resources/spp_img/Lingcod.png differ diff --git a/inst/resources/spp_img/Northern_anchovy.png b/inst/resources/spp_img/Northern_anchovy.png new file mode 100644 index 00000000..01624e7c Binary files /dev/null and b/inst/resources/spp_img/Northern_anchovy.png differ diff --git a/inst/resources/spp_img/Pacific_mackerel.png b/inst/resources/spp_img/Pacific_mackerel.png new file mode 100644 index 00000000..5b064477 Binary files /dev/null and b/inst/resources/spp_img/Pacific_mackerel.png differ diff --git a/inst/resources/spp_img/Pacific_sanddab.png b/inst/resources/spp_img/Pacific_sanddab.png new file mode 100644 index 00000000..d19421c9 Binary files /dev/null and b/inst/resources/spp_img/Pacific_sanddab.png differ diff --git a/inst/resources/spp_img/Pink_shrimp.png b/inst/resources/spp_img/Pink_shrimp.png new file mode 100644 index 00000000..b34cb251 Binary files /dev/null and b/inst/resources/spp_img/Pink_shrimp.png differ diff --git a/inst/resources/spp_img/Red_grouper.png b/inst/resources/spp_img/Red_grouper.png new file mode 100644 index 00000000..830d9823 Binary files /dev/null and b/inst/resources/spp_img/Red_grouper.png differ diff --git a/inst/resources/spp_img/Shortspine_thornyhead.png b/inst/resources/spp_img/Shortspine_thornyhead.png new file mode 100644 index 00000000..8f92ab83 Binary files /dev/null and b/inst/resources/spp_img/Shortspine_thornyhead.png differ diff --git a/inst/resources/spp_img/Spanish_mackerel.png b/inst/resources/spp_img/Spanish_mackerel.png new file mode 100644 index 00000000..673f17ac Binary files /dev/null and b/inst/resources/spp_img/Spanish_mackerel.png differ diff --git a/inst/resources/spp_img/Spiny_lobster.png b/inst/resources/spp_img/Spiny_lobster.png new file mode 100644 index 00000000..a3fb789e Binary files /dev/null and b/inst/resources/spp_img/Spiny_lobster.png differ diff --git a/inst/resources/spp_img/Vermilion_snapper.png b/inst/resources/spp_img/Vermilion_snapper.png new file mode 100644 index 00000000..b269ab95 Binary files /dev/null and b/inst/resources/spp_img/Vermilion_snapper.png differ diff --git a/inst/resources/spp_img/White_shrimp.png b/inst/resources/spp_img/White_shrimp.png new file mode 100644 index 00000000..c77d178b Binary files /dev/null and b/inst/resources/spp_img/White_shrimp.png differ diff --git a/inst/resources/spp_img/Widow_rockfish.png b/inst/resources/spp_img/Widow_rockfish.png new file mode 100644 index 00000000..939f3f48 Binary files /dev/null and b/inst/resources/spp_img/Widow_rockfish.png differ diff --git a/inst/resources/spp_img/Yelloweye_rockfish.png b/inst/resources/spp_img/Yelloweye_rockfish.png new file mode 100644 index 00000000..d0a98949 Binary files /dev/null and b/inst/resources/spp_img/Yelloweye_rockfish.png differ diff --git a/man/create_figures_doc.Rd b/man/create_figures_doc.Rd index 074ce763..2e9af3ed 100644 --- a/man/create_figures_doc.Rd +++ b/man/create_figures_doc.Rd @@ -36,14 +36,17 @@ the stock (e.g., "BAM", "SS3", "AMAK", "ASAP", etc.).} \item{include_all}{TRUE/FALSE; Option to include all default figures for a stock assessment report. Default is true.} -\item{rda_dir}{The location of the folder containing .rda files -("rda_files") already made with \code{satf}, or, if the user has not used -\code{satf} to make those .rda files already, rda_dir represents the location -that will contain .rda files in an "rda_files" folder. The folder would have -been made with \code{satf::exp_all_figs_tables()}, or by exporting files -by running individual \code{satf} figure- and table-generating functions. -If you have used \code{satf} to generate these .rda files, you can leave -the arguments below blank.} +\item{rda_dir}{If the user has already created .rda files containing +figures, tables, alt text, and captions with \code{satf}, rda_dir represents +the location of the folder containing these .rda files ("rda_files"). +Otherwise, if the user has not used \code{satf} to make those .rda files already, +those files will be generated automatically and placed within the "report" +folder within the \code{file_dir}. The "rda_files" folder would have been +made with \code{satf::exp_all_figs_tables()}, or by exporting files by running individual +\code{satf} figure- and table-generating functions. If you have used \code{satf} to +generate these .rda files, you can leave the arguments below blank. NOTE: +If an "rda_files" folder is detected within rda_dir, .rda files will not be +regenerated.} } \value{ A quarto document with pre-loaded R chunk that adds the diff --git a/man/create_tables_doc.Rd b/man/create_tables_doc.Rd index 583dfc4e..7391713a 100644 --- a/man/create_tables_doc.Rd +++ b/man/create_tables_doc.Rd @@ -24,14 +24,17 @@ create_tables_doc( \item{include_all}{include all default tables for a stock assessment report} -\item{rda_dir}{The location of the folder containing .rda files -("rda_files") already made with \code{satf}, or, if the user has not used -\code{satf} to make those .rda files already, rda_dir represents the location -that will contain .rda files in an "rda_files" folder. The folder would have -been made with \code{satf::exp_all_figs_tables()}, or by exporting files -by running individual \code{satf} figure- and table-generating functions. -If you have used \code{satf} to generate these .rda files, you can leave -the arguments below blank.} +\item{rda_dir}{If the user has already created .rda files containing +figures, tables, alt text, and captions with \code{satf}, rda_dir represents +the location of the folder containing these .rda files ("rda_files"). +Otherwise, if the user has not used \code{satf} to make those .rda files already, +those files will be generated automatically and placed within the "report" +folder within the \code{file_dir}. The "rda_files" folder would have been +made with \code{satf::exp_all_figs_tables()}, or by exporting files by running individual +\code{satf} figure- and table-generating functions. If you have used \code{satf} to +generate these .rda files, you can leave the arguments below blank. NOTE: +If an "rda_files" folder is detected within rda_dir, .rda files will not be +regenerated.} } \value{ Create a quarto document as part of a stock assessment outline with diff --git a/man/create_template.Rd b/man/create_template.Rd index bc8fd474..08bc092d 100644 --- a/man/create_template.Rd +++ b/man/create_template.Rd @@ -39,13 +39,12 @@ create_template( add_image = FALSE, spp_image = NULL, bib_file = "asar_references.bib", - rda_dir = NULL, + rda_dir = getwd(), unit_label = "metric tons", scale_amount = 1, end_year = NULL, n_projected_years = 10, relative = FALSE, - make_rda = FALSE, ref_line = c("target", "MSY", "msy", "unfished"), spawning_biomass_label = "metric tons", recruitment_label = "metric tons", @@ -183,20 +182,23 @@ using the image included in the project's repository.} \item{bib_file}{File path to a .bib file used for citing references in the report} -\item{rda_dir}{The location of the folder containing .rda files -("rda_files") already made with \code{satf}, or, if the user has not used -\code{satf} to make those .rda files already, rda_dir represents the location -that will contain .rda files in an "rda_files" folder. The folder would have -been made with \code{satf::exp_all_figs_tables()}, or by exporting files -by running individual \code{satf} figure- and table-generating functions. -If you have used \code{satf} to generate these .rda files, you can leave -the arguments below blank.} +\item{rda_dir}{If the user has already created .rda files containing +figures, tables, alt text, and captions with \code{satf}, rda_dir represents +the location of the folder containing these .rda files ("rda_files"). +Otherwise, if the user has not used \code{satf} to make those .rda files already, +those files will be generated automatically and placed within the "report" +folder within the \code{file_dir}. The "rda_files" folder would have been +made with \code{satf::exp_all_figs_tables()}, or by exporting files by running individual +\code{satf} figure- and table-generating functions. If you have used \code{satf} to +generate these .rda files, you can leave the arguments below blank. NOTE: +If an "rda_files" folder is detected within rda_dir, .rda files will not be +regenerated.} \item{unit_label}{units for recruitment} \item{scale_amount}{indicate the exact amount of scale (i.e. 1000)} -\item{end_year}{last year of assessment} +\item{end_year}{The last year of assessment. The default is year - 1.} \item{n_projected_years}{Number of years spawning biomass is projected for. By default this number is set to 10} @@ -205,11 +207,6 @@ By default this number is set to 10} be relative spawning biomass. The default is `FALSE`. `ref_line` indicates which reference point to use.} -\item{make_rda}{This argument is automatically assessed based on the presence -or absence of .rda files and should be left blank. TRUE/FALSE; indicate -whether to produce an .rda file containing a list with the figure/table, -caption, and alternative text (if figure) for each figure and table.} - \item{ref_line}{An argument inherited from \code{satf::plot_spawning_biomass.R}. A string specifying the type of reference you want to compare spawning biomass to. The default is \code{"target"}, which looks for @@ -252,6 +249,7 @@ in the console. create_template( new_section = "a_new_section", section_location = "before-introduction", + rda_dir = here::here() ) @@ -269,6 +267,7 @@ create_template( model = "SS3", new_section = "an_additional_section", section_location = "after-introduction", + rda_dir = here::here() ) asar::create_template( @@ -283,7 +282,8 @@ asar::create_template( new_section = c("a_new_section", "another_new_section"), section_location = c("before-introduction", "after-introduction"), custom = TRUE, - custom_sections = c("executive_summary", "introduction") + custom_sections = c("executive_summary", "introduction"), + rda_dir = here::here() ) create_template( @@ -322,14 +322,13 @@ create_template( rda_dir = "C:/Users/Documents", unit_label = "metric tons", scale_amount = 1, - end_year = NULL, + end_year = 2022, n_projected_years = 10, relative = FALSE, - make_rda = FALSE, - ref_line = c("target", "MSY", "msy", "unfished"), + ref_line = "target", spawning_biomass_label = "metric tons", recruitment_label = "metric tons", - ref_line_sb = c("target", "MSY", "msy", "unfished") + ref_line_sb = "target" ) } diff --git a/tests/testthat/test-create_template.R b/tests/testthat/test-create_template.R index 7f41a68f..fef2eed7 100644 --- a/tests/testthat/test-create_template.R +++ b/tests/testthat/test-create_template.R @@ -84,10 +84,10 @@ test_that("create_template() creates correct files", { year = year, author = c("John Snow", "Danny Phantom", "Patrick Star"), include_affiliation = TRUE, - parameters = FALSE, - resdir = "data", - model_results = "Report.sso", - model = "SS3" + parameters = FALSE + # resdir = "data", + # model_results = "Report.sso", + # model = "SS3" ) long_inputs_output_path <- file.path(path, "report") @@ -165,10 +165,10 @@ test_that("warning is triggered for existing files", { year = 2010, author = c("John Snow", "Danny Phantom", "Patrick Star"), include_affiliation = TRUE, - parameters = FALSE, - resdir = "data", - model_results = "Report.sso", - model = "SS3" + parameters = FALSE + # resdir = "data", + # model_results = "Report.sso", + # model = "SS3" ) # Test if warning is triggered when there are existing files in the provided location @@ -188,10 +188,10 @@ test_that("warning is triggered for existing files", { year = 2010, author = c("John Snow", "Danny Phantom", "Patrick Star"), include_affiliation = TRUE, - parameters = FALSE, - resdir = "data", - model_results = "Report.sso", - model = "SS3" + parameters = FALSE + # resdir = "data", + # model_results = "Report.sso", + # model = "SS3" ), regexp = "There are files in this location." ) @@ -220,9 +220,9 @@ test_that("file_dir works", { author = c("John Snow", "Danny Phantom", "Patrick Star"), include_affiliation = TRUE, parameters = FALSE, - resdir = "data", - model_results = "Report.sso", - model = "SS3", + # resdir = "data", + # model_results = "Report.sso", + # model = "SS3", file_dir = dir ) diff --git a/vignettes/accessibility_guide.Rmd b/vignettes/accessibility_guide.Rmd index 018bbaa2..b840d69f 100644 --- a/vignettes/accessibility_guide.Rmd +++ b/vignettes/accessibility_guide.Rmd @@ -162,7 +162,7 @@ recruitment_alt_text <- new_alt_text 1. Changes to your alt text will be saved within your 09_figures.qmd file, but not within the rda file itself. 2. Edit figure and table captions with the same process. Just substitute mentions of alt text with caption or cap, depending on the context. -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 to view the template with placeholders. The `write_captions()` function in the `satf` package shows how values are extracted from the model results and substituted into the placeholders. +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 `satf` 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. ### More resources