Lahore Pulse AI

Lahore Pulse AI is an AI-powered air-quality intelligence platform built to help citizens and decision-makers understand, predict, and respond to Lahore's changing PM2.5 pollution levels.

The Problem

Air-quality information is often reactive: people can see what pollution is happening now, but knowing what is likely to happen next is much more useful. Citizens need understandable warnings, while governments need evidence they can use for planning and response.

We wanted to build more than another air-quality dashboard. The goal was to create a system that can predict pollution, explain the prediction, verify it against what actually happened, and continuously learn from its performance.

What We Built

Lahore Pulse AI combines real-world air-quality and weather data with machine-learning forecasting models to generate PM2.5 predictions for multiple future horizons:

  • 1-hour forecast
  • 3-hour forecast
  • 6-hour forecast
  • 12-hour forecast
  • 24-hour forecast

The platform includes:

  • AI-powered PM2.5 forecasting
  • Live air-quality observations
  • Multi-horizon prediction
  • Prediction verification and accuracy tracking
  • Historical pollution analysis
  • Source and data-quality monitoring
  • Station-based air-quality views
  • Citizen-focused air-quality explanations
  • Government-oriented monitoring and investigation tools
  • AI-assisted reasoning for investigating pollution episodes
  • Exposure and risk-oriented insights
  • Automated data ingestion and freshness monitoring

The Prediction Accountability Loop

One of the core ideas behind Lahore Pulse AI is:

Predict → Observe → Verify → Learn

Instead of simply displaying an AI prediction and forgetting about it, the system records predictions and can later compare them with observed pollution.

This creates an accountability layer around the forecasting model and gives us a way to measure whether the system is actually improving.

How We Built It

The backend is built with Python and FastAPI, with SQLite used for the project's data layer.

For machine learning, we used scikit-learn models including Ridge Regression and HistGradientBoosting, with feature engineering based on historical pollution, lag values, rolling statistics, and temporal/weather information.

The frontend is built with React and Vite, with interactive maps and visualizations for exploring air-quality conditions and forecasts.

The platform also includes a structured serving architecture for prediction, verification, historical analysis, investigation, and AI reasoning.

What We Learned

The biggest lesson was that an AI prediction is only useful if the system can measure whether that prediction was actually correct.

Building the project also forced us to think about data freshness, leakage prevention, model evaluation, feature alignment, prediction auditing, and the difference between a machine-learning model that works in a notebook and a forecasting system that can operate as a real application.

Challenges

The hardest part was not simply training a model. It was connecting the complete pipeline:

real data → feature engineering → model inference → API → frontend → prediction audit → verification

We also had to deal with data quality, historical coverage, model-serving consistency, and making technical predictions understandable to non-technical users.

Why It Matters

Lahore Pulse AI is designed around a simple principle:

Don't just tell people what the air quality is. Help them understand what is coming next and whether the prediction deserves to be trusted.

We built Lahore Pulse AI as a foundation for smarter, more proactive air-quality decision-making in Lahore.

Built With

Share this project:

Updates

Submission history