This repository contains an R package for calculating morphometric condition indicators based on residuals of length-weight relationships. The package also includes wrapper functions to generate morphometric condition indicators using the R package VAST (https://github.com/James-Thorson-NOAA/VAST). The code in this repository generates Groundfish Morphometric Condition Indicators for the Aleutian Islands, Bering Sea, and Gulf of Alaska Ecosystem Status Report and juvenile and adult Pacific cod condition indicators for Ecosystem and Socioeconomic Profiles.
The most recent version of this package was built in R 4.3.1.
akfishcondition can be installed using the following code:
devtools::install_github("afsc-gap-products/akfishcondition")
Estimating morphometric condition using the VAST package requires installation of the VAST package.
- AI_INDICATOR
Data frame containing Aleutian Islands length-weight residual condition indicator based on AFSC summer bottom trawl survey data from 1986 to 2022.
- GOA_INDICATOR
Data frame containing Gulf of Alaska length-weight residual condition indicator (years: 1984-2023).
- EBS_INDICATOR
Data frame containing Eastern Bering Sea length-weight residual condition indicator based on AFSC summer bottom trawl survey data from 1999 to 2023.
- NBS_INDICATOR
Data frame containing Northern Bering Sea length-weight residual condition indicator based on AFSC summer bottom trawl survey data from 2010 to 2022
- PCOD_ESP
List containing data frames with adult and juvenile Pacific cod length-weight residual condition indicator from AFSC summer bottom trawl survey data from the eastern Bering Sea (1999-2023), Aleutian Islands (1986-2022), Gulf of Alaska (1984-2023). Length cut-offs between adults and juveniles are region-specific and based on Essential Fish Habitat thresholds.
Fish length, weight, and design-based biomass index data are included in the package as external data sets that are accessible through system commands.
- Clone the akfishcondition package to a local directory.
- Set up an R Studio project in the local directory.
- Open 0_update_condition_data.Rmd and follow instructions for updating akfishcondition with new data.
- Update ESR condition indicator chapters (.Rmds) and ESP files.
- Update DESCRIPTION with new version number.
- Push akfishcondition update to GitHub.
- Create new version, with version number corresponding with the version listed in DESCRIPTION.
Groundfish morphometric condition indicators are included in this repository as R Markdown (.Rmd) files. To generate ESR chapters from ESR files:
- Install the akfishcondition package by following the installation instructions above.
- Download the chapter .rmd file from the akfishcondition repository.
- Set your working directory to the folder containing the .rmd files.
- Knit .rmd files to .docx