# weecology/mvgamportal architecture

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

- Interactive diagram: https://gitdiagram.com/weecology/mvgamportal
- Repository: https://github.com/weecology/mvgamportal

## Overview

This R project appears to provide forecasting models and analysis tools, with a Shiny app and case-study workflows. The file names indicate stages for preparing train/test splits, fitting models, producing forecasts, and evaluating skill. The README is empty in the supplied material and no source excerpts were available, so call relationships and data flow between these stages cannot be verified; the graph therefore records the major components without implying a pipeline.

Main entry points: [`app.R`](https://github.com/weecology/mvgamportal/blob/main/app.R) (Shiny App)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_shiny_app["Shiny App<br/>[app.R]"]
end

subgraph group_forecast["Forecasting"]
  node_forecast_api["Forecasting<br/>[forecasting.R]"]
  node_model_registry["Model Definitions<br/>[models.R]"]
  node_ar_models["AR Models<br/>[AR.R]"]
  node_single_species["Single Species"]
  node_baseline["Baseline Model<br/>[BASELINE.R]"]
  node_gam_ar["GAM AR<br/>[GAM_AR.R]"]
  node_gam_var["GAM VAR<br/>[GAM_VAR.R]"]
  node_simple_model["Simple Model<br/>[SIMPLE.R]"]
  node_separate_models["Separate Models<br/>[sAR_separate.R]"]
  node_temperature_models["Temperature Models<br/>[tempAR_separate.R]"]
  node_regime["Regime Detection<br/>[get_regime.R]"]
  node_train_test["Train Test Split<br/>[split_train_test.R]"]
  node_forecast_plots["Forecast Plots<br/>[forecast_plots.r]"]
end

subgraph group_evaluation["Evaluation"]
  node_skill_scores["Skill Scores<br/>[skill_scores.r]"]
  node_loo["LOO Comparison<br/>[loo_comparison.R]"]
  node_evaluation_viz["Evaluation Visuals<br/>[evaluation_viz.R]"]
  node_simple_evaluation["Simple Evaluation"]
end

subgraph group_studies["Case Studies"]
  node_study_fitting["Model Fitting"]
  node_study_processing["Model Processing"]
  node_prior_fitting["Prior Fitting"]
  node_baseline_priors["Baseline Priors"]
  node_plot_skills["Skill Plots<br/>[plot_skills.R]"]
  node_input_data["Input Data<br/>[data_all.rds]"]
  node_regime_data["Regime Data<br/>[data_pb_regime.rds]"]
  node_skill_results["Skill Results<br/>[model_skills.csv]"]
end

node_user(("User"))

node_user -->|"opens"| node_shiny_app

click node_shiny_app "https://github.com/weecology/mvgamportal/blob/main/app.R"
click node_forecast_api "https://github.com/weecology/mvgamportal/blob/main/R/forecasting.R"
click node_model_registry "https://github.com/weecology/mvgamportal/blob/main/R/models.R"
click node_ar_models "https://github.com/weecology/mvgamportal/blob/main/R/models/AR.R"
click node_single_species "https://github.com/weecology/mvgamportal/blob/main/R/models/AR_SINGLE_SPECIES.R"
click node_baseline "https://github.com/weecology/mvgamportal/blob/main/R/models/BASELINE.R"
click node_gam_ar "https://github.com/weecology/mvgamportal/blob/main/R/models/GAM_AR.R"
click node_gam_var "https://github.com/weecology/mvgamportal/blob/main/R/models/GAM_VAR.R"
click node_simple_model "https://github.com/weecology/mvgamportal/blob/main/R/models/SIMPLE.R"
click node_separate_models "https://github.com/weecology/mvgamportal/blob/main/R/models/sAR_separate.R"
click node_temperature_models "https://github.com/weecology/mvgamportal/blob/main/R/models/tempAR_separate.R"
click node_regime "https://github.com/weecology/mvgamportal/blob/main/R/get_regime.R"
click node_train_test "https://github.com/weecology/mvgamportal/blob/main/R/split_train_test.R"
click node_forecast_plots "https://github.com/weecology/mvgamportal/blob/main/R/forecast_plots.r"
click node_skill_scores "https://github.com/weecology/mvgamportal/blob/main/R/skill_scores.r"
click node_loo "https://github.com/weecology/mvgamportal/blob/main/R/loo_comparison.R"
click node_evaluation_viz "https://github.com/weecology/mvgamportal/blob/main/R/evaluation_viz.R"
click node_simple_evaluation "https://github.com/weecology/mvgamportal/blob/main/R/simple_evaluation_viz.R"
click node_study_fitting "https://github.com/weecology/mvgamportal/blob/main/case_study/case_study_model_fitting.R"
click node_study_processing "https://github.com/weecology/mvgamportal/blob/main/case_study/case_study_model_processing.R"
click node_prior_fitting "https://github.com/weecology/mvgamportal/blob/main/case_study/case_study_PP_fitting.R"
click node_baseline_priors "https://github.com/weecology/mvgamportal/blob/main/case_study/case_study_baseline_priors.R"
click node_plot_skills "https://github.com/weecology/mvgamportal/blob/main/case_study/plot_skills.R"
click node_input_data "https://github.com/weecology/mvgamportal/blob/main/data_all.rds"
click node_regime_data "https://github.com/weecology/mvgamportal/blob/main/data_pb_regime.rds"
click node_skill_results "https://github.com/weecology/mvgamportal/blob/main/case_study/model_outputs/model_skills.csv"

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_shiny_app,node_user toneBlue
class node_forecast_api,node_model_registry,node_ar_models,node_single_species,node_baseline,node_gam_ar,node_gam_var,node_simple_model,node_separate_models,node_temperature_models,node_regime,node_train_test,node_forecast_plots toneAmber
class node_skill_scores,node_loo,node_evaluation_viz,node_simple_evaluation toneMint
class node_study_fitting,node_study_processing,node_prior_fitting,node_baseline_priors,node_plot_skills,node_input_data,node_regime_data,node_skill_results toneRose
```

## Components

### Application

- [Shiny App](https://github.com/weecology/mvgamportal/blob/main/app.R): `app.R`

### Forecasting

- [Forecasting](https://github.com/weecology/mvgamportal/blob/main/R/forecasting.R): `R/forecasting.R`
- [Model Definitions](https://github.com/weecology/mvgamportal/blob/main/R/models.R): `R/models.R`
- [AR Models](https://github.com/weecology/mvgamportal/blob/main/R/models/AR.R): `R/models/AR.R`
- [Single Species](https://github.com/weecology/mvgamportal/blob/main/R/models/AR_SINGLE_SPECIES.R): `R/models/AR_SINGLE_SPECIES.R`
- [Baseline Model](https://github.com/weecology/mvgamportal/blob/main/R/models/BASELINE.R): `R/models/BASELINE.R`
- [GAM AR](https://github.com/weecology/mvgamportal/blob/main/R/models/GAM_AR.R): `R/models/GAM_AR.R`
- [GAM VAR](https://github.com/weecology/mvgamportal/blob/main/R/models/GAM_VAR.R): `R/models/GAM_VAR.R`
- [Simple Model](https://github.com/weecology/mvgamportal/blob/main/R/models/SIMPLE.R): `R/models/SIMPLE.R`
- [Separate Models](https://github.com/weecology/mvgamportal/blob/main/R/models/sAR_separate.R): `R/models/sAR_separate.R`
- [Temperature Models](https://github.com/weecology/mvgamportal/blob/main/R/models/tempAR_separate.R): `R/models/tempAR_separate.R`
- [Regime Detection](https://github.com/weecology/mvgamportal/blob/main/R/get_regime.R): `R/get_regime.R`
- [Train Test Split](https://github.com/weecology/mvgamportal/blob/main/R/split_train_test.R): `R/split_train_test.R`
- [Forecast Plots](https://github.com/weecology/mvgamportal/blob/main/R/forecast_plots.r): `R/forecast_plots.r`

### Evaluation

- [Skill Scores](https://github.com/weecology/mvgamportal/blob/main/R/skill_scores.r): `R/skill_scores.r`
- [LOO Comparison](https://github.com/weecology/mvgamportal/blob/main/R/loo_comparison.R): `R/loo_comparison.R`
- [Evaluation Visuals](https://github.com/weecology/mvgamportal/blob/main/R/evaluation_viz.R): `R/evaluation_viz.R`
- [Simple Evaluation](https://github.com/weecology/mvgamportal/blob/main/R/simple_evaluation_viz.R): `R/simple_evaluation_viz.R`

### Case Studies

- [Model Fitting](https://github.com/weecology/mvgamportal/blob/main/case_study/case_study_model_fitting.R): `case_study/case_study_model_fitting.R`
- [Model Processing](https://github.com/weecology/mvgamportal/blob/main/case_study/case_study_model_processing.R): `case_study/case_study_model_processing.R`
- [Prior Fitting](https://github.com/weecology/mvgamportal/blob/main/case_study/case_study_PP_fitting.R): `case_study/case_study_PP_fitting.R`
- [Baseline Priors](https://github.com/weecology/mvgamportal/blob/main/case_study/case_study_baseline_priors.R): `case_study/case_study_baseline_priors.R`
- [Skill Plots](https://github.com/weecology/mvgamportal/blob/main/case_study/plot_skills.R): `case_study/plot_skills.R`
- [Input Data](https://github.com/weecology/mvgamportal/blob/main/data_all.rds): `data_all.rds`
- [Regime Data](https://github.com/weecology/mvgamportal/blob/main/data_pb_regime.rds): `data_pb_regime.rds`
- [Skill Results](https://github.com/weecology/mvgamportal/blob/main/case_study/model_outputs/model_skills.csv): `case_study/model_outputs/model_skills.csv`

### Other components

- **User**

## Connections

- User → Shiny App: opens
