An open API service indexing awesome lists of open source software.

https://github.com/squadron-leader/ecopredict-ai

EcoPredict AI is a powerful, AI-driven solution for predicting Greenhouse Gas (GHG) emissions based on user-input industry data. Designed for environmental sustainability initiatives, EcoPredict AI utilizes machine learning models to deliver accurate carbon emission predictions and is deployed via Streamlit for real-time access.
https://github.com/squadron-leader/ecopredict-ai

epa-data linear-regression python regression-model scikit-learn streamlit

Last synced: 2 months ago
JSON representation

EcoPredict AI is a powerful, AI-driven solution for predicting Greenhouse Gas (GHG) emissions based on user-input industry data. Designed for environmental sustainability initiatives, EcoPredict AI utilizes machine learning models to deliver accurate carbon emission predictions and is deployed via Streamlit for real-time access.

Awesome Lists containing this project

README

          

## 🌱 EcoPredict AI - Greenhouse Gas Emission Forecasting



![ChatGPT Image Jul 3, 2025, 01_18_35 AM](https://github.com/user-attachments/assets/3b09e24a-0cd6-46af-984d-274d629829f9)

**EcoPredict AI** is an advanced web-based application for predicting greenhouse gas (GHG) emissions in supply chains using artificial intelligence and machine learning technologies. Built with **Streamlit** and powered by a **Linear Regression model** trained on **EPA's official supply chain emission data from 2010–2016**, the application provides intelligent predictions for emission factors across various US industries and commodities.

The system features a modern, interactive GUI with **glassmorphism design**, **animated gradients**, and professional styling. It allows users to input parameters such as:

* Greenhouse gas type (carbon dioxide, methane, nitrous oxide, or others)
* Measurement units (kg, tons, COβ‚‚e, etc.)
* Emission factors
* Comprehensive data quality metrics:

* Reliability
* Temporal correlation
* Geographic correlation
* Technological correlation
* Data collection quality

User inputs are processed through a **sophisticated preprocessing pipeline**, standardized using scaling, and sent to the ML model for **real-time predictions**. Visual analytics include **interactive Plotly charts** such as gauges, bar charts, and radar plots. The platform also offers **AI-powered sustainability recommendations** based on input trends.

It serves as both an educational tool and practical solution for environmental impact analysisβ€”ideal for researchers, analysts, and organizations aiming to optimize their carbon footprint.

---

## 🌍 Why EcoPredict AI?

🌿 Climate change is one of the most pressing global challenges. Accurate emission forecasting can support better decisions for a greener future. EcoPredict AI helps:

* πŸ“Š Predict GHG emissions by sector or activity
* 🧠 Visualize trends & outcomes
* ⚑ Deliver real-time results via a beautiful interface
* πŸ“ˆ Encourage data-driven climate action

---

## πŸ”§ Features

* βœ… AI-powered emission predictions using EPA data
* πŸ’  Glassmorphism UI with responsive layout
* πŸ“ˆ Real-time charts: Gauge, Bar, Radar (Plotly-powered)
* πŸ”Ž Data quality scoring system (5 metrics)
* 🧠 AI suggestions for emission reduction
* πŸ“ Upload and compare industry datasets
* πŸ›‘οΈ Error handling and validation checks
* 🌐 Deployable via Streamlit Cloud or localhost

---

## πŸ“Έ Screenshots



![Screenshot 2025-07-03 011100](https://github.com/user-attachments/assets/b1a1fc20-8cf9-416e-8cdb-20f8e7e07031)




![Screenshot 2025-07-03 011111](https://github.com/user-attachments/assets/407a85a4-b329-4d06-8757-edf15d6457d8)




![Screenshot 2025-07-03 011119](https://github.com/user-attachments/assets/b7f6b844-ce9a-40d4-b721-5858113c2777)




![Screenshot 2025-07-03 011218](https://github.com/user-attachments/assets/498c9b73-afb4-44e7-ae0a-2e3d9e2cf900)




![Screenshot 2025-07-03 011225](https://github.com/user-attachments/assets/402fe92a-7080-4237-b242-d43b8934fd7b)




![Screenshot 2025-07-03 011235](https://github.com/user-attachments/assets/1982afaf-9ed2-43e3-9402-1eb613b3b5cc)



![Screenshot 2025-07-03 011243](https://github.com/user-attachments/assets/2dfcd867-9c35-4c68-9ff1-c295243f646a)



## πŸ“ˆ Visual Insights

EcoPredict AI provides graphical output that enhances interpretation and decision-making. Users receive:

* πŸ“‰ **Line Graphs**: Track emission trends across inputs
* πŸ“Š **Bar Charts**: Compare emissions between industries
* 🎯 **Gauge Charts**: Assess overall impact severity
* 🌐 **Radar Charts**: Visualize data quality profiles

All visualizations are interactive and rendered using **Plotly**.

---

## 🧠 Model & Training Details

The AI model was built and trained using the following pipeline:

### πŸ“š Libraries Used

* **Core Data Processing**:

* `pandas`, `numpy`
* **Visualization**:

* `matplotlib.pyplot`, `seaborn`, `plotly`
* **Machine Learning**:

* `sklearn.model_selection`:

* `train_test_split`, `GridSearchCV`
* `sklearn.preprocessing`:

* `StandardScaler`
* `sklearn.linear_model`:

* `LinearRegression`
* `sklearn.ensemble`:

* `RandomForestRegressor`
* `sklearn.metrics`:

* `mean_squared_error`, `r2_score`
* **Model Persistence**:

* `joblib`

### 🎯 Process Summary

* Preprocessing: null value handling, scaling
* Feature engineering
* Model training using **Linear Regression** (final model)
* Evaluation using **MSE** and **RΒ²**
* Hyperparameter tuning with **GridSearchCV**
* Models saved as `LR_model.pkl` and `scaler.pkl`

---

## πŸ’» Tech Stack

| Layer | Tools Used |
| ------------- | ---------------------------------------------- |
| Backend | Python, Pandas, Scikit-learn, LinearRegression |
| Frontend/UI | Streamlit, Plotly |
| Deployment | Streamlit Cloud / Local Host |
| Visualization | Plotly, Seaborn, Matplotlib |

---

## πŸš€ Getting Started

### 1. Clone the Repository

```bash
git clone https://github.com/yourusername/EcoPredict-AI.git
cd EcoPredict-AI
```

### 2. Install Dependencies

```bash
pip install -r requirements.txt
```

### 3. Run the Application

```bash
streamlit run app.py
```

---

## 🌐 Live Demo

Check out the app live here πŸ‘‰ [EcoPredict AI - Streamlit App](https://echopredict-ai.streamlit.app/)

---

## πŸ—‚ Project Structure

```
EcoPredict-AI/
β”œβ”€β”€ app.py # Streamlit App Logic
β”œβ”€β”€ model/
β”‚ └── LR_model.pkl # Trained Linear Regression Model
β”œβ”€β”€ scaler/
β”‚ └── scaler.pkl # StandardScaler instance
β”œβ”€β”€ data/
β”‚ └── emissions.csv # Industry Emissions Data
β”œβ”€β”€ assets/
β”‚ └── ecopredict_banner.png # Project banner image
β”œβ”€β”€ utils/
β”‚ └── preprocess.py # Data Cleaning & Helper Functions
β”œβ”€β”€ requirements.txt
└── README.md
```

---

## πŸ“Š Example Use Case

> **Input:** Industry: "Steel Manufacturing", GHG: "Methane", Unit: "Ton"
> **Prediction:** \~4.82 metric tons COβ‚‚e emitted per ton produced.

Gauge, radar, and bar charts will help interpret the output visually.

---

## 🀝 Contribution Guidelines

We welcome all contributions, ideas, and suggestions!

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

---

## πŸ“„ License

Licensed under the **MIT License**.

Copyright (c) 2025 Aayush Kumar

Permission is hereby granted to use, copy, modify, and distribute this software for any purpose with or without fee, provided that the above copyright notice appears in all copies.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.

---

## πŸ™ Acknowledgements

* EPA Supply Chain GHG Emissions Data
* IBM Greenhouse Gas Project
* Streamlit Community
* Scikit-learn Contributors
* OpenAI Copilot

---

## πŸ‘¨β€πŸ’» Author

**Aayush Kumar**
πŸ“« Email: \[[aayush05.af@gmail.com](mailto:aayush05.af@gmail.com)]
πŸ”— LinkedIn: [linkedin.com/in/aayush-kumar-146252314](https://www.linkedin.com/in/aayush-kumar-146252314/)

---

> "The best way to predict the future is to design it sustainably." 🌏