Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add composition plots for diagnostics etc

Open
#422 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
15/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
r

Research direction

The issue lists seven composition plot types (observed-only distributions, bubble plots, observed-vs-expected distributions, Pearson residuals, sex ratios, mean age or length time series, plus fleet-specific and aggregated variants) but names no stockplotr file, function or test. Start by reading the existing plotting functions in the R package and the r4ss examples linked in the issue, then agree with maintainers on the input data format and which plot to build first. Done means one plot type generates from composition data and has a test.

Written by the indexing model from the issue text.

Description

See this conversation for more detail https://github.com/NOAA-FIMS/FIMS/pull/1873 from @iantaylor-NOAA

The categories of composition that r4ss creates for SS3 models include

  • Distribution plots of observations only (I think this is the most intuitive way to look at comps)
  • Bubble plots of observations only (Easier to see patterns of cohort strengths across years)
  • Distribution plots of observations and expected values (intuitive way to look at fit)
  • Pearson residuals (more statistically rigorous way to look at fit, easier to see blocks/stripes of misfit among years or bins)
  • Sex ratios implied by the ratio of female / (female + male) observed and expected comps (helps see trends in lack of fit, especially for bins with smaller proportions that have small residuals)
  • Time series of mean age or length in the observed and expected comps (created as diagnostic for Francis weighting method, but very helpful to summarize trends among years)
  • The set include both fleet-specific plots and plots for all fleets aggregated across years.

Examples of the r4ss plots are at

https://r4ss.github.io/r4ss/BigSkate/_SS_output_CompDat.html (observations only)
https://r4ss.github.io/r4ss/BigSkate/_SS_output_LenComp.html (most of the rest)
https://r4ss.github.io/r4ss/BigSkate/[email protected] (residuals and "Andre plots" for conditional age-at-length data)

Dominant language
R
Stars
20
Forks
9
Avg merge
1d 5h
Merged PRs (30d)
12

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nmfs-ost/stockplotr

All issues in nmfs-ost/stockplotr

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.