This repository contains the Jupyter Notebook and raw data for the analysis "CO GHG Grey model projection," presented at the ISU-NISS Conference on AI and Statistics in September 2025.
This single notebook (.ipynb file) contains a complete, end-to-end Python pipeline. When the single code cell is run, it performs the entire workflow from raw data ingestion to final visualization and saving the results.
Running the notebook cell will execute the following steps:
-
Data Preparation (
prepare_datafunction):- Loads the raw data from the
11-6-2024_Colorado_GHG_Inventory_Data.xlsxfile. - Applies a custom aggregation logic (
aggregate_sectors) to map dozens of subsectors into 10 core analysis sectors. - Pivots the data and saves a clean, analysis-ready file:
GHGReady_normalized.csv.
- Loads the raw data from the
-
Forecasting & Analysis (
run_forecasting_pipelinefunction):- Descriptive Analysis: Generates historical plots (total trend, stacked bar, cumulative).
- Backtesting: Runs the GM(1,1) model on a training set (<=2015) and validates it on a test set (2016-2020) to generate RMSE/MAE metrics.
- Baseline Forecast: Re-trains the model on all historical data (2005-2020) to forecast a "business-as-usual" baseline to 2050.
- Policy Application: Applies a dictionary of 7 complex, sector-specific mitigation policies to create a "Policy-Modified Forecast."
- Save Results: Saves all final data (
full_forecast_results.csv), metrics (validation_metrics.csv), and final forecast plots (aggregated_forecast.png,individual_sector_forecasts.png) to the/resultsfolder.
- Clone or Download: Get all the files from this repository.
- Install Requirements: This project requires Python 3.x and several libraries. You can install them via pip:
pip install pandas numpy matplotlib seaborn scikit-learn openpyxl jupyter
- Ensure Raw Data is Present: Place the raw data file,
11-6-2024_Colorado_GHG_Inventory_Data.xlsx, in the same directory as the notebook. - Run the Notebook:
- Open the
CO GHG Grey model projection ISU 2025 Conference.ipynbfile in Jupyter Notebook, JupyterLab, or VS Code. - Run the single, large code cell.
- Open the
The notebook will automatically create the /results folder, print the validation metrics to the console, and save all output plots and CSVs.