Skip to content

Andreas-Ja/datacenter-grid-demand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data centers and the grid: finding the demand break in SQL

US electricity demand was flat for 15 years. Around 2022 it bent upward. This project uses EIA data in SQLite to answer three questions:

  1. Which states' electricity demand has broken above its 2010-2019 trend, and by how much?
  2. Does the excess look like data centers, or something else?
  3. Is new generation showing up where the new demand is?

SQL does the analysis. Python only downloads files, loads the database, and draws charts. Every query is a readable .sql file in sql/.

Findings

1. US demand is 127 TWh above its 2010-2019 trend in 2024, and five states account for 60% of the overshoot. US retail electricity sales grew from 3,811 TWh in 2019 to 3,975 TWh in 2024. Against the pre-2020 trend that is 127 TWh of excess, about 3.3%. Texas (+43.6 TWh), Virginia (+18.4), Kentucky (+14.6), Georgia (+11.2), and Arizona (+9.2) hold 59.7% of all positive excess. Meanwhile New York (-9.4 TWh), California (-4.3), and Louisiana (-4.3) sit below trend.

Demand vs trend

Excess ranking

2. The data-center signature shows up in commercial load per customer, and it separates the boom states. Data centers are metered as a small number of very large commercial accounts. Virginia's commercial sales per customer rose 42% from 2019 to 2024 (124 to 177 MWh per year) while its commercial customer count grew just 2.7%. Oregon (+46%) and Nebraska (+30%) show the same shape. The US average moved 2.3%. Not every hot state fits: Texas' excess is roughly half industrial (industrial sales up 44 TWh, driven by LNG, chips, and crypto alongside data centers), and Kentucky is a methodological caution, not a boom. Its demand is still 0.9 TWh below 2019; it ranks high only because its industrial baseline was declining and the trend line extrapolated that decline.

Commercial per customer

3. Supply is following demand everywhere except Virginia. Texas met 76 TWh of demand growth with 83 TWh of new in-state generation. Virginia met 19.6 TWh of demand growth with 5.9 TWh of new generation; its net import gap widened from 21.6 to 35.3 TWh, the largest deterioration of any state. The proposed-generator pipeline (EIA-860) tells the same story when converted to estimated annual energy with fleet-average capacity factors: the Texas pipeline covers its excess demand 3.0 times over, Virginia's covers 1.0x, Kentucky's 0.6x.

Supply gap

Pipeline coverage

Data

All sources are public EIA files, downloaded by src/download.py:

File Content Table
HS861 2010-.xlsx Annual retail sales, revenue, customers by state and sector, 2010-2024 retail_sales
annual_generation_state.xls Annual net generation by state and source, 1990-2024 net_generation
eia8602024.zip Every operable, proposed, and retired utility-scale generator generators

Plus two small reference tables: states (Census regions) and capacity_factors (assumed fleet-average capacity factors, labeled as assumptions in sql/schema.sql).

Method

The core of the analysis is an ordinary least squares trend fit written in SQL (sql/views.sql). Each state's total demand is fit on the 2010-2019 baseline years, then extended through 2024; excess is actual minus trend:

WITH baseline AS (
    SELECT
        state_code,
        (AVG(year * total_twh) - AVG(year) * AVG(total_twh))
            / (AVG(year * year) - AVG(year) * AVG(year)) AS slope,
        AVG(year)      AS mean_year,
        AVG(total_twh) AS mean_twh
    FROM v_state_sales
    WHERE year BETWEEN 2010 AND 2019
    GROUP BY state_code
)

The numbered queries build on that:

Reproduce it

pip install -r requirements.txt
python run_all.py

One command downloads the EIA files (about 30 MB), builds grid.db, runs every query into outputs/, and renders charts/. Python 3.10+.

Limitations

  • EIA does not tag "data center" as a customer class. The commercial per-customer signature is strong circumstantial evidence, and it matches where the industry says the buildout is happening, but this data cannot directly attribute TWh to data centers.
  • The trend baseline cuts both ways. A state with a declining 2010-2019 baseline (Kentucky, Ohio, West Virginia) can post large "excess" without growing. The ranking carries an actual-growth column for exactly this reason.
  • Pipeline TWh figures are estimates. They apply assumed fleet-average capacity factors to proposed nameplate capacity. Proposed projects can slip or cancel, the pipeline spans roughly 2025-2030 in-service dates, and batteries add capacity but no annual energy.
  • State-level annual data hides detail. Utility-level and monthly data would sharpen the attribution; that is the first item on the next-steps list.
  • The generation-minus-sales balance is not a pure import measure. It also absorbs transmission losses and plant own-use, so the analysis relies on its change over time, not its level.

What I would do next

  • Load utility-level EIA-861 sales to isolate the specific utilities (Dominion, AEP Ohio) where data-center load lands
  • Add EIA-860M monthly generator updates to track pipeline slippage against the demand curve
  • Extend the demand trend with weather normalization (heating and cooling degree days)
  • Compare state electricity prices before and after the demand break to test who pays for the buildout

Sources and credits

Data: US Energy Information Administration, EIA-861, EIA-923 state generation, EIA-860. Capacity factor assumptions approximate EIA Electric Power Monthly Table 6.07 fleet averages. Analysis and any errors are mine.

About

SQL analysis of US electricity demand vs trend: which states broke out, and is it data centers? EIA data in SQLite

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages