AQI Monitor with Lottie Animations
A stylish Air Quality Index (AQI) monitoring application with animated backgrounds that change based on air quality levels.
Features
- Real-time AQI data from WAQI API
- ML model predictions using XGBoost
- Dynamic Lottie animations based on AQI levels
- Glassmorphism UI design
- Pollutant breakdown display
Setup Instructions
Backend Setup
- Install Python dependencies:
pip install -r requirements.txt
- Run the Flask server:
The backend will run on http://localhost:5000
Frontend Setup
- Navigate to the frontend directory:
- Install dependencies:
- Run the development server:
The frontend will run on http://localhost:5173
Customizing Lottie Animations
The current animations are placeholders. To add better animations:
- Visit LottieFiles
- Search for animations like:
- "clear sky background" (for good AQI)
- "cloudy weather" (for moderate AQI)
- "smog city" (for unhealthy AQI)
- "pollution" (for hazardous AQI)
- Download the JSON files
- Replace the files in
frontend/src/animations/:
good.json - AQI 0-50
moderate.json - AQI 51-100
unhealthy.json - AQI 101-200
hazardous.json - AQI 201+
Usage
- Enter a city name in the search box
- Click "Check AQI" to fetch data
- View both API data and ML model predictions
- See pollutant breakdown below
AQI Categories
- Good (0-50): Green
- Moderate (51-100): Yellow
- Unhealthy for Sensitive Groups (101-150): Orange
- Unhealthy (151-200): Red
- Very Unhealthy (201-300): Purple
- Hazardous (301+): Maroon