Skip to content

devishacodes/python_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌿 India AQI Intelligence Dashboard

A production-grade, dark-themed air quality analytics dashboard built with Streamlit + Plotly covering 20 Indian cities.


⚡ Quick Start

# 1 · Install dependencies
pip install -r requirements.txt

# 2 · Run the app
streamlit run india_aqi_dashboard.py

Opens at → http://localhost:8501


🗺 Features

Feature Details
India Dot Map All 20 cities as dots — red = high AQI, green = good
Multi-City Filter Pick any combination of cities from the sidebar
Date Range Slide between Jan–Apr 2024 (synthetic 3-hr data)
View Modes Hourly / Daily / Weekly / Monthly toggle
Pollutant Focus Switch between AQI, PM2.5, PM10, NO2, SO2, CO, O3
Line Chart Multi-city trend with AQI band overlays
Pie Chart Pollutant share breakdown with donut style
Bar Chart City comparison (colour-coded by AQI severity)
Heatmap Hour × Weekday intensity grid
Radar Chart Normalised pollutant profile per city
Violin/Box AQI distribution spread per city
Rolling Avg 7-day smoothed trend
Summary Table Sortable city-level statistics

🎨 Design

  • Dark base #0b0c10 · card #111318
  • Neon-mint #c8f75e · Cyan #22d3ee · Pink #e879f9
  • Font: Space Mono (headers) + DM Sans (body)
  • AQI scale: Green → Yellow → Orange → Red → Purple

🔌 Connect Real Data (OpenAQ)

Replace generate_data() with:

import requests

def fetch_openaq(city, limit=1000):
    url = f"https://api.openaq.org/v2/measurements"
    params = {"city": city, "limit": limit, "parameter": "pm25"}
    resp = requests.get(url, params=params)
    return pd.DataFrame(resp.json()["results"])

Get your free API key at → https://openaq.org/developers/api/


📁 File Structure

india_aqi_dashboard.py   ← main app
requirements.txt         ← pip dependencies
README.md                ← this file

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages