# mcgoodman/ebs_range_projections architecture

> Architecture diagram of the GitHub repository mcgoodman/ebs_range_projections, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mcgoodman/ebs_range_projections
- Repository: https://github.com/mcgoodman/ebs_range_projections

## Overview

This is a research R project for analyzing climate-driven species range shifts in the Eastern Bering Sea. The documented user workflow is to provide the required ROMS-NPZ and size-binned survey inputs, then source `make.R` in RStudio to run analyses that download and bias-correct climate output, fit species-distribution models, and produce range maps and other derived quantities. The package also provides spatial, ROMS Level 2, model-selection, overlap, and smoothing utilities. Source excerpts were unavailable, so relationships are limited to those documented in the README.

Main entry points: [`analysis`](https://github.com/mcgoodman/ebs_range_projections/tree/main/analysis) (Project analyses), [`make.R`](https://github.com/mcgoodman/ebs_range_projections/blob/main/make.R) (Analysis runner), [`data`](https://github.com/mcgoodman/ebs_range_projections/tree/main/data) (ROMS-NPZ output), [`data/trawl_surveys`](https://github.com/mcgoodman/ebs_range_projections/tree/main/data/trawl_surveys) (Size-binned CPUE)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Analysis workflow"]
  node_make["Analysis runner<br/>[make.R]"]
  node_analyses["Project analyses"]
  node_climate["Climate processing"]
  node_sdm["Species models"]
  node_ranges["Range outputs"]
end

subgraph group_package["R functions"]
  node_selection["Model selection<br/>[model_selection.R]"]
  node_overlap["Range overlap<br/>[overlap.R]"]
  node_smoother["Smoother plots<br/>[plot_smoother.R]"]
  node_roms["ROMS Level 2<br/>[roms_level2.R]"]
  node_spatial["Spatial utilities<br/>[spatial.R]"]
end

subgraph group_inputs["Project inputs"]
  node_trawl[("Trawl survey data")]
  node_romsdata[("ROMS-NPZ output")]
  node_sizebinned[("Size-binned CPUE")]
  node_gis[("GIS resources")]
end

node_researcher(("Researcher"))

node_researcher -->|"sources in RStudio"| node_make
node_make -->|"runs analyses"| node_analyses
node_analyses -->|"includes"| node_climate
node_analyses -->|"includes"| node_sdm
node_analyses -->|"produces"| node_ranges
node_romsdata -->|"supplies model output"| node_climate
node_sizebinned -->|"supplies survey input"| node_analyses

click node_make "https://github.com/mcgoodman/ebs_range_projections/blob/main/make.R"
click node_analyses "https://github.com/mcgoodman/ebs_range_projections/tree/main/analysis"
click node_climate "https://github.com/mcgoodman/ebs_range_projections/tree/main/analysis"
click node_sdm "https://github.com/mcgoodman/ebs_range_projections/tree/main/analysis"
click node_ranges "https://github.com/mcgoodman/ebs_range_projections/tree/main/analysis"
click node_selection "https://github.com/mcgoodman/ebs_range_projections/blob/main/R/model_selection.R"
click node_overlap "https://github.com/mcgoodman/ebs_range_projections/blob/main/R/overlap.R"
click node_smoother "https://github.com/mcgoodman/ebs_range_projections/blob/main/R/plot_smoother.R"
click node_roms "https://github.com/mcgoodman/ebs_range_projections/blob/main/R/roms_level2.R"
click node_spatial "https://github.com/mcgoodman/ebs_range_projections/blob/main/R/spatial.R"
click node_trawl "https://github.com/mcgoodman/ebs_range_projections/tree/main/data/trawl_surveys"
click node_romsdata "https://github.com/mcgoodman/ebs_range_projections/tree/main/data"
click node_sizebinned "https://github.com/mcgoodman/ebs_range_projections/tree/main/data/trawl_surveys"
click node_gis "https://github.com/mcgoodman/ebs_range_projections/tree/main/inst/GIS"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_make,node_analyses,node_climate,node_sdm,node_ranges toneBlue
class node_selection,node_overlap,node_smoother,node_roms,node_spatial toneAmber
class node_trawl,node_romsdata,node_sizebinned,node_gis toneMint
class node_researcher toneIndigo
```

## Components

### Analysis workflow

- [Analysis runner](https://github.com/mcgoodman/ebs_range_projections/blob/main/make.R): `make.R`
- [Project analyses](https://github.com/mcgoodman/ebs_range_projections/tree/main/analysis): `analysis`
- [Climate processing](https://github.com/mcgoodman/ebs_range_projections/tree/main/analysis): `analysis`
- [Species models](https://github.com/mcgoodman/ebs_range_projections/tree/main/analysis): `analysis`
- [Range outputs](https://github.com/mcgoodman/ebs_range_projections/tree/main/analysis): `analysis`

### R functions

- [Model selection](https://github.com/mcgoodman/ebs_range_projections/blob/main/R/model_selection.R): `R/model_selection.R`
- [Range overlap](https://github.com/mcgoodman/ebs_range_projections/blob/main/R/overlap.R): `R/overlap.R`
- [Smoother plots](https://github.com/mcgoodman/ebs_range_projections/blob/main/R/plot_smoother.R): `R/plot_smoother.R`
- [ROMS Level 2](https://github.com/mcgoodman/ebs_range_projections/blob/main/R/roms_level2.R): `R/roms_level2.R`
- [Spatial utilities](https://github.com/mcgoodman/ebs_range_projections/blob/main/R/spatial.R): `R/spatial.R`

### Project inputs

- [Trawl survey data](https://github.com/mcgoodman/ebs_range_projections/tree/main/data/trawl_surveys): `data/trawl_surveys`
- [ROMS-NPZ output](https://github.com/mcgoodman/ebs_range_projections/tree/main/data): `data`
- [Size-binned CPUE](https://github.com/mcgoodman/ebs_range_projections/tree/main/data/trawl_surveys): `data/trawl_surveys`
- [GIS resources](https://github.com/mcgoodman/ebs_range_projections/tree/main/inst/GIS): `inst/GIS`

### Other components

- **Researcher**

## Connections

- Researcher → Analysis runner: sources in RStudio (evidence: `README.md`)
- Analysis runner → Project analyses: runs analyses (evidence: `README.md`)
- Project analyses → Climate processing: includes (evidence: `README.md`)
- Project analyses → Species models: includes (evidence: `README.md`)
- Project analyses → Range outputs: produces (evidence: `README.md`)
- ROMS-NPZ output → Climate processing: supplies model output (evidence: `README.md`)
- Size-binned CPUE → Project analyses: supplies survey input (evidence: `README.md`)
