π¬οΈ Air Quality Predictor
This is a web app that helps you check and predict the air quality (AQI) in different cities. It combines live weather and pollution data with a machine learning model I trained, so you can see not just the current AQI, but also a predicted value with a confidence score.
The app is built with Streamlit for the UI, uses PostgreSQL to store historical data, and a RandomForest model (from scikit-learn) for predictions. Itβs simple to use: type a city, hit a button, and youβll get the current and predicted air quality, along with health recommendations.
π Features
π‘ Live Data Fetching β Collects air quality & weather data from external APIs.
π€ ML Prediction β RandomForest model trained on environmental features.
π Confidence Scoring β Multi-factor confidence calculation (tree agreement, feature ranges, prediction spread, time-based).
ποΈ Database Integration β Stores AQI, weather, and prediction history in PostgreSQL.
π± Interactive Web UI β Streamlit interface with quick actions:
Share Location
Set AQI Alerts
View Historical Trends
π Explainability β Each prediction comes with category, health impact, and confidence level.
π οΈ Tech Stack
Frontend/UI: Streamlit
Backend/DB: PostgreSQL + SQLAlchemy
Machine Learning: scikit-learn (RandomForest)
Data Handling: Pandas, NumPy