A professional, interactive web application for real-time air quality and disease risk prediction, powered by machine learning and explainable AI. Visualize AQI and health risks on a map, search any city, and get actionable insights for public health awareness.
➡️ Click to View the Web
Set the web application theme to 'light' for enhanced visibility
Air.Quality.and.Health.Risk.Prediction.Video.mp4
- 🗺️ Interactive Map: Click or search any location to view real-time air quality and weather data
- 📊 AQI Prediction: Predicts Air Quality Index using advanced ML models with 96.2% accuracy
- 🏥 Disease Risk Assessment: Estimates risk for multiple pollution-related diseases
- 🔍 Explainable AI: LIME/SHAP explanations for both AQI and disease predictions
- 💻 Modern UI: Clean, responsive, and professional design
- ⚡ Real-time Data: Integration with OpenWeather API for live environmental data
- 🔒 Secure: API keys secured via environment variables with input validation
- Python 3.12 or higher
- pip package manager
- OpenWeather API key (free registration at OpenWeatherMap)
- Clone the repository
git clone https://github.com/Keerthishreekesavan/Intelligent-Air-Quality-Monitoring-Disease-Risk-Assessment-Platform-using-Hybrid-XAI
- Install dependencies
pip install -r requirements.txt
- Set up environment variables
- Create a
.envfile in the root directory:OPENWEATHER_API_KEY=your_api_key_here
- Create a
Main Application (Recommended):
streamlit run streamlit_map_app.pyAlternative Interface:
streamlit run streamlit_app.pyOpen your browser and navigate to http://localhost:8501
Air_Pollution_Predictor/
├── streamlit_map_app.py # Main interactive map application
├── streamlit_app.py # Alternative interface
├── models.py # ML model definitions and utilities
├── requirements.txt # Python dependencies
├── static/ # Static assets
├── templates/ # HTML templates
├── *.pkl # Pre-trained ML models
├── *.csv # Example datasets
├── .env # Environment variables (create this)
└── README.md # This file
- AQI Prediction Model: Random Forest/XGBoost with 96.2% accuracy
- Disease Risk Models: Ensemble methods with F1-score of 0.921
- Explainability: LIME and SHAP for model interpretability
- Real-time Environmental Data: OpenWeather API
- Historical Air Quality Data: Pre-processed datasets for training
- Health Statistics: Disease correlation data for risk assessment
- Launch the application using the installation instructions above
- Navigate to the map interface in your browser
- Interact with the map:
- Click on any location to get instant air quality data
- Use the search bar to find specific cities
- View real-time AQI values and predictions
- Explore disease risk assessments for the selected location
- Review model explanations to understand prediction factors
| Metric | Value |
|---|---|
| AQI Prediction Accuracy | 96.2% |
| Disease Risk Assessment F1 | 0.921 |
| Average Response Time | <2 seconds |
| Model Inference Time | <100ms |
| API Rate Limit | 1000/day |
- API Key Security: Environment variables for sensitive data
- Input Validation: Comprehensive validation for all user inputs
- Rate Limiting: Built-in protection against API abuse
- Error Handling: Graceful handling of API failures and edge cases
- Backend: Python, Streamlit
- Machine Learning: scikit-learn, XGBoost, LIME, SHAP
- Data Visualization: Folium, Plotly, Streamlit
- APIs: OpenWeather API
- Deployment: Streamlit Cloud ready
- 📱 Mobile app development
- 📈 Historical data visualization
- 🚨 Air quality alerts and notifications
- 🌐 Integration with more environmental APIs
- 🔮 Advanced forecasting models
- 🌍 Multi-language support
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Data Source: OpenWeather API for real-time environmental data
- ML Libraries: scikit-learn, XGBoost, LIME, SHAP for machine learning capabilities
- Visualization: Folium, Plotly, Streamlit for interactive visualizations
- Icons: Lucide React for UI components