Data and code for analyses of sampling uncertainty in published projection matrices.
This repository is organized to support replicability and FAIR principles. The main analysis workflow lives in scripts/, reusable functions in code/, models in models/, and data split into data/raw/ (as obtained) and data/derived/ (processed/intermediate).
- Run
scripts/00_check_setup.Rto verify packages and required inputs. - Start with
scripts/in numeric order (S01 ... S14). Each script is intended to be run after prior steps. - Outputs that are reused across scripts are cached under
data/derived/analysis_cache/. - Figures are written to
figures/with filenames set in the scripts.
- COMPADRE: canonical snapshot
v6.26.3.0plus a project-specific corrected copy generated byscripts/S01_compadre_correct.R(recorded indata/metadata/sources.md). - Ellis et al. (2012) supplemental matrices.
- PRISM climate rasters are downloaded via
prismconfigured bysetup_prism()incode/setup.R, used inscripts/S11_case_study_2_prism.R, which writes todata/raw/prism/and should run beforescripts/S12_case_study_2.Rfor analysis 2.
code/Reusable R functions used by multiple scripts.scripts/Analysis scripts (numbered, run in order).models/Stan model definitions.data/raw/Raw source data, as obtained from external sources.data/derived/Processed data and intermediate analysis artifacts.data/metadata/Data dictionaries and provenance notes.figures/Generated figures for the paper.docs/Notes, methods, and documentation.docs/manuscript/Main manuscript and supplement Rmd files, render scripts, and submission materials.
- Some external data sources require download (e.g., PRISM rasters). Use the
prismR package workflow inscripts/S11_case_study_2_prism.Rwhich stores files underdata/raw/prism/(ignored by git). Seedata/metadata/.