Professional air quality monitoring and health risk prediction system with explainable AI, policy simulation, and real-time alerts.
This dashboard is fully responsive and works on all devices:
- ✅ Mobile Phones (320px - 640px) - Touch-optimized interface
- ✅ Tablets (641px - 1024px) - Balanced layout
- ✅ Laptops/PCs (1024px+) - Full feature display
- Python 3.10+
- pip (Python package manager)
- Clone/Download the project:
cd Air_Pollution_Health_Risk_Project- Install dependencies:
pip install -r requirements.txt- Run the dashboard:
streamlit run streamlit_app.py- Open in browser:
- Local:
http://localhost:8503 - Network:
http://<your-ip>:8503
| Page | Purpose | Devices |
|---|---|---|
| 📊 Overview | National AQI snapshot, KPIs | ✅ All |
| 🏙️ City Deep-Dive | City-wise analysis & trends | ✅ All |
| 🗺️ State Comparison | State-to-state benchmarking | ✅ All |
| 📈 Analysis | Trends, correlations, seasonal | ✅ All |
| 💔 Health Impact | Respiratory, asthma analysis | ✅ All |
| Page | Purpose | Devices |
|---|---|---|
| 🎮 Policy Simulator | What-if scenarios | ✅ All |
| 🔮 Prediction | ML-based forecasts | ✅ All |
| 🤖 Model Performance | Accuracy & metrics | ✅ All |
| 🔍 Explainability | SHAP-style explanations | ✅ All |
| Page | Purpose | Devices |
|---|---|---|
| 🚨 Early Warning | Real-time alerts | ✅ All |
| 📊 Data Quality | Confidence & reliability | ✅ Mobile+ |
| 💰 Policy Impact | Cost-benefit analysis | ✅ Tablet+ |
| 📥 Reports | CSV/PDF exports | ✅ All |
| 📋 Executive Summary | KPI benchmarks | ✅ All |
When opened on phone:
- ✅ Sidebar collapses to hamburger menu
- ✅ Single-column layout automatically
- ✅ Buttons full-width for easy tapping
- ✅ Charts responsive & zoomable
- ✅ Filters optimized for touch
- ✅ Metrics scaled for readability
Access on Phone:
- Find your laptop/PC IP:
ipconfig(Windows) /ifconfig(Mac/Linux) - On phone, visit:
http://<laptop-ip>:8503 - Dashboard automatically adjusts to phone screen
When opened on desktop:
- ✅ Full sidebar navigation
- ✅ Multi-column layouts (2-4 columns)
- ✅ All advanced features visible
- ✅ Detailed tables with horizontal scroll
- ✅ Large, interactive charts
- ✅ Side-by-side comparisons
- Tap Sidebar to navigate pages
- Scroll down to see all content
- Tap filters to customize data
- Swipe charts to explore
- Long-press for menu options
- Use sidebar on left (visible if screen wide enough)
- Tap hamburger (☰) if sidebar hidden
- Enjoy 2-3 column layouts
- Export data using download buttons
- Browse full navigation in sidebar
- Use advanced filters for detailed analysis
- Compare side-by-side visualizations
- Generate comprehensive reports
- Deep-dive into technical sections
streamlit run streamlit_app.py --server.port 8504streamlit run streamlit_app.py --logger.level=debugEdit responsive_css in streamlit_app.py to customize breakpoints.
- Dataset:
air_pollution_50000_rows.csv - Records: 50,000+ air quality observations
- Features: PM2.5, PM10, NO2, SO2, CO, AQI, health metrics
- Coverage: All-India (states & cities)
- Time Period: Multi-year historical data
- Model: Random Forest Classifier (200 trees)
- Accuracy: 72% (test set)
- Training: 70/30 split with 5-fold cross-validation
- Features: Automated encoding & imputation
- 🟢 Green: AQI < 50 (Safe)
- 🟡 Yellow: AQI 50-100 (Moderate)
- 🔴 Red: AQI 100-200 (Poor)
- 🔴 Very Poor: AQI 200-300
- 🟣 Severe: AQI > 300
All pages support:
- 📊 CSV Download - Filtered or full dataset
- 📄 Text Reports - Formatted summaries
- 📉 Chart Export - PNG/JPG with metadata
Download buttons available in:
- Sidebar (global filtered data)
- Each page (specific reports)
- Reports page (comprehensive exports)
- Internet browser (Chrome, Safari, Firefox, Edge)
- 50MB RAM
- 10MB storage
- Python 3.10+
- 4GB RAM
- 500MB disk space
- Windows/Mac/Linux
streamlit run streamlit_app.py --server.port 8504pip install -r requirements.txt- Check laptop IP:
ipconfig(Windows) - Ensure both on same WiFi
- Try:
http://<ip>:8503(not localhost) - Check firewall settings
- Mobile browsers might cache old version
- Clear browser cache: Settings → Clear browsing data
- Or use incognito/private mode
For issues:
- Check terminal for error messages
- Verify all dependencies installed:
pip list - Restart dashboard:
Ctrl+Cthen run again - Check internet connection
- Use WiFi for faster loading
- Close other apps for smoother scrolling
- Avoid opening too many charts simultaneously
- Tap hamburger (☰) to collapse sidebar for more space
- Landscape orientation gives wider views
- Use modern browser (Chrome/Edge recommended)
- Maximize browser window for best experience
- Dual monitors: Dashboard on one, reference on other
Inside dashboard:
- 📖 Explainability Page: Learn how predictions work
- 📊 Model Performance Page: Understand model reliability
- 💡 Executive Summary: High-level insights
- 🚨 Early Warning: Real-time monitoring
Before using:
- Python 3.10+ installed
-
pip install -r requirements.txtrun - CSV file present:
air_pollution_50000_rows.csv - Model file present:
model.pkl - Port 8503 available (or change)
- Tested on your device
✨ 14 interactive pages
✨ 72% accurate predictions
✨ Real-time alerts
✨ SHAP explainability
✨ Policy what-if scenarios
✨ Mobile-first responsive design
✨ Cost-benefit analysis
✨ Data quality tracking
✨ Downloadable reports
✨ Dark-mode ready
Happy analyzing! 🎉
Last Updated: December 19, 2025 Version: 0.1.0