A comprehensive web-based platform for calculating, tracking, and reducing carbon footprints with personalized biosafety and sustainability recommendations.
- 👥 Multi-User Support: Individual, Institution, and Corporation user types
- 📊 Carbon Footprint Calculator: Comprehensive calculation across energy, transportation, waste, food, water, and corporate operations
- 🌱 Personalized Recommendations: AI-powered biosafety and sustainability feedback tailored to your footprint
- 📈 Interactive Dashboard: Real-time visualization of your carbon footprint trends
- 📋 Historical Tracking: Track your emissions over time and measure improvements
- 🤖 Machine Learning Predictions: Ensemble models (Random Forest + Gradient Boosting) for forecasting future carbon footprints
- 📡 IoT Sensor Integration: Real-time sensor network simulation for continuous emission monitoring
- 📊 Comparative Benchmarking: Statistical comparison against industry standards with percentile analysis
- 🔬 Predictive Analytics: Time-series forecasting with confidence intervals and trend analysis
- 📈 Advanced Analytics: Effect size calculations, performance ratings, and improvement potential quantification
- 📄 Research Reports: Comprehensive reports with statistical analysis and predictive insights
┌─────────────┐
│ IoT Sensors │──┐
└─────────────┘ │
├──> [Cloud Backend] ──> [ML Models] ──> [Dashboard]
┌─────────────┐ │
│ Data Sources│──┘
└─────────────┘
- Backend: FastAPI (Python)
- ML Framework: Scikit-learn (CPU-optimized, no GPU required)
- Database: SQLite (production-ready for PostgreSQL)
- Frontend: HTML/CSS/JavaScript Dashboard
- Cloud: Free deployment ready (Render.com, Railway)
- Compute: CPU-only (works on free cloud hosting)
-
Clone the repository or navigate to the project directory
-
Install dependencies:
pip install -r requirements.txt- Initialize the database:
python init_db.py- Start the server:
python main.pyOr use uvicorn directly:
uvicorn main:app --reload --host 0.0.0.0 --port 8000- Open the web application:
- Navigate to
http://localhost:8000in your browser - Register a new account or login
- Start calculating your carbon footprint!
CarbonCalc/
├── main.py # FastAPI backend application
├── models/ # ML models directory
│ ├── carbon_predictor.py
│ └── trained_models/
├── iot/ # IoT sensor simulation
│ └── sensor_simulator.py
├── database/ # Database models and setup
│ ├── models.py
│ └── database.py
├── api/ # API routes
│ ├── routes.py
│ └── websocket.py
├── dashboard/ # Frontend dashboard
│ ├── index.html
│ └── static/
├── utils/ # Utility functions
│ ├── data_processor.py
│ └── analytics.py
└── requirements.txt
POST /api/auth/register- Register new userPOST /api/auth/login- Login and get access tokenGET /api/auth/me- Get current user information
POST /api/calculate- Calculate carbon footprintGET /api/entries- Get user's carbon footprint entriesGET /api/entries/{id}- Get specific entryGET /api/recommendations- Get sustainability recommendations
GET /api/analytics/summary- Get analytics summaryPOST /api/predict- Predict future carbon footprint using ML modelsGET /api/benchmark/compare- Compare against industry benchmarksGET /api/research/report- Generate comprehensive research report
GET /api/iot/sensors- Get IoT sensor network readingsGET /api/iot/sensors/history- Get historical IoT sensor data
MIT License