Interactive dashboards for exploring greenhouse gas emissions, plus a regression benchmark that predicts emissions from historical data. Combines gridded US methane inventory data (NetCDF) with global per-country CO₂ emissions, and includes a Gemini-backed assistant for asking questions about the data on screen.
| File | What it does |
|---|---|
carbon.py |
Streamlit CO₂ dashboard — multi-country selection, year-range slider, Plotly charts |
emissionprototype.py |
Streamlit methane dashboard over the gridded NetCDF inventory + Gemini Q&A |
methaneemission2012-28.py |
Dash app comparing methane across 2012–2018 |
newshit.py |
Full pipeline — methane/CO₂ dashboard plus the ML model suite and Gemini Q&A |
MLMODELSCO2GRAND.py |
Regression benchmark across ~8 model families |
idkwidoing.py |
Same benchmark without the Streamlit layer (script form) |
Linear Regression · Random Forest · SVR · K-Nearest Neighbors · XGBoost · LightGBM ·
CatBoost · a Keras dense network, combined through a StackingRegressor. Scored with
RMSE and R² under cross-validation.
| Label | NetCDF variable |
|---|---|
| Mobile Combustion | emi_ch4_1A_Combustion_Mobile |
| Stationary Combustion | emi_ch4_1A_Combustion_Stationary |
| Natural Gas Production | emi_ch4_1B2b_Natural_Gas_Production |
| Enteric Fermentation | emi_ch4_3A_Enteric_Fermentation |
| Municipal Landfills | emi_ch4_5A1_Landfills_MSW |
pip install -r requirement.txt
export GEMINI_API_KEY="your-key"
streamlit run carbon.pyGet a key from Google AI Studio; see .env.example.
The key is read from the environment — do not hardcode it.
requirement.txt covers the dashboards only. The ML scripts additionally need
scikit-learn scipy seaborn xgboost lightgbm catboost tensorflow.
Python · Streamlit · Dash · Plotly · netCDF4 · pandas · scikit-learn · XGBoost · LightGBM · CatBoost · TensorFlow · Google Gemini API
Several scripts contain hardcoded absolute paths from the original development machine —
/Users/admin/Downloads/gridded GHGI/, /Users/admin/Desktop/datasetsNASAPROGRAMS/....
Point base_path / file_paths / the read_csv calls at your local copies first. The
.nc methane files are not bundled here; the CO₂ CSVs are.