Repository navigation
Fix/weekly aggregation and aliases 1134 - #1185
Closed
MILAN-123865 wants to merge 3 commits into
Closed
MILAN-123865 wants to merge 3 commits into
MILAN-123865 wants to merge 3 commits into
Conversation
…ox roles to RouteForm autocomplete (Aditya8369#1135)
|
@MILAN-123865 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. |
Thank You for Your Contribution! 🎉Hi @MILAN-123865, Thank you for opening this Pull Request and contributing to our project. We truly appreciate your efforts.
The maintainer @Aditya8369 will review your PR shortly! Happy Contributing! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Please provide a brief summary of your changes.
Related Issue
Closes #
Type of Change
Changes Made
Testing
Screenshots
If applicable, attach screenshots or screen recordings.
Checklist
Additional Notes
Add any additional information for reviewers here.
Summary of Changes
Unique Weekly Bucket Keying:
Replaced day-of-month week ordinal (${startOfWeek.getFullYear()}-W${Math.ceil(startOfWeek.getDate() / 7)}) with ISO date format of the week's starting Monday (YYYY-MM-DD).
Ensures weeks spanning across different months (e.g. Jan, Feb, Mar) generate unique bucket keys (2026-01-05, 2026-02-02, 2026-03-02) and do not aggregate together into 2026-W1.
Keeps rawTime unique and sortable across all granularities.
Unified Field Alias Resolution:
Extracted getPollutantValue(item, key) helper function.
Standardized alias resolution for us_aqi (maxAqi, aqi, AQI), pm2_5 (pm25, PM2.5), pm10 (pm10, PM10), nitrogen_dioxide (no2, NO2), ozone (ozone, Ozone), and carbon_monoxide (co, CO).
Replaced broken string.replace('_', '') in the hourly path so both hourly and bucketed (3h, daily, weekly) granularities use identical alias resolution logic.
Unit Tests:
Added unit test cases for getPollutantValue alias matching, hourly multi-alias aggregation, and multi-month weekly bucket separation (7/7 tests passed).
Verified ESLint with 0 errors.
closes #1134