// Builds the FactHub dataset release: CSV tables, docs, manifest, and the dataset payload JSON. // Usage: node build_release.js const fs = require('fs'); const path = require('path'); const crypto = require('crypto'); const [outDir, rawDir, analysisDir, rel] = process.argv.slice(2); fs.mkdirSync(rel, { recursive: true }); const RETRIEVED = '2026-10-09'; const KEY = 'wa-cca-gasoline-price-premium-2015-2026'; const sha = (buf) => 'sha256:' + crypto.createHash('sha256').update(buf).digest('hex'); const r1 = (x) => Math.round(x * 10) / 10; const r2 = (x) => Math.round(x * 100) / 100; const csv = (rows) => { const cols = Object.keys(rows[0]); return cols.join(',') + '\n' + rows.map((r) => cols.map((c) => (r[c] == null ? '' : String(r[c]).includes(',') ? `"${r[c]}"` : r[c])).join(',')).join('\n') + '\n'; }; const did = JSON.parse(fs.readFileSync(path.join(outDir, 'did_results.json'), 'utf8')); const pass = JSON.parse(fs.readFileSync(path.join(outDir, 'passthrough.json'), 'utf8')); const cost = JSON.parse(fs.readFileSync(path.join(outDir, 'cost.json'), 'utf8')); const weekly = JSON.parse(fs.readFileSync(path.join(outDir, 'weekly_prices.json'), 'utf8')); // ---------- Tables ---------- const T = {}; T.weekly = weekly.map((w) => ({ week_ending: w.weekEnding, wa: w.WA, us: w.US, padd4: w.PADD4, ca: w.CA, co: w.CO, tx: w.TX, fl: w.FL, mn: w.MN, oh: w.OH, ny: w.NY, ma: w.MA, wa_state_gas_tax: w.waStateTax, cpi_factor_to_jan2024: w.cpiFactorJan2024 })); const AUCTION_SRC = { '2023Q1': ['2023-03-01', 'ecology-rev-forecast-2023-11'], '2023Q2': ['2023-05-31', 'ecology-rev-forecast-2023-11'], '2023Q3': ['2023-08-30', 'ecology-rev-forecast-2023-11'], '2023Q4': ['2023-12-06', 'ecology-auction-4'], '2024Q1': ['2024-03-06', 'sp-global-2024-03'], '2024Q2': ['2024-06-05', 'wrc-rev-forecast-2024-06'], '2024Q3': ['2024-09-04', 'ecology-auction-7'], '2024Q4': ['2024-12-04', 'edf-2025-03'], '2025Q1': ['2025-03-05', 'edf-2025-03'], '2025Q2': ['2025-06-04', 'ecology-auction-10'], '2025Q3': ['2025-09-03', 'ecology-news-2025-09'], '2025Q4': ['2025-12-03', 'ecology-auction-12'], '2026Q1': ['2026-03-04', 'edf-2026-03'], '2026Q2': ['2026-06-03', 'edf-2026-06'], '2026Q3': ['2026-09-02', 'ecology-auction-15'], }; // Auction dates other than 2026-09-02 are approximate; the quarter is exact. T.auctions = pass.map((p) => ({ quarter: p.q, auction_date_approx: AUCTION_SRC[p.q][0], settlement_price_usd: p.allowance, source_id: AUCTION_SRC[p.q][1] })); T.gallons = [2023, 2024, 2025, 2026, 2027].map((fy) => ({ fiscal_year: fy, gasoline_million_gallons: { 2023: 2621, 2024: 2612, 2025: 2578, 2026: 2461, 2027: 2420 }[fy], diesel_million_gallons: { 2023: 757, 2024: 691, 2025: 694, 2026: 673, 2027: 661 }[fy], value_type: fy <= 2025 ? 'observed' : 'forecast' })); T.tax = [ { effective_from: '2015-01-01', effective_to: '2015-07-31', cents_per_gallon: 37.5 }, { effective_from: '2015-08-01', effective_to: '2016-06-30', cents_per_gallon: 44.5 }, { effective_from: '2016-07-01', effective_to: '2025-06-30', cents_per_gallon: 49.4 }, { effective_from: '2025-07-01', effective_to: '2026-06-30', cents_per_gallon: 55.4 }, { effective_from: '2026-07-01', effective_to: '', cents_per_gallon: 56.5 }, ]; T.annual = []; for (const [control, r] of Object.entries(did.annual)) for (const e of r.effects) T.annual.push({ comparison: control, year: e.period === '2026' ? '2026 (Jan 5-Oct 5)' : e.period, effect_cents_jan2024: r1(e.effect * 100), hac_se_cents: r1(e.se * 100), weeks: e.weeks, baseline_gap_cents_jan2024: r1(r.baselineGap * 100) }); T.quarterly = pass.map((p) => { const c = cost.quarterly.find((x) => x.quarter === p.q); return { quarter: p.q, allowance_price_usd: p.allowance, gasoline_carbon_cost_cents_jan2024: r1(p.impliedReal), gasoline_carbon_cost_cents_nominal: c.gasolineCarbonCostCentsPerGal, diesel_carbon_cost_cents_nominal: c.dieselCarbonCostCentsPerGal, premium_vs_us_cents_jan2024: r1(p.us), premium_vs_padd4_cents_jan2024: r1(p.padd4), premium_vs_7states_cents_jan2024: r1(p.states7) }; }); T.cost = cost.annual.map((a) => ({ year: a.year === '2026' ? '2026 (Q1-Q3)' : a.year, quarters: a.quarters, allowance_method_gasoline_usd_millions: Math.round(a.allowanceGasoline), allowance_method_diesel_usd_millions: Math.round(a.allowanceDiesel), allowance_method_total_usd_millions: Math.round(a.allowanceGasoline + a.allowanceDiesel), measured_premium_method_gasoline_usd_millions: Math.round(a.measuredGasoline) })); T.cost.push({ year: 'Total 2023-2026Q3', quarters: 15, allowance_method_gasoline_usd_millions: Math.round(cost.totals.allowanceGasoline), allowance_method_diesel_usd_millions: Math.round(cost.totals.allowanceDiesel), allowance_method_total_usd_millions: Math.round(cost.totals.allowanceGasoline + cost.totals.allowanceDiesel), measured_premium_method_gasoline_usd_millions: Math.round(cost.totals.measuredGasoline) }); const files = { 'weekly-prices.csv': csv(T.weekly), 'auction-prices.csv': csv(T.auctions), 'fuel-gallons.csv': csv(T.gallons), 'wa-gas-tax.csv': csv(T.tax), 'annual-effects.csv': csv(T.annual), 'quarterly-comparison.csv': csv(T.quarterly), 'cost-estimates.csv': csv(T.cost), }; for (const [f, c] of Object.entries(files)) fs.writeFileSync(path.join(rel, f), c); for (const f of ['did.js', 'passthrough.js', 'cost.js', 'build_release.js']) fs.copyFileSync(path.join(analysisDir, f), path.join(rel, f)); // Source manifest: digests of the retrieved raw files (bytes not redistributed). const rawFiles = fs.readdirSync(rawDir).filter((f) => /\.(html|csv)$/.test(f)).sort(); const manifest = { retrievedAt: RETRIEVED, files: rawFiles.map((f) => { const b = fs.readFileSync(path.join(rawDir, f)); return { file: f, byteLength: b.length, contentDigest: sha(b), url: f === 'CPIAUCSL.csv' ? 'https://fred.stlouisfed.org/graph/fredgraph.csv?id=CPIAUCSL' : `https://www.eia.gov/dnav/pet/hist/LeafHandler.ashx?n=PET&s=EMM_EPMR_PTE_${f.replace('.html', '')}_DPG&f=W` }; }) }; fs.writeFileSync(path.join(rel, 'source-manifest.json'), JSON.stringify(manifest, null, 2)); // ---------- Analyses ---------- const placebo = []; for (const [control, r] of Object.entries(did.checks.placebo2019)) for (const e of r.effects) placebo.push({ comparison: control, year: e.period, pseudo_effect_cents_jan2024: r1(e.effect * 100) }); const shortBase = []; for (const [control, r] of Object.entries(did.checks.baseline2019to2022)) for (const e of r.effects) shortBase.push({ comparison: control, year: e.period, effect_cents_jan2024: r1(e.effect * 100) }); const corr = (a, b) => { const n = a.length, ma = a.reduce((s, x) => s + x) / n, mb = b.reduce((s, x) => s + x) / n; let c = 0, va = 0, vb = 0; for (let i = 0; i < n; i++) { c += (a[i] - ma) * (b[i] - mb); va += (a[i] - ma) ** 2; vb += (b[i] - mb) ** 2; } return c / Math.sqrt(va * vb); }; const slope = (x, y) => { const n = x.length, mx = x.reduce((s, v) => s + v) / n, my = y.reduce((s, v) => s + v) / n; let c = 0, v = 0; for (let i = 0; i < n; i++) { c += (x[i] - mx) * (y[i] - my); v += (x[i] - mx) ** 2; } return c / v; }; const passSummary = [['U.S. average', 'us'], ['Rocky Mountain (PADD 4, incl. Idaho)', 'padd4'], ['7 EIA states w/o fuel carbon pricing', 'states7']].map(([label, k]) => { const x = pass.map((p) => p.impliedReal), y = pass.map((p) => p[k]); return { comparison: label, quarters: pass.length, correlation: r2(corr(x, y)), slope_measured_on_carbon_cost: r2(slope(x, y)), mean_measured_premium_cents_jan2024: r1(y.reduce((a, b) => a + b) / y.length), mean_carbon_cost_cents_jan2024: r1(x.reduce((a, b) => a + b) / x.length) }; }); const ann = (ctrl, y) => T.annual.find((a) => a.comparison === ctrl && a.year.startsWith(y)).effect_cents_jan2024; const replication = [ { year: '2023', ecology_comparison: 'AAA U.S. average', ecology_consultant_cents: 51.4, facthub_comparison: 'EIA U.S. average', facthub_cents: ann('U.S. average', '2023') }, { year: '2023', ecology_comparison: 'EIA all states (fixed effects)', ecology_consultant_cents: 36.0, facthub_comparison: '7 EIA states w/o fuel carbon pricing', facthub_cents: ann('7 EIA states w/o fuel carbon pricing', '2023') }, { year: '2024', ecology_comparison: 'AAA U.S. average', ecology_consultant_cents: 24.0, facthub_comparison: 'EIA U.S. average', facthub_cents: ann('U.S. average', '2024') }, { year: '2024', ecology_comparison: 'EIA all states (fixed effects)', ecology_consultant_cents: 24.0, facthub_comparison: '7 EIA states w/o fuel carbon pricing', facthub_cents: ann('7 EIA states w/o fuel carbon pricing', '2024') }, ]; const qStart = (q) => `${q.slice(0, 4)}-${String((+q[5] - 1) * 3 + 1).padStart(2, '0')}-01`; const longSeries = []; for (const p of pass) { longSeries.push({ quarter_start: qStart(p.q), series: 'Carbon cost', cents_per_gallon_jan2024: r1(p.impliedReal) }); longSeries.push({ quarter_start: qStart(p.q), series: 'WA premium', cents_per_gallon_jan2024: r1(p.states7) }); } const EXECUTED = '2026-10-09T08:00:00+00:00'; const COMMON_LIMITS = ['Difference-in-differences estimates capture all Washington-specific factors, not only the Climate Commitment Act; the Clean Fuel Standard (under 1 cent per gallon by Ecology\'s estimate), refinery outages, and other state-specific shocks are included.', 'Placebo tests show single-year pre-policy deviations of up to about 20 cents per gallon, so any one year\'s estimate is approximate; HAC standard errors understate that uncertainty.']; const A = (id, title, question, operation, parameters, scope, structuredResult, resultShape, displayResult, notes, limits) => ({ id, title, question, operation, parameters, scope, resultShape, displayResult, structuredResult, executedAt: EXECUTED, methodologicalNotes: notes, limitations: [...limits], }); const analyses = [ A('annual-effects', 'Annual Washington-specific gasoline price change vs. 2015-2022 baseline', 'How much more did Washington regular gasoline cost in 2023 through 2026, relative to its 2015-2022 relationship with each comparison region?', 'difference-in-differences-annual', { tableId: 'annual-effects', baseline: '2015-01-05 to 2022-12-26', dollars: 'January 2024 (CPI-U)', waGasTax: 'normalized to 49.4 cents', standardErrors: 'Newey-West, 12 weekly lags' }, 'Five comparison regions by four periods (2023, 2024, 2025, 2026 through 2026-10-05).', T.annual, 'table', '2025 effect: 41-56 cents per gallon vs. comparison regions without fuel carbon pricing; 2024: 20-38 cents; California comparison 3-19 cents.', ['Effect = mean weekly (Washington minus comparison) gap in the period minus the mean gap in the baseline.', 'Washington prices are adjusted to a constant 49.4-cent state gas tax so tax changes, including the July 2025 increase, are excluded.'], [...COMMON_LIMITS, 'California has its own cap-and-trade and Low Carbon Fuel Standard and is a weak comparison; it is reported, not relied on.']), A('quarterly-comparison', 'Quarterly measured premium and auction-implied carbon cost', 'Did the measured Washington gasoline premium move with the carbon allowance price quarter by quarter?', 'difference-in-differences-quarterly-and-carbon-cost', { tableId: 'quarterly-comparison', gasolineKgCo2PerGallon: 7.902, dieselKgCo2PerGallon: 10.21 }, 'Fifteen quarters, 2023Q1 through 2026Q3.', T.quarterly, 'table', 'Quarterly measured premium and carbon cost per gallon, 2023Q1-2026Q3.', ['Carbon cost = settlement price x EPA 40 CFR 98 Table MM-1 factor (gasoline 8.78 kg CO2/gal x 0.90 fossil share for E10; diesel 10.21 kg CO2/gal).'], [...COMMON_LIMITS, 'Diesel carbon cost assumes no biodiesel or renewable diesel blending and is an upper bound.']), A('quarterly-long-series', 'Carbon cost per gallon vs. measured premium (chart series)', 'Did the measured Washington gasoline premium move with the carbon allowance price quarter by quarter?', 'reshape-quarterly-comparison-long', { tableId: 'quarterly-comparison', series: ['Carbon cost', 'WA premium'] }, 'Fifteen quarters, two series.', longSeries, 'timeSeries', '30 rows: two series by 15 quarters, cents per gallon in January 2024 dollars.', ['Long-format reshaping of quarterly-comparison for charting.', 'Series names: "Carbon cost" = auction-implied carbon cost per gallon (allowance price x EPA emission factor); "WA premium" = measured Washington premium vs. the 7-state comparison group.'], [...COMMON_LIMITS]), A('pass-through-summary', 'Pass-through summary statistics', 'How closely does the measured premium track the auction-implied carbon cost?', 'correlation-and-ols-slope', { tableId: 'quarterly-comparison', n: 15 }, 'Fifteen quarters, three comparison regions.', passSummary, 'table', 'Against the 7-state group and the U.S. average, the slope is about 1.0 and the mean premium (38.7 and 35.0 cents) is close to the mean carbon cost (38.9 cents).', ['Slope from ordinary least squares of measured premium on carbon cost; a slope near 1 is consistent with full pass-through.'], [...COMMON_LIMITS, 'Fifteen quarterly observations is a small sample; correlation is descriptive and does not by itself establish causation.']), A('replication-check', 'Comparison with Ecology consultant (Greene Economics) estimates', 'Does this analysis reproduce the state-commissioned 2023-2024 estimates?', 'compare-published-estimates', { ecologySource: 'Ecology Pub. 26-14-043, Table 2' }, '2023 and 2024.', replication, 'table', 'This analysis is within 6 cents of the Ecology consultant for EIA-based comparisons (2024: within 4); the consultant\'s AAA U.S.-average 2023 estimate (51.4) is higher than this EIA-based estimate (39.7).', ['Ecology consultant values are reproduced from Table 2 of Pub. 26-14-043 (CPI-adjusted to January 2024 dollars).'], ['Comparison groups and price sources differ (AAA vs. EIA; all states vs. seven states), so close but not identical values are expected.']), A('placebo-2019', 'Placebo test: fictitious 2019 policy start', 'How large are Washington-specific deviations in years without the policy?', 'difference-in-differences-placebo', { baseline: '2015-2018', pseudoTreatment: '2019-2022' }, 'Three comparison regions by four pre-policy years.', placebo, 'table', 'Pre-policy single-year deviations range from about -21 to +21 cents.', ['Uses only pre-2023 data.'], ['Indicates the noise level of single-year estimates.']), A('baseline-sensitivity', 'Sensitivity: 2019-2022 baseline', 'Do results change with a shorter, more recent baseline?', 'difference-in-differences-annual', { baseline: '2019-01-07 to 2022-12-26' }, 'Three comparison regions by four periods.', shortBase, 'table', 'Results change by under 6 cents with the shorter baseline.', ['Same method as annual-effects with a shorter baseline.'], [...COMMON_LIMITS]), A('cost-estimates', 'Estimated cost to Washington on-road fuel users', 'About how much did the carbon cost add to what Washington drivers paid for on-road fuel?', 'gallons-times-cents', { tableId: 'cost-estimates', gallons: 'TRFC Feb 2026 Table A.1, fiscal-year gallons split evenly into quarters', measuredMethodComparison: '7 EIA states w/o fuel carbon pricing' }, '2023Q1 through 2026Q3.', T.cost, 'table', 'About $3.8 billion for gasoline by both methods, about $5.1 billion including on-road diesel (allowance method), 2023 through 2026Q3.', ['Allowance method: quarterly carbon cost per gallon x taxed gallons. Measured-premium method: quarterly measured gasoline premium converted to nominal dollars x taxed gasoline gallons.', 'Fiscal-year (July-June) gallons are divided evenly across quarters.'], ['Diesel figures assume no renewable blending and are an upper bound; diesel has no measured-premium estimate because EIA publishes no weekly Washington diesel price series.', 'FY2026-FY2027 gallons are state forecasts, not actuals.', 'Estimates are costs to fuel users, not state revenue; the two are not directly comparable.']), ]; // ---------- Docs ---------- const readme = `# Washington gasoline price premium and the Climate Commitment Act, 2015-2026 FactHub-curated research dataset. Not an official publication of EIA, Ecology, or the State of Washington. ## What this is Weekly EIA retail regular gasoline prices for Washington and comparison regions (2015-01-05 to 2026-10-05), Ecology quarterly allowance auction prices (2023Q1-2026Q3), and Washington taxed fuel volumes, with saved analyses estimating the Washington-specific price change since the Climate Commitment Act began on 2023-01-01. ## Method 1. Inflation-adjust weekly prices to January 2024 dollars (CPI-U; October 2025 CPI interpolated because BLS did not publish it). 2. Normalize Washington prices to a constant 49.4-cent state gas tax. 3. For each comparison region, compute the weekly Washington-minus-comparison gap. 4. Effect for a period = mean gap in the period minus mean gap in 2015-2022 (Newey-West standard errors, 12 lags). 5. Carbon cost per gallon = auction settlement price x EPA emission factor (gasoline E10: 8.78 x 0.90 kg CO2/gal; diesel 10.21). 6. Cost = per-gallon cost x taxed gallons (TRFC). This mirrors the method of Greene Economics for Ecology (Pub. 26-14-043) and extends it through 2026. ## Reproduce Download the sources listed in source-manifest.json into one directory, then run: node did.js ; node passthrough.js /did_results.json /CPIAUCSL.csv; node cost.js /did_results.json /CPIAUCSL.csv /cost.json; node build_release.js Node.js 20, no packages. `; const quality = `# Quality report - Weekly series: ${T.weekly.length} weeks; no missing Washington, U.S., PADD 4, or seven-state values in the analysis window (rows with any missing comparison value are excluded from that comparison only). - CPI: October 2025 missing at source (federal shutdown); linearly interpolated from September and November 2025. - Replication: within 6 cents of Ecology consultant EIA-based 2023-2024 estimates (2023: 41.6 vs 36.0; 2024: 24.2 vs 24.0) (see analysis replication-check). - Placebo (fictitious 2019 start): single-year deviations up to about 21 cents; treat single-year estimates as approximate. - Auction prices: 9 of 15 from Ecology documents; 6 from secondary reports (S&P Global, EDF, Washington Research Council copy of an Ecology forecast) that cite Ecology results; each row lists its source. - Gas tax schedule: 2015-2016 steps from ESSB 5987 session law; 2025-2026 changes from news reports of the 2025 law; verify 2025-2026 against the session law before publication. `; fs.writeFileSync(path.join(rel, 'README.md'), readme); fs.writeFileSync(path.join(rel, 'quality-report.md'), quality); // ---------- Artifacts ---------- const ART = [ ['weekly-prices', 'weekly-prices.csv', 'text/csv', 'curatedTable', 'Weekly EIA retail regular gasoline prices, Washington gas tax, and CPI factor.'], ['auction-prices', 'auction-prices.csv', 'text/csv', 'curatedTable', 'Quarterly Washington cap-and-invest current-vintage settlement prices with sources.'], ['fuel-gallons', 'fuel-gallons.csv', 'text/csv', 'curatedTable', 'Washington taxed gasoline and diesel gallons by fiscal year (TRFC).'], ['wa-gas-tax', 'wa-gas-tax.csv', 'text/csv', 'curatedTable', 'Washington state gasoline excise tax schedule used for normalization.'], ['annual-effects', 'annual-effects.csv', 'text/csv', 'derivedTable', 'Annual difference-in-differences effects by comparison region.'], ['quarterly-comparison', 'quarterly-comparison.csv', 'text/csv', 'derivedTable', 'Quarterly measured premium and auction-implied carbon cost.'], ['cost-estimates', 'cost-estimates.csv', 'text/csv', 'derivedTable', 'Estimated cost to on-road fuel users by year and method.'], ['source-manifest', 'source-manifest.json', 'application/json', 'sourceManifest', 'URLs, retrieval date, byte lengths, and SHA-256 digests of retrieved EIA and FRED source files.'], ['documentation', 'README.md', 'text/markdown', 'documentation', 'Method and reproduction instructions.'], ['quality-report', 'quality-report.md', 'text/markdown', 'qualityReport', 'Validation results and data-quality notes.'], ['script-did', 'did.js', 'text/javascript', 'transformationManifest', 'Difference-in-differences analysis (Node.js 20).'], ['script-passthrough', 'passthrough.js', 'text/javascript', 'transformationManifest', 'Quarterly pass-through comparison.'], ['script-cost', 'cost.js', 'text/javascript', 'transformationManifest', 'Cost estimates.'], ['script-build', 'build_release.js', 'text/javascript', 'transformationManifest', 'Builds release tables and this payload.'], ]; const artifacts = ART.map(([id, fileName, mediaType, role, description]) => { const b = fs.readFileSync(path.join(rel, fileName)); return { id, fileName, mediaType, role, description, byteLength: b.length, contentDigest: sha(b), access: 'public' }; }); const F = (name, type, units, description, valueType, sourceIds, nullable = false) => ({ name, type, units, description, valueType, sourceIds, nullable }); const priceField = (code, label) => F(code, 'number', 'USD per gallon (nominal)', `EIA weekly retail regular gasoline price, all formulations: ${label}.`, 'observed', ['eia-weekly'], true); const tables = [ { id: 'weekly-prices', artifactId: 'weekly-prices', title: 'Weekly retail gasoline prices', unitOfObservation: 'One EIA survey week (week ending Monday).', description: 'Nominal weekly prices, 2015-01-05 to 2026-10-05, with Washington gas tax and CPI factor.', fields: [F('week_ending', 'date', 'ISO date', 'EIA week-ending date.', 'observed', ['eia-weekly']), priceField('wa', 'Washington'), priceField('us', 'U.S. average'), priceField('padd4', 'Rocky Mountain (PADD 4)'), priceField('ca', 'California'), priceField('co', 'Colorado'), priceField('tx', 'Texas'), priceField('fl', 'Florida'), priceField('mn', 'Minnesota'), priceField('oh', 'Ohio'), priceField('ny', 'New York'), priceField('ma', 'Massachusetts'), F('wa_state_gas_tax', 'number', 'USD per gallon', 'Washington state gasoline excise tax in effect that week.', 'observed', ['wa-gas-tax-2015', 'opb-gas-tax-2025', 'wss-gas-tax-2026']), F('cpi_factor_to_jan2024', 'number', 'ratio', 'CPI-U (Jan 2024) / CPI-U (month of week); latest month carried forward after August 2026.', 'derived', ['fred-cpi'])] }, { id: 'auction-prices', artifactId: 'auction-prices', title: 'Quarterly allowance auction settlement prices', unitOfObservation: 'One quarterly auction.', description: 'Current-vintage settlement prices, 2023Q1-2026Q3.', fields: [F('quarter', 'string', 'calendar quarter', 'Quarter of the auction.', 'observed', ['ecology-auction-15']), F('auction_date_approx', 'date', 'ISO date', 'Approximate auction date; only 2026-09-02 is verified against the Ecology summary report. Quarter is exact.', 'estimated', ['ecology-auction-15']), F('settlement_price_usd', 'number', 'USD per allowance (1 t CO2e)', 'Current-vintage settlement price.', 'observed', ['ecology-rev-forecast-2023-11', 'ecology-auction-4', 'sp-global-2024-03', 'wrc-rev-forecast-2024-06', 'ecology-auction-7', 'edf-2025-03', 'ecology-auction-10', 'ecology-news-2025-09', 'ecology-auction-12', 'edf-2026-03', 'edf-2026-06', 'ecology-auction-15']), F('source_id', 'string', 'id', 'Source of the price.', 'observed', [])] }, { id: 'fuel-gallons', artifactId: 'fuel-gallons', title: 'Washington taxed fuel volumes', unitOfObservation: 'One Washington fiscal year (July-June).', description: 'TRFC February 2026 forecast, Table A.1.', fields: [F('fiscal_year', 'integer', 'fiscal year', 'State fiscal year ending June 30.', 'observed', ['trfc-2026-02']), F('gasoline_million_gallons', 'number', 'million gallons', 'Taxed gasoline.', 'observed', ['trfc-2026-02']), F('diesel_million_gallons', 'number', 'million gallons', 'Taxed diesel (special fuel).', 'observed', ['trfc-2026-02']), F('value_type', 'string', 'label', 'observed (FY2023-FY2025) or forecast (FY2026-FY2027).', 'observed', ['trfc-2026-02'])] }, { id: 'wa-gas-tax', artifactId: 'wa-gas-tax', title: 'Washington gasoline tax schedule', unitOfObservation: 'One tax-rate period.', description: 'State excise tax used to normalize Washington prices.', fields: [F('effective_from', 'date', 'ISO date', 'First day of rate.', 'observed', ['wa-gas-tax-2015', 'opb-gas-tax-2025', 'wss-gas-tax-2026']), F('effective_to', 'date', 'ISO date', 'Last day of rate; empty if current.', 'observed', ['wa-gas-tax-2015'], true), F('cents_per_gallon', 'number', 'cents per gallon', 'Rate.', 'observed', ['wa-gas-tax-2015', 'opb-gas-tax-2025', 'wss-gas-tax-2026'])] }, { id: 'annual-effects', artifactId: 'annual-effects', title: 'Annual Washington-specific price effects', unitOfObservation: 'One comparison region and period.', description: 'Derived difference-in-differences effects.', fields: [F('comparison', 'string', 'label', 'Comparison region.', 'derived', ['eia-weekly']), F('year', 'string', 'period', 'Calendar year; 2026 covers Jan 5-Oct 5.', 'derived', ['eia-weekly']), F('effect_cents_jan2024', 'number', 'cents per gallon, Jan 2024 dollars', 'Period mean gap minus 2015-2022 mean gap.', 'derived', ['eia-weekly', 'fred-cpi']), F('hac_se_cents', 'number', 'cents per gallon', 'Newey-West standard error (12 lags).', 'derived', ['eia-weekly']), F('weeks', 'integer', 'weeks', 'Weeks in period.', 'derived', ['eia-weekly']), F('baseline_gap_cents_jan2024', 'number', 'cents per gallon, Jan 2024 dollars', 'Mean 2015-2022 gap.', 'derived', ['eia-weekly', 'fred-cpi'])] }, { id: 'quarterly-comparison', artifactId: 'quarterly-comparison', title: 'Quarterly premium and carbon cost', unitOfObservation: 'One calendar quarter.', description: 'Measured premium by comparison region and auction-implied carbon cost.', fields: [F('quarter', 'string', 'calendar quarter', 'Quarter.', 'derived', []), F('allowance_price_usd', 'number', 'USD per allowance', 'Settlement price.', 'observed', ['ecology-auction-15']), F('gasoline_carbon_cost_cents_jan2024', 'number', 'cents per gallon, Jan 2024 dollars', 'Price x 7.902 kg/gal, CPI-adjusted.', 'derived', ['epa-mm1', 'fred-cpi']), F('gasoline_carbon_cost_cents_nominal', 'number', 'cents per gallon', 'Price x 7.902 kg/gal.', 'derived', ['epa-mm1']), F('diesel_carbon_cost_cents_nominal', 'number', 'cents per gallon', 'Price x 10.21 kg/gal (no renewable blending; upper bound).', 'estimated', ['epa-mm1']), F('premium_vs_us_cents_jan2024', 'number', 'cents per gallon, Jan 2024 dollars', 'Quarterly effect vs. U.S. average.', 'derived', ['eia-weekly']), F('premium_vs_padd4_cents_jan2024', 'number', 'cents per gallon, Jan 2024 dollars', 'Quarterly effect vs. PADD 4.', 'derived', ['eia-weekly']), F('premium_vs_7states_cents_jan2024', 'number', 'cents per gallon, Jan 2024 dollars', 'Quarterly effect vs. mean of CO, TX, FL, MN, OH, NY, MA.', 'derived', ['eia-weekly'])] }, { id: 'cost-estimates', artifactId: 'cost-estimates', title: 'Estimated cost to on-road fuel users', unitOfObservation: 'One calendar year (2026 through Q3) plus total.', description: 'Two methods; nominal dollars.', fields: [F('year', 'string', 'period', 'Calendar year or total.', 'derived', []), F('quarters', 'integer', 'quarters', 'Quarters covered.', 'derived', []), F('allowance_method_gasoline_usd_millions', 'number', 'million USD', 'Carbon cost per gallon x taxed gasoline.', 'estimated', ['epa-mm1', 'trfc-2026-02']), F('allowance_method_diesel_usd_millions', 'number', 'million USD', 'Upper bound; no renewable blending.', 'estimated', ['epa-mm1', 'trfc-2026-02']), F('allowance_method_total_usd_millions', 'number', 'million USD', 'Gasoline plus diesel.', 'estimated', ['epa-mm1', 'trfc-2026-02']), F('measured_premium_method_gasoline_usd_millions', 'number', 'million USD', 'Measured premium (7-state comparison) x taxed gasoline.', 'estimated', ['eia-weekly', 'trfc-2026-02'])] }, ]; const S = (id, name, url, role, licenseName, redistribution, artifactId) => ({ id, name, url, role, licenseName, redistribution, retrievedAt: RETRIEVED, ...(artifactId ? { artifactId } : {}) }); const LINK = 'Linked as a public record; source bytes are not redistributed in this release.'; const sources = [ S('eia-weekly', 'U.S. Energy Information Administration, weekly retail gasoline prices', 'https://www.eia.gov/petroleum/gasdiesel/', 'Principal source of weekly prices for Washington and comparison regions.', 'U.S. federal government data', 'Retrieved files are identified by digest in source-manifest.json; curated values redistributed with attribution to EIA.', 'source-manifest'), S('fred-cpi', 'BLS CPI-U (CPIAUCSL) via Federal Reserve Bank of St. Louis FRED', 'https://fred.stlouisfed.org/series/CPIAUCSL', 'Inflation adjustment.', 'U.S. federal government data', 'Factor values redistributed with attribution.', 'source-manifest'), S('epa-mm1', 'EPA 40 CFR Part 98 Subpart MM, Table MM-1 default factors', 'https://www.ecfr.gov/current/title-40/chapter-I/subchapter-C/part-98/subpart-MM', 'CO2 emission factors for gasoline (8.78 kg/gal) and diesel (10.21 kg/gal).', 'U.S. federal regulation', LINK), S('trfc-2026-02', 'Washington Transportation Revenue Forecast Council, Feb 2026 forecast, Vol. II, Table A.1', 'https://erfc.wa.gov/sites/default/files/2026-02/20260218_Volume_II.pdf', 'Taxed gasoline and diesel gallons by fiscal year.', 'Washington State public record', LINK), S('ecology-pub-26-14-043', 'Washington Dept. of Ecology, Clean Fuel Standard 2024 Progress (Pub. 26-14-043), Table 2', 'https://apps.ecology.wa.gov/publications/documents/2614043.pdf', 'State-commissioned 2023-2024 estimates used in replication-check.', 'Washington State public record', LINK), S('ecology-rev-forecast-2023-11', 'Ecology, Cap-and-Invest Auction Revenue Forecast Summary, Nov 2023', 'https://apps.ecology.wa.gov/publications/documents/2414057.pdf', '2023Q1-Q3 settlement prices.', 'Washington State public record', LINK), S('ecology-auction-4', 'Ecology, Auction #4 Summary Report, Dec 2023', 'https://apps.ecology.wa.gov/publications/documents/2414005.pdf', '2023Q4 settlement price.', 'Washington State public record', LINK), S('sp-global-2024-03', 'S&P Global Commodity Insights, Washington auction prices drop sharply (Mar 2024)', 'https://www.spglobal.com/energy/en/news-research/latest-news/electric-power/031324-washington-state-carbon-market-auction-prices-drop-sharply-amid-threat-of-cca-repeal', '2024Q1 settlement price (secondary).', 'News report', LINK), S('wrc-rev-forecast-2024-06', 'Ecology Revenue Forecast Summary June 2024 (copy hosted by Washington Research Council)', 'https://researchcouncil.org/wp-content/uploads/Cap-and-Invest-Auction-Revenue-Forecast-Summary-June-2024.pdf', '2024Q2 settlement price (secondary host).', 'Washington State public record', LINK), S('ecology-auction-7', 'Ecology, Auction #7 Summary Report, Sep 2024', 'https://apps.ecology.wa.gov/publications/documents/2414050.pdf', '2024Q3 settlement price.', 'Washington State public record', LINK), S('edf-2025-03', 'Environmental Defense Fund, Climate 411, Mar 12 2025', 'https://blogs.edf.org/climate411/2025/03/12/washingtons-cap-and-invest-program-remains-strong-as-first-auction-of-the-year-delivers-essential-funds-for-communities-in-the-evergreen-state/', '2024Q4 and 2025Q1 settlement prices (secondary).', 'Advocacy blog', LINK), S('ecology-auction-10', 'Ecology, Auction #10 Summary Report, Jun 2025', 'https://apps.ecology.wa.gov/publications/documents/2514037.pdf', '2025Q2 settlement price.', 'Washington State public record', LINK), S('ecology-news-2025-09', 'Ecology news release, Sep 10 2025', 'https://ecology.wa.gov/about-us/who-we-are/news/2025/sept-10-september-cap-and-invest-auction-results-announced', '2025Q3 settlement price.', 'Washington State public record', LINK), S('ecology-auction-12', 'Ecology, Auction #12 Summary Report, Dec 2025', 'https://apps.ecology.wa.gov/publications/documents/2514083.pdf', '2025Q4 settlement price.', 'Washington State public record', LINK), S('edf-2026-03', 'Environmental Defense Fund, Climate 411, Mar 11 2026', 'https://blogs.edf.org/climate411/2026/03/11/washington-states-first-cap-and-invest-auction-of-the-year-shows-growing-confidence-as-momentum-builds-towards-linkage-with-california-quebec-market/', '2026Q1 settlement price (secondary).', 'Advocacy blog', LINK), S('edf-2026-06', 'Environmental Defense Fund, Climate 411, Jun 10 2026', 'https://blogs.edf.org/climate411/2026/06/10/washingtons-latest-cap-and-invest-auction-shows-growing-confidence-as-linkage-processes-move-forward/', '2026Q2 settlement price (secondary).', 'Advocacy blog', LINK), S('ecology-auction-15', 'Ecology, Auction #15 Summary Report, Sep 2026 (Pub. 26-14-063)', 'https://apps.ecology.wa.gov/publications/documents/2614063.pdf', '2026Q3 settlement price ($39.50, auction held 2026-09-02).', 'Washington State public record', LINK), S('wa-gas-tax-2015', 'Washington Legislature, ESSB 5987 (2015), session law', 'https://lawfilesext.leg.wa.gov/biennium/2015-16/Pdf/Bills/Session%20Laws/Senate/5987-S.sl.pdf', 'Enacted 7-cent (Aug 1 2015) and 4.9-cent (Jul 1 2016) increases from a 37.5-cent base to 49.4 cents.', 'Washington State public record', LINK), S('opb-gas-tax-2025', 'OPB, Washington gas tax increase July 1 2025', 'https://www.opb.org/article/2025/06/30/washington-state-gas-tax-increase-july-1-2025/', 'July 2025 increase from 49.4 to 55.4 cents.', 'News report', LINK), S('wss-gas-tax-2026', 'Washington State Standard, gas tax inflation adjustment', 'https://washingtonstatestandard.com/?p=15458', 'July 2026 adjustment to about 56.5 cents.', 'News report', LINK), ]; const payload = { key: KEY, title: 'Washington Gasoline Price Premium and Carbon Allowance Costs, 2015-2026', description: 'Weekly EIA retail gasoline prices for Washington and comparison regions (2015-2026), Washington cap-and-invest auction prices, and taxed fuel volumes, with saved analyses of the Washington-specific price change since 2023, quarterly comparison with auction-implied carbon cost, and estimated cost to on-road fuel users. FactHub-curated; not an official EIA or Washington State publication.', rulesVersion: '2.4', curator: 'FactHub Research Team', status: 'Draft', geography: ['Washington State', 'United States (comparison regions)'], temporalCoverage: '2015-01-05 through 2026-10-05 (weekly prices); 2023Q1 through 2026Q3 (auctions and cost estimates)', unitOfObservation: 'One EIA survey week for prices; one quarter for auctions; one fiscal year for fuel volumes.', topics: ['gasoline prices', 'Climate Commitment Act', 'cap-and-invest', 'Washington State'], updateCadence: 'Immutable research release; new data requires a new version.', selectionRationale: 'Official state analysis of the Climate Commitment Act\'s gas-price effect stops at 2024. This release extends the same method through 2026 using public federal data and links the measured premium to auction prices.', reproducibilityStatus: 'Fully reproducible from public EIA and FRED downloads with Node.js 20 and no packages.', reproducibilityExplanation: 'source-manifest.json lists every retrieved file with URL and SHA-256. The four scripts regenerate every table and this payload.', limitations: [...COMMON_LIMITS, 'EIA publishes no weekly Oregon or Idaho series; Oregon, the closest supply-chain comparison, is absent. Idaho is represented only within PADD 4.', 'Prices are statewide averages and do not show regional variation within Washington.', 'Six of fifteen auction prices come from secondary reports citing Ecology results.', 'Cost estimates use taxed on-road gallons only and assume E10 gasoline; diesel estimates are upper bounds.', 'Descriptive comparisons do not by themselves establish causation; the quarterly link to auction prices is supporting, not conclusive, evidence.'], events: [{ id: 'cca-start', date: '2023-01-01', eventType: 'lawEffective', label: 'Cap-and-invest compliance obligations began', description: 'The Climate Commitment Act cap-and-invest program began January 1, 2023.', sourceIds: ['ecology-rev-forecast-2023-11'] }, { id: 'i2117-vote', date: '2024-11-05', eventType: 'election', label: 'Voters rejected I-2117 (repeal)', description: 'Washington voters rejected Initiative 2117, which would have repealed cap-and-invest.', sourceIds: [] }, { id: 'gas-tax-2025', date: '2025-07-01', eventType: 'lawEffective', label: 'State gas tax rose 6 cents', description: 'Washington gasoline tax rose from 49.4 to 55.4 cents; normalized out of the analysis.', sourceIds: ['opb-gas-tax-2025'] }], derivedFrom: [], sources, artifacts, tables, analyses, changelog: [{ date: '2026-10-09', summary: 'Initial version.' }], }; fs.writeFileSync(path.join(rel, 'dataset-payload.json'), JSON.stringify(payload, null, 2)); console.log(`Wrote ${artifacts.length} artifacts, ${tables.length} tables, ${analyses.length} analyses; payload ${JSON.stringify(payload).length} bytes`);