Spatial Analysis: Grid Stress and Data Center Siting

GIS for Spatial Data Science

Author

Sangeun Lee

Overview

Electricity is a unique commodity in microeconomic theory. Unlike standard goods, its delivery is constrained by the strict physical laws of the transmission grid. In an ideal “copperplate” world, electricity would flow freely without resistance, allowing for a single market-clearing price where supply equals demand. However, in the real world, transmission lines have finite capacity. When these lines become congested, the grid cannot physically transport power from the supply side to the demand side.

The rise of renewable energy sources, combined with the explosive growth of energy-intensive Data Centers (DCs), has placed unprecedented strain on grid capacity. Yet, despite facing the same physical problem of the transmission grid, Germany and the United States have adopted opposite pricing mechanisms to solve the problem of how electricity prices reflect the real costs of serving new loads.

Germany operates as a single-price market, treating the entire country (along with Luxembourg) as a single bidding zone. All market participants face a single uniform sales price, even though generation resources and transmission constraints differ sharply between the wind-rich North and the industrial South. To maintain physical stability, German grid operators must carry out expensive balancing measures, such as redispatch and curtailing renewables. These costs are treated as an externality and socialized across all consumers via grid fees. Even within this framework, final retail prices still vary by region because grid and tax charges differ by region.

By contrast, the majority of deregulated markets in the United States use locational marginal pricing (LMP). This model integrates the physical constraints of the grid directly into the market ex-ante, calculating prices at thousands of nodes on the grid, and each node’s price reflects local energy costs, transmission congestion, and losses. Retail electricity prices add transmission, distribution, and other components on top of these locational wholesale prices.

NoteNote: Understanding of the two Models

The core economic problem in electricity markets is the efficient allocation of generation and network capacity when supply costs and transmission constraints differ by location. To illustrate the difference between models, consider a highly simplified two-region model consisting of Region A (abundant low-cost generation plants), and Region B (high demand with expensive local generation), where \(MC_A < MC_B\) and the two regions are connected by a transmission line with finite capacity. If there were no transmission constraints, the least cost dispatch would serve both regions at a common marginal cost, equalized between A and B. With a binding transmission constraint, however, the marginal cost of serving an additional unit of demand in B is higher than in A.

The U.S. Electricity Market

The U.S. market computes LMPs by incorporating both energy and congestion components, allowing nodes behind a constraint to see higher prices when transmission is scarce. When a new large load, such as a DCs, connects in a region already close to its transmission or generation capacity, the marginal cost of serving an additional megawatt at that node rises and is reflected in an elevated local price. The cost of congestion is borne primarily by consumers at constrained locations, either directly through wholesale prices or indirectly through retail tariffs that reflect the higher cost of supply in that area. This can lead to substantial spatial variation in average retail prices across U.S. states and utility territories, and recent analyses indicated that regions with intense DCs development are seeing especially rapid wholesale price growth and higher capacity costs. While this results in substantial spatial variation in prices, it ensures the large developers to face the marginal cost of their siting decisions.

Code
library(tidyverse) |> suppressPackageStartupMessages()
library(sf) |> suppressPackageStartupMessages()
library(spdep) |> suppressPackageStartupMessages()
library(sfdep) |> suppressPackageStartupMessages()
library(spatialreg) |> suppressPackageStartupMessages()
library(broom) |> suppressPackageStartupMessages()
library(mapview) |> suppressPackageStartupMessages()
library(spatstat) |> suppressPackageStartupMessages()
library(rnaturalearth) |> suppressPackageStartupMessages()
library(tidygeocoder) |> suppressPackageStartupMessages()
library(cowplot) |> suppressPackageStartupMessages()
library(viridis) |> suppressPackageStartupMessages()
Code
us_elecprices <- read_csv("https://raw.githubusercontent.com/SangeunL/GIS-Final-Project/refs/heads/main/electricity_2024.csv", show_col_types = FALSE)
pop_data <- read_csv("https://raw.githubusercontent.com/SangeunL/GIS-Final-Project/refs/heads/main/USpop24.csv", show_col_types = FALSE)

us_states <- ne_states(country = "united states of america", returnclass = "sf") %>%
  filter(!name %in% c("Alaska", "Hawaii")) %>% 
  select(name, postal, geometry)

pop_data <- pop_data %>%
  mutate(Statepop = gsub("^\\.", "", State)) %>%
  select(State = Statepop, population = Pop) 

elec_pop_map <- us_states %>%
  left_join(pop_data, by = c("name" = "State")) %>%
  left_join(us_elecprices, by = c("name" = "State"))

1. Statistical Analysis: Does Population Drive Price?

To test the hypothesis that population density exerts upward pressure on electricity prices, I first employed a standard Ordinary Least Squares (OLS) regression. The model predicts residential electricity price (Price_Res) based on the natural log of population (log(population)), assuming that errors are independent and identically distributed (i.i.d.).

Code
ols_fit <- lm(Price_Res ~ log(population), data=elec_pop_map)
result_df <- broom::tidy(ols_fit)
result_df
term estimate std.error statistic p.value
(Intercept) 11.631617 11.4984661 1.0115799 0.3169185
log(population) 0.349824 0.7517183 0.4653658 0.6438187
Code
estimates <- result_df$estimate
b0_hat <- estimates[1]
b1_hat <- estimates[2]
elec_pop_map |> ggplot(aes(x=log(population), y=Price_Res)) +
  geom_point() +
  geom_abline(
    slope = b1_hat, intercept=b0_hat,
    linewidth=1
  ) +
  theme_classic()

Code
# Residual plot
elec_pop_map$resid <- ols_fit$residuals
elec_pop_map |> ggplot(aes(x=log(population), y=resid)) +
  geom_point() +
  geom_hline(yintercept=0, linewidth=1) +
  theme_classic()

Code
#Residual map 
elec_pop_map |> ggplot(aes(fill = resid)) + 
    geom_sf() + 
    scale_fill_gradient2(low = "black", mid = "white", high = "red", midpoint = 0) + 
    theme_classic()

There is a visual evidence that our error terms are not independent of the spatial distribution of states!

The OLS results initially suggest a weak or insignificant relationship between population and price (\(p > 0.05\)). However, the diagnostic plots reveal a critical flaw in the model. The Residual Map above does not show random “noise”. Instead, it displays clear regional clustering: large swathes of the country are either uniformly positive (red) or uniformly negative (black). This pattern, which is especially evident in the New England region, suggests that an unobserved variable—likely the regional transmission grid—is causing the errors in one state to be correlated with the errors in neighboring states. This violates the independence assumption of OLS. To confirm this mathematically, we calculate the global Moran’s I statistic.

Code
us_nb <- st_contiguity(elec_pop_map)
moran_residuals <- global_moran_test(elec_pop_map$resid, us_nb , st_weights(us_nb))
moran_residuals

    Moran I test under randomisation

data:  x  
weights: listw    

Moran I statistic standard deviate = 7.6607, p-value = 9.249e-15
alternative hypothesis: greater
sample estimates:
Moran I statistic       Expectation          Variance 
      0.709202866      -0.020833333       0.009081484 

The Global Moran’s I test returns a statistic of 0.7092 with a highly significant p-value. A score this close to 1 indicates extremely strong positive spatial autocorrelation.

This confirms that state residential electricity prices are not independent; they are physically linked to their neighbors. A high price in one state “spills over” to adjacent states due to shared grid infrastructure and cross-border electricity trading. Therefore, we must reject the OLS model and adopt a Spatial Lag Model (SAR), which explicitly accounts for this “neighborhood effect” (Rho).

Code
ldv_fit <- lagsarlm(Price_Res ~ log(population), data=elec_pop_map, listw=nb2listw(us_nb))
broom::tidy(ldv_fit)
term estimate std.error statistic p.value
rho 0.8146577 0.0723649 11.257642 0.0000000
(Intercept) -11.9715878 6.3111265 -1.896902 0.0578409
log(population) 0.9989780 0.4157425 2.402877 0.0162667
Code
elec_pop_map$sp_resid <- ldv_fit$resid
elec_pop_map |> ggplot(aes(x=ldv_fit$fitted.values, y=sp_resid)) +
  geom_point() +
  geom_hline(yintercept=0, linewidth=1) +
  theme_classic()

Code
elec_pop_map |> ggplot(aes(fill = sp_resid)) + 
    geom_sf() + 
    scale_fill_gradient2(low ="Black", mid = "White", high = "Red", midpoint = 0) + 
    theme_classic()

By incorporating the spatial lag term (Rho), two key findings emerge:

  1. Rho (0.815) is highly significant, confirming that a state’s price is strongly predicted by its neighbors’ prices.
  2. Population (log(population)) becomes statistically significant (\(p < 0.05\)) with a positive coefficient (0.999).

This reveals a relationship that the OLS model missed: once we control for regional grid effects, higher population density does drive up electricity prices. We can now perform a final quality check on the new residuals (sp_resid) to ensure the spatial bias has been removed.

Code
moran_spresiduals <- global_moran_test(elec_pop_map$sp_resid, us_nb, st_weights(us_nb))
moran_spresiduals

    Moran I test under randomisation

data:  x  
weights: listw    

Moran I statistic standard deviate = 0.26642, p-value = 0.395
alternative hypothesis: greater
sample estimates:
Moran I statistic       Expectation          Variance 
      0.001992140      -0.020833333       0.007340243 

The final Moran’s I test on the spatial residuals is insignificant (0.0019), and the p-value is \(> 0.05\). This indicates that the Spatial Lag model has successfully filtered out the spatial autocorrelation. The remaining errors are random, validating the statistical conclusion that population density strains the grid and raises prices.

2. Physical Analysis: The Supply-Demand Mismatch

Having established the economic link between population and price, we can now investigate the physical mechanism behind it. The strong spatial dependence found above (Rho) exists because “Deficit States” must physically import electrons from “Surplus States.”

The Grid Independence Ratio for each state is calculated with the formula: \(\text{Independence} = \left( \frac{\text{Net Generation (MWh)}}{\text{Total Retail Sales (MWh)}} \right) \times 100\)

\(Value > 100%\) (Surplus): The state is an “Exporter” (a Power Plant for its neighbors).

\(Value < 100%\) (Deficit): The state is an “Importer” (a Drain on the grid).

This geographic imbalance creates the physical backbone of the spatial pricing pattern: high-population states must buy power from distant, cheaper generation sources, requiring long-distance transmission. The costs of congestion management on these transmission lines are then passed back to consumers through wholesale prices and grid fees.

Code
us_elec_2024 <- read.csv("https://raw.githubusercontent.com/SangeunL/GIS-Final-Project/refs/heads/main/2024_State_Elec.csv") 

us_total_2024 <- elec_pop_map %>%
  left_join(us_elec_2024, by = c("name" = "State"))

us_total_2024 <- us_total_2024 %>%
  mutate(
    pct_green = (net_renew_gen / net_gen) * 100, 
    independence = (net_gen / tot_ret_sales) * 100
    )

What these calculations represent:

- independence: Shows whether a state is self-sufficient \(=>100%)\) or dependent on imports \(<100%)\). States with high population density and limited local generation will have low independence scores.

- pct_green: The percentage of generation from renewable sources (wind, solar, hydroelectric, but excluding pumped storage type of hydroelectric). The source of renewables varies dramatically by region due to resource endowments and policy choices.

Code
us_total_2024 |> ggplot(aes(fill = independence)) + 
    geom_sf() + 
    scale_fill_gradient2(low = "navy", mid = "white", high = "red", midpoint = 100) + 
    theme_classic()

The map shows a geographic pattern. The Mountain West and Midwest ( Wyoming, Dakotas, Montana, and Pennsylvania) are deep red—major exporters with abundant cheap coal and wind. The Northeast and West Coast (Vermont, Maryland, and Virginia) are dark blue—major importers dependent on purchasing power from distant sources.

Critically, the primary Data Center hubs, Northern Virginia (VA), Maryland (MD), and California (CA), are located in deep Navy (Deficit) zones. This physical reliance on imports explains the high Spatial Lag (Rho) found in our statistical model: when a data center opens in a Navy state, it forces the grid to transmit power from distant Red states, increasing congestion costs for the entire region.

3. Environmental Analysis: The Green Energy Gap

Finally, we assess whether these “Deficit” states at least offer access to clean energy. Data centers frequently claim to be “100% Renewable,” but this is often achieved through financial credits rather than physical reality (a.k.a Virtual Power Purchase Agreements). By mapping the Percentage of In-State Renewable Generation, we can see if data centers are locating near actual green power.

Code
us_total_2024 |> ggplot(aes(fill = pct_green)) + 
    geom_sf() + 
    scale_fill_gradient2(low = "white", high = "red", ) + 
    theme_classic()

The “Greenness” map reveals a contrasting result from their claims. The states with the highest renewable penetration (red regions) are generally in the Pacific Northwest (Hydro) and the Great Plains (Wind). In contrast, the Data Center capital, Virginia (VA), appears to be light red or white (low renewable percentage). This creates a “double penalty” for the grid:

1. Economic: The data centers in Virginia increase demand in a high-cost, deficit region.

2. Environmental: Because local green supply is low, the imported power they rely on often comes from neighboring fossil-fuel-heavy exporters.

4. Linking Price, Independence, and Renewable Share

Now we can extend the spatial model to test whether independence and renewable generation help explain spatial variation in electricity prices, beyond just population and geographic proximity.

Code
ldv_extended <- lagsarlm(avg_ret_price ~ log(population) + independence + pct_green, data = us_total_2024, listw = nb2listw(us_nb))

summary(ldv_extended)

Call:lagsarlm(formula = avg_ret_price ~ log(population) + independence + 
    pct_green, data = us_total_2024, listw = nb2listw(us_nb))

Residuals:
     Min       1Q   Median       3Q      Max 
-3.67209 -1.73140 -0.65037  1.00259 12.45010 

Type: lag 
Coefficients: (asymptotic standard errors) 
                  Estimate Std. Error z value Pr(>|z|)
(Intercept)     -9.5751896  6.6571247 -1.4383  0.15034
log(population)  0.8627628  0.3997514  2.1582  0.03091
independence    -0.0105008  0.0094207 -1.1147  0.26500
pct_green        0.0104247  0.0169289  0.6158  0.53803

Rho: 0.8036, LR test value: 42.475, p-value: 7.1598e-11
Asymptotic standard error: 0.076379
    z-value: 10.521, p-value: < 2.22e-16
Wald statistic: 110.7, p-value: < 2.22e-16

Log likelihood: -121.3696 for lag model
ML residual variance (sigma squared): 6.6145, (sigma: 2.5719)
Number of observations: 49 
Number of parameters estimated: 6 
AIC: 254.74, (AIC for lm: 295.21)
LM test for residual autocorrelation
test value: 0.0015353, p-value: 0.96874

The Dominance of the Grid (Rho): The spatial autoregressive parameter (Rho) remains the dominant factor (0.80, \(p < 0.05\)). This confirms that individual state policies (like increasing renewable generation) are overshadowed by the broader regional price dynamics of the transmission grid.

Robustness of Population: Even after controlling for supply (independence) and fuel mix (pct_green), population density remains a statistically significant driver of price (\(p = 0.03\)).

Insignificance of Physical Variables: The variables for independence and pct_green were not statistically significant. This is likely due to Collinearity or Counfounding Variables: population density is already a near-perfect proxy for grid independence (i.e., high-population states are almost invariably net importers). The model “chooses” population as the primary signal for this relationship.

Conclusion

This work utilized geospatial econometrics to investigate the impact of population density and digital infrastructure on U.S. electricity markets.

1. Statistical Evidence of Grid Stress

The initial OLS analysis suggested a weak link between population and price, but this was due to significant spatial autocorrelation (\(I = 0.71\)). By employing a Spatial Lag Model to control for regional grid effects, the true relationship was revealed: population density is a statistically significant driver of electricity prices (\(p < 0.05\)). This confirms that adding large loads (e.g. data centers) to high-density areas exerts upward pressure on prices.

2. The Physical Mechanism

Our geospatial analysis identified the mechanism behind this price pressure. The high-density states hosting major data center clusters (Virginia, Maryland, and California) are Net Importers of electricity. They lack the local generation capacity to meet their own demand, creating a dependency on neighboring states that mirrors the spatial lag found in our regression.

3. Policy Implications

The results demonstrate a Spatial Mismatch. Data centers are clustered in high-population, low-independence, low-renewable regions (like Northern Virginia).

  • They seek proximity to users (Population).
  • But in doing so, they locate in regions that must import power (Low Independence).
  • And that imported power is often fossil-heavy (Low Greenness).

Without regulatory intervention to decouple data center siting from population density, the “invisible hand” will continue to place the largest energy consumers in the most constrained parts of the grid, exacerbating the very price increases our model predicts.