Skip to content

create initial versions of composition plots - #424

Open
ericward-noaa wants to merge 5 commits into
nmfs-ost:mainfrom
ericward-noaa:feat/composition-plots
Open

ericward-noaa wants to merge 5 commits into
nmfs-ost:mainfrom
ericward-noaa:feat/composition-plots

Conversation

@ericward-noaa

Copy link
Copy Markdown

This PR is related to this FIMS discussion, NOAA-FIMS/FIMS#1873, and this r4ss issue r4ss/r4ss#1104 (comment), the need to generate composition plots.

Copilot summary:
This pull request adds a comprehensive set of tools for visualizing and diagnosing composition data (age/length) in fisheries stock assessment, including new plotting functions, example data, and extensive documentation. The main changes are the introduction of new plotting functions for composition data and their documentation, the addition of a simulated example dataset, and updates to the package exports and documentation to support these features.

New composition plotting and diagnostics functionality:

  • Added new plotting functions for composition data: plot_comp, plot_comp_bubble, plot_comp_mean, plot_comp_residuals, and plot_comp_sex_ratio, along with a data preparation function prepare_comp_data. These functions provide a variety of diagnostic plots for observed and expected age/length compositions, including bubble plots, mean trends, Pearson residuals, and sex ratio plots. [1] [2]

  • Added man page documentation for all new functions, describing their usage, arguments, outputs, and examples: plot_comp.Rd, plot_comp_bubble.Rd, plot_comp_mean.Rd, plot_comp_residuals.Rd, plot_comp_sex_ratio.Rd, and prepare_comp_data.Rd. [1] [2] [3] [4] [5] [6]

Example data and reproducibility:

  • Added a new simulated dataset example_comp_data (with generation code and documentation) to demonstrate the composition plotting functions. This data includes sex-specific age compositions for a fishery and a survey, with known patterns of misfit for testing diagnostics. [1] [2] [3]

Documentation and navigation updates:

  • Updated the package documentation site navigation to include a new article on composition data diagnostics, making it easier for users to find and learn about these new features.

These changes significantly expand the package's capabilities for composition data analysis and provide users with tools and guidance for diagnosing model fit to age/length compositions.

ericward-noaa and others added 5 commits October 16, 2026 07:20
Added new entries to the WORDLIST file.
- change example / diagnostic dataset from simulated to big skate
- added more plots from ian's list
- more / better tests
forgot to run spell_check_package()
added a few missing words

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant