generateRapidStatus: generateRapidStatus

View source: R/Module_generateRapidStatus.R

generateRapidStatusR Documentation

generateRapidStatus

Description

this function reorganizes the outputs from prepDataForRapidStatus(), applies the function applyRapidStatusTree(), and then does some post-processing. Note: "proxy" statuses for some CUs are being explored, but are not yet included in this function!

Usage

generateRapidStatus(
  cu.info,
  cu.data,
  publ.status.src,
  retro.values,
  retro.status,
  metrics.long,
  group.var = "Species",
  out.label = "RapidStatusOut",
  out.filepath = ""
)

Arguments

cu.info

a data frame with specifications for each CU. For details, see help file for calculateMetricsByCU().

cu.data

a data frame with CU time series. This is the same data frame used for the cu.file argument in the call to calculateMetricsbyCU() and is included as the $Data list element in the output from that function. For details, see that help file.

publ.status.src

a data frame with Red/Amber/Green designations from integrated status workshops. Required variables are CU_ID,Year, Status. Status is one of Red, RedAmber, Amber, AmberGreen, or Green.

retro.values

data frame with retrospective values for individual WSP status metrics (e.g., long-term trend). Part of output from prepDataForRapidStatus().

retro.status

data frame with retrospective status categories for individual WSP status metrics (e.g., long-term trend). Part of output from prepDataForRapidStatus().

metrics.long

long form version of retrospective metric results. Part of output from prepDataForRapidStatus().

group.var

variable for grouping output. Default is 'Species'.

out.label

label to use in the filenames for the output

out.filepath

folder for storing the output files


Pacific-salmon-assess/WSP-Metrics-Pkg documentation built on July 16, 2025, 1:46 p.m.