Static and dynamic visualization tools for interpreting model outputs generated by JABBA.
JAGGview is an R package for preparing and plotting key diagnostics and results from JABBA model workflows.
The package includes functions to:
- prepare structured data from model output (e.g., fits, hindcast, retrospective, trajectories, Kobe, priors/posteriors, run tests);
- create publication-ready
ggplot2visualizations for each analysis component;
flowchart LR
A[JABBA model list] --> B[Data builders
fits_data / hindcast_data / ...]
B --> C[Plot builders
fits_ggplot / hindcast_ggplot / ...]
C --> D[Diagnostics & communication-ready figures]
Before installing the package in R, install JAGS in your system terminal:
sudo apt update
sudo apt install jagsOpen the R console and install the required dependencies:
install.packages("remotes")
library(remotes)
install.packages(c("rjags", "R2jags"))
install_github("jabbamodel/JABBA")install_github("UNIVALI-LEMA/JAGGview")install_local(".")library(JAGGview)# list_fit_models should contain fit objects returned by JABBA::fit_jabba()
fits_df <- fits_data(list_fit_models)p <- fits_ggplot(fits_df, palette = "#4285f4", title_y = "Abundance index")
print(p)hc_df <- hindcast_data(list_fit_models)
hc_plot <- hindcast_ggplot(hc_df)
print(hc_plot)- Fits:
fits_data(),fits_ggplot() - Hindcast:
hindcast_data(),hindcast_ggplot() - Kobe:
kobe_data(),kobe_ggplot() - Priors vs posteriors:
priors_posteriors_data(),priors_posteriors_ggplot() - Retrospective:
retrospective_analysis_data(),retrospective_analysis_ggplot() - Run tests Cpue residuals:
runs_tests_data(),runs_tests_ggplot(),cpue_residuals_ggplot() - Trajectories:
trajectories_data(),trajectories_ggplot()
testthat::test_dir("tests/testthat")Licensed under CC BY-NC-SA 4.0.