This project explores the link between anthropogenic CO₂ emissions and global temperature change. It combines historical climate data, statistical time-series models, and an interactive Shiny application that lets users test emission scenarios and see their projected temperature impacts. The repository also contains a Quarto document outlining the exploratory data analysis (EDA) and modeling workflow.
- Berkeley Earth monthly anomaly data show a pronounced shift from long term stable temperature conditions in the early record to persistent warming over the last ~40 years, reinforcing the acceleration of climate change.
- STL decomposition of the anomaly series highlights a strong long-term trend layered on top of seasonal variation, underscoring the need to model both components when attributing changes to human activity.
- ARIMA models combined with CO₂ concentration (ppm) and ENSO signals, provide the backbone for temperature projections in the app, enabling scenario comparisons between baseline emissions and user-adjusted trajectories.
shiny_app/: Shiny UI/server code for the Global Warming Trajectory Simulator (app.R, legacy prototypeapp_main.R).data/: Preprocessed RDS files used by the app and modeling pipeline (e.g., temperature conversions, ENSO-lagged predictors, country baselines).appendix.qmdandappendix.pdf: Quarto analysis notebook and rendered PDF with the EDA and modeling narrative.data_preprocess_scripts/: Scripts for transforming raw inputs (not run automatically by the app).
- Restore the R environment
install.packages("renv") # if needed renv::restore()
- Regenerate the appendix (optional)
Knit
appendix.qmdto reproduce the EDA/modeling figures and tables:The compiled report is available asquarto::quarto_render("appendix.qmd")
appendix.pdffor quick reference.
- Ensure the data RDS files in
data/are present (they are tracked in the repo). - From the project root, start the app:
shiny::runApp("shiny_app")
- A browser window will open with three main tabs:
- Historical Explorer – Plot historical global temperature anomalies, total CO₂ emissions, or CO₂ concentration; optionally view STL decompositions; hover for exact values.
- Forecast & Scenarios – Configure forecast horizon (5–20 years), ENSO conditions, and emission adjustments (percentage growth or absolute changes). Compare user scenarios to the precomputed baseline temperature path.
- Impact Report – View monthly or yearly averages of baseline vs. scenario temperatures, cumulative emission deltas, and download the results as CSV.
- Temperature inputs come from Berkeley Earth global temperature anomalies converted to absolute temperatures for seasonality-aware modeling.
- Emission baselines use 2024 territorial and land-use change estimates (~43.27 Gt/year) to anchor forward scenarios; country-level starting points are read from
country_2024_baseline_Gt.rdswhen available. - Forecasts leverage ARIMA models that couple CO₂ concentration, ENSO, and seasonal Fourier components to project temperature anomalies and highlight differences between baseline and user-defined emission pathways.
- The Shiny app runs entirely from precomputed RDS datasets; no external API calls are required.
- For deployment to a Shiny server or Posit Connect, bundle the
shiny_app/directory and ensure thedata/folder is accessible at the project root (or adjust paths accordingly viahere()). - The project uses
renvfor dependency management; deploying with anrenv.lock-aware service will reproduce the tested package set.
- Explore tab: Choose variable → optional STL toggle → adjust date slider → hover to see values.
- Forecast tab: Pick scope (global or country), horizon, ENSO state, and adjustment mode → click Run Scenario → hover lines to inspect exact temperatures; summary value boxes show temperature change and cumulative emission difference.
- Impact Report tab: Switch granularity to view monthly or yearly aggregates and download the scenario comparison.