US gas prices every week since August 1990 in one free CSV download: 1,885 weekly rows from the Energy Information Administration (public domain), merging the national retail averages for regular gasoline, premium, and on-highway diesel in dollars per gallon. Rows carry the week, all three prices (diesel honestly NA before its 1994 series start), the premium-over-regular spread (always positive by test), week-over-week and year-over-year change on regular, and an All_Time_High flag that lights up as the running record breaks, ending at the $5.006 week of June 2022, never re-broken since by test. The sub-dollar gas of the late-90s oil glut is all pre-2000 by test. The Year column joins the Inflation CPI topic, where the real-dollar story (1998 gas was historically cheap, 2008 rivaled 2022) is waiting. Open to analysis of price shocks (Katrina, 2008, COVID, 2022), seasonality, the premium spread's slow widening, and diesel-gasoline divergence. Nine acceptance tests, one enforcing the 25 percent fill rule on every column.
1,885 rows in one CSV file, with 10 columns in total: Week, Year, Regular_USD_Gal, Premium_USD_Gal, Diesel_USD_Gal, Premium_Spread, WoW_Pct, YoY_Pct, All_Time_High, As_Of.
It is built by programmatically scraping eia.gov, last pulled on 2026-11-13. Datasets are versioned; older versions stay downloadable.
Yes. Every CodeSights dataset is completely free as a CSV download; a free account is all it takes. Anyone can preview the data without signing in.
Yes. The exact Python scraper that built it is viewable on the dataset page by any signed-in member, so every number is reproducible.
Automated scraping leaves room for error and the underlying sources change over time, so no version is guaranteed accurate or complete. If a number matters, verify it against the original source.