Skip to content

Rau238/Smogslayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌫️ SMOGSLAYER — Interactive Air Quality Monitoring Dashboard

A professional full-stack web application for monitoring, comparing, and forecasting Air Quality Index (AQI) data across Indian cities.


📁 Project Structure

SMOGSLAYER/
├── app.py                  # Flask entry point
├── config.py               # DB + app configuration
├── extensions.py           # MySQL connection pool
├── requirements.txt
│
├── routes/
│   ├── auth.py             # /login  /logout
│   ├── dashboard.py        # /dashboard
│   ├── compare.py          # /compare
│   └── forecast.py         # /forecast
│
├── charts/
│   ├── aqi_chart.py        # AQI trend line chart
│   ├── pollutant_chart.py  # Radar chart
│   ├── heatmap_chart.py    # Seasonal heatmap
│   ├── compare_chart.py    # Multi-city comparison
│   └── forecast_chart.py   # Forecast chart
│
├── utils/
│   ├── db.py               # DB init + helpers
│   └── aqi_helpers.py      # Pandas processing + AQI logic
│
├── templates/
│   ├── base.html           # Shared layout + navbar
│   ├── login.html
│   ├── dashboard.html
│   ├── compare.html
│   └── forecast.html
│
├── static/
│   └── css/style.css       # Full dark-theme stylesheet
│
└── SQL/
    └── schema.sql          # DB schema + sample data

⚙️ Setup Instructions

1. Install Python dependencies

pip install -r requirements.txt

2. Configure MySQL

Edit config.py and set your MySQL credentials:

MYSQL_USER     = 'root'
MYSQL_PASSWORD = 'your_password'
MYSQL_HOST     = 'localhost'
MYSQL_PORT     = 3306
MYSQL_DB       = 'smogslayer'

Or set environment variables:

export MYSQL_USER=root
export MYSQL_PASSWORD=your_password

3. Run the application

python app.py

On first run, app.py automatically:

  • Creates the smogslayer database
  • Runs SQL/schema.sql (tables + sample data)
  • Seeds two demo users

4. Open in browser

http://localhost:5000

🔑 Demo Credentials

Username Password
admin password123
demo demo1234

🌟 Features

Feature Description
🔐 Authentication Secure login with bcrypt-hashed passwords
📊 Dashboard AQI trend, pollutant radar, seasonal heatmap
⚖️ Compare Multi-city AQI comparison with pollution ranking
🔮 Forecast 7–90 day AQI prediction with confidence band
📅 Date Filter Filter all views by custom date range
📋 Data Table Full pollutant breakdown table
📱 Responsive Mobile-friendly layout

🏙️ Supported Cities

Delhi · Mumbai · Bangalore · Chennai · Kolkata · Hyderabad


🛠️ Tech Stack

  • Backend: Python 3.10+ / Flask 3.0
  • Database: MySQL 8.0
  • Data Processing: Pandas, NumPy
  • Visualization: Plotly
  • Frontend: HTML5, CSS3, JavaScript

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors