feat: AAA data integration, PADD regions, historical charts, and test coverage (v1.1.5-beta.4)#11
Conversation
…o reduce lock contention
- Created a new migration to establish the aaa_national_averages table for storing daily US nationwide average gas prices. - Implemented upsert and retrieval functions for national averages in the aaa queries module. - Updated the main index to export the new aaa queries. - Added a new BlogPostMeta schema to shared schemas for blog post metadata management.
…ding backfill script and caching improvements
- Added `__APP_VERSION__` declaration in `vite-env.d.ts` for version tracking. - Updated `vite.config.ts` to read version from `package.json` and included `remark-gfm` for GitHub Flavored Markdown support. - Created a new migration for `aaa_state_changes_cache` to store pre-computed price changes for states and fuel grades. - Added seed data for `aaa_state_averages` to populate historical price data for testing. - Implemented new queries in `aaa.ts` for fetching the latest state prices and historical data.
…ion in AAA state aggregates
- Added new PADD aggregates to the job queue for daily and intraday updates. - Implemented new API endpoints to fetch PADD aggregates and individual region data. - Enhanced the Comparison and Dashboard pages to display PADD regional prices. - Introduced a new database migration for the `aaa_padd_aggregates` table. - Updated data processing logic to compute population-weighted averages for PADD regions. - Improved error handling and logging for the AAA data scraping process. - Added documentation for the AAA data integration and its current status.
- Updated Historical.tsx to replace EIA data with AAA national averages for gas prices. - Introduced new fuel grade options (regular, mid-grade, premium, diesel) and adjusted time ranges. - Implemented moving average calculations and statistics for selected fuel grades. - Enhanced charting with Recharts for better visualization of fuel price trends. - Added new API functions in prices.ts for fetching daily gas prices and correlation series using AAA data. - Improved UI components for better user experience and clarity in data representation.
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.
Summary
This PR merges all beta work into main, advancing the version from 1.1.0 to 1.1.5.
What's changed
Test coverage
Historical fuel prices page overhaul
Daily crude oil & gas correlation endpoints
AAA PADD regional aggregates
Regional comparison page
AAA data reliability
Wayback Machine historical backfill
State detail page
Infrastructure
Bug fixes
Migrations required
\
npm run db:migrate
\
New tables: \�aa_national_averages, \�aa_state_aggregates, \latest_prices, \price_changes_cache, \�aa_padd_aggregates, \�aa_state_changes_cache\
Test results
\
Tasks: 8 successful, 8 total — all packages pass
\\