Skip to content

feat: add weather-AQI correlation analytics with severity-rated insights - #1097

Open
karan-chaos wants to merge 5 commits into
Aditya8369:mainfrom
karan-chaos:feature/alert-rules-engine
Open

feat: add weather-AQI correlation analytics with severity-rated insights#1097
karan-chaos wants to merge 5 commits into
Aditya8369:mainfrom
karan-chaos:feature/alert-rules-engine

Conversation

@karan-chaos

Copy link
Copy Markdown

Summary

#1096
This PR adds weather and air quality correlation analytics to identify
relationships between weather conditions and major AQI pollutants.

Changes

Correlation Analysis

Added Pearson correlation calculations between:

  • Temperature, humidity, and wind
  • PM2.5, PM10, NO₂, O₃, and CO

Interactive Correlation Matrix

Added a color-coded correlation matrix for quickly identifying:

  • Positive relationships
  • Negative relationships
  • Correlation strength
  • Significant metric patterns

Interactive Charts

Added toggleable visualization modes:

  • Scatter charts
  • Dual-axis charts

AQI Band Analysis

Added per-AQI-band weather breakdowns to compare temperature, humidity,
and wind patterns across different air quality levels.

Severity-Rated Insights

Added automatically generated insights with severity ratings based on
correlation strength and detected weather-pollutant patterns.

Technical Implementation

The feature follows existing project conventions:

  • SWR for data fetching and caching
  • i18next for translations
  • Recharts for chart visualizations
  • CSS Modules for styling
  • Memoized sub-components for optimized rendering

Verification

  • Pearson correlation calculations verified
  • Weather metrics verified
  • AQI metrics verified
  • Correlation matrix verified
  • Color-coded cells verified
  • Scatter chart verified
  • Dual-axis chart verified
  • Chart toggle verified
  • AQI-band breakdown verified
  • Severity-rated insights verified
  • SWR integration verified
  • i18next integration verified
  • Recharts visualizations verified
  • CSS Modules verified

karan-chaos and others added 5 commits August 28, 2026 15:45
Add a comprehensive data export module that lets users download AQI trend
data as CSV or JSON, preview and copy formatted text reports with health
guidance, generate shareable city links, and filter data by time range
with an interactive preview table and trend chart.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Add a multi-city AQI comparison module with ranked leaderboards,
pollutant-level breakdown tables with WHO-limit exceedance flags,
health-risk categorisation groups, bar chart visualisation, CSV export,
and a formatted text report with clipboard copy.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Add a cumulative pollution exposure tracker that records AQI readings
on each refresh cycle, computes daily/weekly summaries, calculates a
rolling 7-day health score with animated ring, classifies exposure risk
levels, generates personalised recommendations, and supports CSV export
with clipboard copy and history reset.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Add a user-configurable alert rules engine that evaluates incoming AQI
data against custom thresholds with operator and time-window conditions,
frequency throttling, severity levels, browser notification support,
preset quick-add rules, and full CRUD management persisted in localStorage.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

@karan-chaos is attempting to deploy a commit to the Aditya Mahajan's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the ECSoC26 Contributions considered under ECSoC'26 label Aug 28, 2026
@github-actions

Copy link
Copy Markdown

Thank You for Your Contribution! 🎉

Hi @karan-chaos,

Thank you for opening this Pull Request and contributing to our project. We truly appreciate your efforts.

Please make sure that:

  • Your code follows the project's guidelines.
  • You have linked the appropriate issue (if applicable).
  • Screenshots are added for UI/UX changes.
  • Your PR is ready for review.

The maintainer @Aditya8369 will review your PR shortly!

Happy Contributing! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ECSoC26 Contributions considered under ECSoC'26 merge-conflicts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants