Package: stockplotr 0.16.0

Samantha Bredeck

stockplotr: Tables and Figures for Stock Assessments

Creates exploratory and finished tables and figures for stock assessment documents from U.S. stock assessment model outputs. This packages addresses parts of the stock assessment workflow that interprets outputs of stock assessment models as well as allows the analyst to create report ready tables and figures, reducing the need to create their own and format then when adding into a report. This package is intended to be used in conjuction with 'asar', a partially automated template for writing various stock assessment reports. Throughout development, we will be creating a set of standardized figures and tables for a stock assessment report, developing functions to produce a variety of diagonostic plots, and other helpful materials. The advantage of using this package over others is that it applies to a range of stock assessment model outputs and standardizes them.

Authors:Samantha Bredeck [aut, cre], Sophie Breitbart [aut, ctb], Steve Saul [aut], Kelli Johnson [ctb], Megumi Oshima [ctb]

stockplotr_0.16.0.tar.gz
stockplotr_0.16.0.zip(r-4.7-any)stockplotr_0.16.0.zip(r-4.6-any)stockplotr_0.16.0.zip(r-4.5-any)
stockplotr_0.16.0.tgz(r-4.6-any)stockplotr_0.16.0.tgz(r-4.5-any)
stockplotr_0.16.0.tar.gz(r-4.7-any)stockplotr_0.16.0.tar.gz(r-4.6-any)
stockplotr_0.16.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
card.svg |card.png
stockplotr/json (API)

# Install 'stockplotr' in R:
install.packages('stockplotr', repos = c('https://noaa-fisheries-integrated-toolbox.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/nmfs-ost/stockplotr/issues

Datasets:

On CRAN:

Conda:

7.98 score 20 stars 1 packages 19 scripts 38 exports 65 dependencies

Last updated from:f2aff6ae12 (on v0.16.0). Checks:7 WARNING, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develWARNING333
source / vignettesOK301
linux-releaseWARNING344
macos-releaseWARNING458
macos-oldrelWARNING450
windows-develWARNING389
windows-releaseWARNING428
windows-oldrelWARNING413
wasm-releaseOK149

Exports:add_caption_alt_textcalculate_reference_pointconvert_outputcreate_latex_tablecreate_rdaexport_rdaextract_caps_alttextextract_sis_datafilter_dataplot_aaplot_abundance_at_ageplot_biomassplot_biomass_at_ageplot_catch_at_ageplot_discardplot_fishing_mortalityplot_indexplot_landingsplot_natural_mortalityplot_obsvpredplot_recruitmentplot_recruitment_deviationsplot_selectivityplot_spawning_biomassplot_sprplot_stock_recruitmentplot_timeseriesprocess_dataprocess_tablereference_linesave_all_plotstable_biomass_abundance_catchtable_indextable_landingstable_projectionstable_total_catchtheme_noaatheme_table

Dependencies:base64encbigDbitopsbslibcachemclicommonmarkcpp11curldata.tabledigestdplyrevaluatefarverfastmapfontawesomefsgenericsggplot2gluegtgtablehighrhtmltoolshtmlwidgetsisobandjquerylibjsonlitejuicyjuiceknitrlabelinglifecyclelitedownmagrittrmarkdownmemoisemimepillarpkgconfigpurrrR6rappdirsRColorBrewerRcppreactablereactRrlangrmarkdownS7sassscalesstringistringrtibbletidyrtidyselecttinytexutf8V8vctrsviridisLitewithrxfunxml2yaml

How captions and alternative text are generated
Templates | Calculating and exporting captions and alternative text | Connecting the tables & figures with the captions & alternative text | Expected outcomes | Single plot functions | Multi-plot functions

Last update: 2026-11-04
Started: 2025-03-18

Automating data extraction for SIS
Background | Workflow Overview | How to run extract_sis_data() | Familiarize yourself with the two templates | sis_assmt_template.csv | sis_ts_template.csv | Export at least one relevant figure/table as an .rda file | Provide the path to the key_quantities.csv file | Time series | Assessment data | Provide assessment data before or after running extract_sis_data() to populate additional fields | Provide additional time series data

Last update: 2026-10-16
Started: 2026-10-16

Frequently Asked Questions (FAQs)
Captions and alternative text (alt text) | How are captions and alt text constructed? | How can I alter the captions and/or alt text? | If I recreate a figure or table, will its caption and/or alt text be updated/overwritten? | How can I change or update captions and alt text? | Individual figures/tables (e.g., plot_biomass()) | All available figures and tables (e.g., save_all_plots())

Last update: 2026-06-30
Started: 2026-05-08

Standardizing Assessment Model Output
Background | Set up and format | Naming Conventions | Final Formatting | Helpful Functions to Manipulate Data

Last update: 2026-05-18
Started: 2025-12-31

Readme and manuals

Help Manual

Help pageTopics
Add caption and alt text to the captions_alt_text.csv fileadd_caption_alt_text
Calculate key quantitiescalc_kqs
Calculate reference value pointcalculate_reference_point
Create loop to test for differences in column valuescheck_label_differences
Code to convert BAM output to standard framework.conout_bam
Code to convert Rceattle output to standard framework.conout_rceattle
Code to convert SS3 output to standard framework.conout_ss3
Convert Outputconvert_output
Create the rda package for a plot or tablecreate_latex_table
Create the rda package for a plot or tablecreate_rda
SS3 Example dataexample_data
Export updated key quantities templateexport_kqs
Export a figure or table to rdaexport_rda
Extract captions and alternative textsextract_caps_alttext
Extract data from model results to send to SISextract_sis_data
Substitute key quantities' values into templatefill_in_kqs
Filter data for input into aesthetics for ggplot2filter_data
Insert key quantities into the captions and alternative text fileinsert_kqs
Rename columns and merge estimate and uncertainty columns for table presentationmerge_error
Create "at-age" plotplot_aa
Plot Abundance at Ageplot_abundance_at_age
Plot Total Biomassplot_biomass
Plot Total Biomass at Age (BAA)plot_biomass_at_age
Plot catch-at-ageplot_catch_at_age
Plot discardsplot_discard
Create plot with errorplot_error
Plot fishing mortality timeseriesplot_fishing_mortality
Plot Index of Abundanceplot_index
Plot observed landingsplot_landings
Plot natural mortality (M) at ageplot_natural_mortality
Plot observed vs. predicted dataplot_obsvpred
Plot Recruitmentplot_recruitment
Plot recruitment deviationsplot_recruitment_deviations
Plot selectivityplot_selectivity
Plot spawning biomass (SB)plot_spawning_biomass
Plot spawning potential ratio (SPR)plot_spr
Plot Stock Recruit Relationshipplot_stock_recruitment
Plot time series trendsplot_timeseries
2018 Gulf of Alaska Pollock stock assessment outputpollock
Processing for figuresprocess_data
Processing for tablesprocess_table
Preformatted reference linereference_line
Export all figures and tablessave_all_plots
SS3 Simple stock assessment outputss3_simple
Biomass, abundance, and catch time series tabletable_biomass_abundance_catch
Index of abundance tabletable_index
Landed catch by fleet and year tabletable_landings
Create Projection Summary Tabletable_projections
Catch (table) by fleet, gear type, sectortable_total_catch
Add NOAA theming to ggplot2 objecttheme_noaa
Add NOAA formatting to a tabletheme_table
SEDAR 55 South Atlantic Vermilion Snappervermilion_snapper