← Back to all sparks
N

NWCTrends

ANALYTICS
Velocity0.0

Standardized Trend Metrics for Salmonid Populations

The salmon status-review trend package, maintained one federal review cycle at a time

fisheriesstate-space-modelsreproducible-reportingr-packageconservation
Current state
NWCTrends fits multivariate state-space trend models to Pacific salmon population data and generates the tables and figures used in NOAA Northwest Fisheries Science Center viability and status reviews. Its release history maps onto those review cycles rather than a development calendar: v1.0 carries the 2015 review code, v1.25 the 2020 review, v1.30 the changes since. The 2026 v1.31 is internal restructuring and a dependency swap.
Where it's heading
Development is driven by reproducibility of a specific government reporting product, so most work goes into making the report generation configurable and the fitting assumptions explicit rather than into new modelling. The 2020 cycle removed hard-coded per-population hacks and made the fitting window an explicit argument; the 2023 cycle moved plot styling into package options and clarified how missing data and zeros are handled in the published tables.
Prediction
The cadence suggests the next substantive release arrives with the next status review rather than before it, most likely continuing the move of report parameters out of function signatures and into structured configuration.

Recent moves

  1. 7mo ago

    Report params extracted to a list; gdata replaced with readxl

    Moves report parameters into report_params.R so they can be returned as a list instead of passed around, relocates PDFs into /reports with build ignores, and swaps gdata for readxl after gdata dropped Excel reading. Internal restructuring and a forced dependency change, with no effect on model output.

    View source ↗
  2. 3y ago

    Plot options move into package globals; figure data exported to CSV

    Replaces the nwctrends.palette approach with a package-environment options list users can override, exports productivity figure data as CSV, and clarifies in table captions how zeros and differing year counts are handled in geomeans. The bulk of it is about making published tables self-explanatory and plots customisable without editing the package.

    View source ↗
  3. 5y ago

    Explicit fitting window replaces implicit full-data fits

    The version used for the 2020 status review. Adds fit.min.year and fit.max.year to data_setup() so the fitting window is what the caller asked for rather than the full span of available data, and removes the hard-coded Q estimate for Ozette Lake sockeye. Both changes make the 2020 results reproducible in a way the 2015 run was not.

    View source ↗
  4. 5y ago

    Initial release packaging the 2015 status review code

    The first tagged version, assembling the code behind the 2015 status review into a package after the fact. It establishes the pattern the project has followed since: analysis first, package second, tagged per review cycle.

    View source ↗