This repository contains the minimal data and R scripts to reproduce the analyses and figures associated with the manuscript entitled "Abrupt declines in fish productivity are associated with ocean warming at global scale".
The analyses were run using R version 4.3.3.
The 'R' directory contains the functions used for performing the analyses and the figures.
00_Rpackages.R loads R packages. Some may not be installed, if so the command to install them is indicated.
01_datasets.R downloads and prepares datasets.
02_classification.R defines the fish stocks suitable for the trajectory classification, computes surplus production, and performs the classification for each time series.
03_analyses.R produces the figures and additional analyses.
04_supplementary.R produces the supplementary figures.