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.
- Host: GitHub
- URL: https://github.com/squadron-leader/ecopredict-ai
- Owner: SQUADRON-LEADER
- Created: 2025-07-02T19:30:37.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-02T19:57:45.000Z (12 months ago)
- Last Synced: 2025-07-02T20:37:24.187Z (12 months ago)
- Topics: epa-data, linear-regression, python, regression-model, scikit-learn, streamlit
- Language: Jupyter Notebook
- Homepage: https://echopredict-ai.streamlit.app/
- Size: 1.57 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## π± EcoPredict AI - Greenhouse Gas Emission Forecasting

**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







## π 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." π