Skip to content

DeepWaterIMR/ref-index-paper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Redfish Survey Index Showcase

Code repository for Vihtakari et al. (2026): Demersal distribution and fisheries‑independent trends of beaked and golden redfish in the Barents and Norwegian Seas. ICES Journal of Marine Science. https://doi.org/10.1093/icesjms/fsag009

The goal is not to reconstruct the published paper results exactly. The paper used internal and partly restricted data. This public workflow demonstrates the model structure on an updated, curated dataset with Russian data excluded by default.

Documentation

The Quarto documents in docs/SI files/ are the supplementary-information text of the paper and are the primary demonstration of how the survey index was calculated:

  • SI-Text-1-data.qmd — data
  • SI-Text-2-sdmTMB.qmd — spatiotemporal modelling
  • SI-Text-3-model-selection.qmd — model selection
  • SI-Text-4-length-based-models.qmd — length-based models for redfish
  • SI-Text-5-bottom-temperature.qmd — bottom temperature modelling

They render against the public data in data/public/ and the showcase model outputs, and share a bibliography and citation style file kept at data/bibliography/.

docs/data/ holds the original data-compilation notebooks used to extract and prepare source survey data from the IMR BioticExplorerServer database. They only run on computers with local access to that database and depend on R/read_spd_1_6.R and R/run_first_bes.R. They are kept for reference/reproducibility of the data-compilation steps described in the paper; they are not required to run the public showcase workflow below.

Data

The public analysis starts from sanitized station-level files in data/public/. A matching public dataset is intended to be available from NMDC: https://doi.org/10.21335/NMDC-999805712.

When data/survey data/Compiled_redfish_survey_data.rda is present, the public-prep step uses that compiled survey source directly before applying the spatial public filter.

Russian data are excluded by default using:

  • a study-area polygon stored at data/gis/study area.gpkg,
  • a Russian EEZ polygon stored at data/gis/russian_eez.shp.

IMR users who are allowed to work with the restricted data can rerun the pipeline with INCLUDE_RUSSIAN_DATA=true. This switch is intentionally opt-in.

Run

Install dependencies from renv.lock when available, then run:

source("run_analysis.R")

The default model run is a quick, rerunnable showcase. To attempt the larger model fit, set SMOKE_TEST=false.

For IMR-internal data refreshes, set the path to a local BioticExplorerServer DuckDB database before running:

export UPDATE_BES=true
export BES_DATABASE_PATH="paste your BES database path here"

The local DuckDB path is deliberately not stored in the repository.

Outputs

The workflow writes:

  • sanitized station data to data/public/,
  • sanitized length data unless INCLUDE_LENGTH_DATA=false,
  • a cruise summary with an automatically updated included column,
  • a filtered station map to figures/,
  • duplicate and exclusion review tables,
  • showcase model outputs under output/.

review/ and output/ are local QA products and are ignored by Git unless explicitly reviewed for public release.

About

Code for the Vihtakari et al. 2026. Demersal distribution and fisheries independent trends of beaked and golden redfish in the Barents and Norwegian Seas. ICES Journal of Marine Research. https://doi.org/10.1093/icesjms/fsag009

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors