Air-quality forecasts and activity-specific exposure guidance.
AirSentinel uses air-quality data to estimate exposure from activity type, duration, and individual sensitivity. It then compares options such as delaying an activity, shortening it, or moving indoors.
- Check current air quality for a city
- Generate activity guidance with a dose-based exposure model
- View seven-day PM2.5, ozone, and NO2 forecasts
- Find lower-exposure outdoor time windows
- Explore real-time and historical map layers
- Review trends in an impact dashboard
- Node.js 18+
- pnpm (recommended) or npm
npm install -g pnpmgit clone https://github.com/ShauryaMallampati/AirSentinal.git
cd AirSentinal
pnpm installcp .env.example .env.localAdd the required values to .env.local:
WEATHER_API_KEY=your_weatherapi_key_here
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=your_google_maps_key_here
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url_here
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_key_hereThe Supabase variables are optional.
pnpm dev
# or
npm run devOpen http://localhost:3000.
- Create an account at WeatherAPI.
- Copy the API key from the dashboard.
- Set
WEATHER_API_KEY.
- Create a project in the Google Cloud Console.
- Enable the Maps JavaScript API.
- Create an API key.
- Set
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY. - Restrict the key to the intended domain.
- Create a project at Supabase.
- Open Settings → API.
- Copy the project URL and anonymous key.
- Set
NEXT_PUBLIC_SUPABASE_URLandNEXT_PUBLIC_SUPABASE_ANON_KEY.
/— city search and quick assessment/forecast— seven-day PM2.5, ozone, and NO2 forecasts/impact— trends, averages, and unhealthy-day statistics/map— interactive map/resources— health and activity guidance/about— project overview and data sources
AirSentinel estimates an activity-specific exposure dose:
dose = concentration × duration × intensity_factor × sensitivity_factor × indoor_factor
Inputs include pollutant concentration, activity duration and intensity, sensitivity group, and indoor or outdoor location.
The recommendation engine compares four options:
- Keep the current plan
- Delay by one hour
- Shorten the duration
- Move indoors
| Endpoint | Method | Description | Parameters |
|---|---|---|---|
/api/forecasts |
GET | Seven-day pollutant predictions | city |
/api/assess |
POST | Activity exposure assessment | pollutant, concentration, duration, intensity, sensitivity |
/api/assess/best-hours |
GET | Lower-exposure time windows | city, pollutant |
/api/current-aq |
GET | Current air quality | city |
/api/historical-aq |
GET | Historical AQI data | city, state |
pip install -r requirements-ml.txt
python3 scripts/forecast_api_hybrid.py "Washington, DC" "your_weatherapi_key"- Current air quality: WeatherAPI
- Historical observations: EPA air-quality data from 2020–2025
- Forecasts: CatBoost models trained on EPA data
Pull requests are welcome.
- Fork the repository.
- Create a branch:
git checkout -b feature/my-change. - Commit the change:
git commit -m "Describe your change". - Push the branch:
git push origin feature/my-change. - Open a pull request.
- Confirm that
.env.localexists. - Confirm that the required keys are set.
- Restart the development server.
- Ensure the Maps JavaScript API is enabled.
- Check the API key restrictions.
- Confirm that
NEXT_PUBLIC_GOOGLE_MAPS_API_KEYis set.
- Verify that the WeatherAPI key is valid.
- Check the network connection.
- Try an alternate city spelling.
Remove generated dependencies and build output, then reinstall:
rm -rf node_modules .next
pnpm install
pnpm buildMIT