Back to Article
Article Notebook
Download Source

Are electric vehicle (EV) ownership spatially clustered near the LA metropolitan core?

DSAN 6750: GIS for Spatial Data Science

Author
Affiliation

Xiangzhi Chen

Georgetown University

In [1]:
set.seed(6805)
library(tidyverse) |> suppressPackageStartupMessages()
library(sf) |> suppressPackageStartupMessages()
library(mapview) |> suppressPackageStartupMessages()
library(spatstat) |> suppressPackageStartupMessages()
library(stars) |> suppressPackageStartupMessages()
library(dplyr) |> suppressPackageStartupMessages()
library(tidyr) |> suppressPackageStartupMessages()
library(tigris) |> suppressPackageStartupMessages()
library(scales) |> suppressPackageStartupMessages()
library(grid) |> suppressPackageStartupMessages()
library(spatstat.random) |> suppressPackageStartupMessages()
library(ggplot2) |> suppressPackageStartupMessages()
library(plotly) |> suppressPackageStartupMessages()

Introduction

The rapid growth of electric vehicle adoption is central to California’s clean energy and transportation policies. As the nation’s leader in EV ownership, California—particularly the Los Angeles metropolitan area—offers an ideal setting to study spatial patterns of adoption. This project examines whether ZIP codes with higher EV adoption rates are spatially clustered near major metropolitan centers in Los Angeles County. By analyzing the intensity of EV registrations, the study aims to identify spatial clustering that may reflect socioeconomic, infrastructural, or policy-driven influences on EV distribution.

Literature Review

Existing research on electric vehicle (EV) adoption consistently highlights the importance of geography, socioeconomic characteristics, and charging infrastructure in shaping spatial patterns of uptake. Studies find that EV ownership is often concentrated in affluent urban and suburban areas, where early adopters tend to have higher income and education levels (Hsu and Fingerman 2021).

Spatial modeling work sdemonstrates that EV registrations frequently exhibit significant geographic clustering, suggesting that adoption spreads through social influence, neighborhood effects, and proximity to infrastructure (Liu, Roberts, and Sioshansi 2017). Moreover, evaluations of U.S. cities highlight the critical role of public and workplace charging infrastructure and local incentives—markets with denser charging networks and stronger local policies exhibit faster EV growth (Slowik and Lutsey 2017).

Overall, the literature indicates that EV adoption is not randomly distributed but reflects spatially clustered patterns shaped by demographic factors, built-environment characteristics, and policy interventions—motivating closer examination of clustering within Los Angeles Counties.

Methodology

Here, data is gathered from Vehicle Fuel Type Count by Zip Code, which provides EV(and traditional gasoline vehicles) counts in California with zip code.

Exploratory Data Analysis (EDA)

Here we plot the base GIS objects that we are analyzing: each EV centroid (in yellow) and the popultion of each zip code (in purple).

In [2]:
df_ev <- read.csv("data/2025_Vehicle_Fuel_Type_Zip_Code.csv")
df_area <- read.csv("data/LA_area.csv")

df_area <- df_area |> 
  rename(ZIP.Code = ZIPCODE, Area = AnalysisArea) |>
  select(ZIP.Code, Area)

# Keep only ZIP.Code and Vehicles
df_ev_clean <- df_ev |> 
  filter(Fuel %in% c("Battery Electric")) |> 
  group_by(ZIP.Code) |> 
  summarise(
    Vehicles = sum(Vehicles, na.rm = TRUE),
    .groups = "drop"
  )

# Ensure ZIP is numeric
df_ev_clean$ZIP.Code <- as.numeric(df_ev_clean$ZIP.Code)
Warning: NAs introduced by coercion
# Define full ZIP range
la_zips <- seq(90001, 91608)

# Aggregate EV count for each ZIP
df_ev_sum <- df_ev_clean |>
  filter(ZIP.Code >= 90001, ZIP.Code <= 91608) |>
  group_by(ZIP.Code) |>
  summarise(Vehicles = sum(Vehicles, na.rm = TRUE))

df_ev_full <- data.frame(ZIP.Code = la_zips) |>
  left_join(df_ev_sum, by = "ZIP.Code") |>
  filter(!is.na(Vehicles)) |>
  left_join(df_area, by = "ZIP.Code") |>
  filter(!is.na(Area))
In [3]:
options(tigris_use_cache = TRUE)

df_population <- read.csv(
  "data/California_Population.csv",
  check.names = FALSE,
  colClasses = "character"
)
Warning in read.table(file = file, header = header, sep = sep, quote = quote, :
incomplete final line found by readTableHeader on
'data/California_Population.csv'
# Pivot longer and change to desired format
df_population_long <- df_population |>
  pivot_longer(
    cols = starts_with("ZCTA5"),
    names_to = "ZIP.Code",
    values_to = "Population"
  ) |>
  mutate(
    ZIP.Code = gsub("ZCTA5 ", "", ZIP.Code),
    ZIP.Code = gsub("ZCTA5\\.", "", ZIP.Code),
    ZIP.Code = as.numeric(ZIP.Code),
    Population = as.numeric(gsub(",", "", Population))
  ) |> 
  select(ZIP.Code, Population)

# Filter LA ZIP range
df_population_la <- df_population_long |>
  filter(ZIP.Code >= 90001, ZIP.Code <= 91608)
In [4]:
# Load LA County boundary
la_county <- counties(state = "CA", year = 2025) |>
  filter(NAME == "Los Angeles") |>
  st_transform(3857)

# Transform
la_zip_sf <- zctas(year = 2025) |> 
  filter(GEOID20 >= "90001", GEOID20 <= "91608") |> 
  rename(ZIP.Code = GEOID20) |> 
  mutate(ZIP.Code = as.numeric(ZIP.Code)) |>
  left_join(df_population_la, by = "ZIP.Code") |>
  st_transform(3857)

la_zip_ev_sf <- la_zip_sf |>
  left_join(df_ev_full, by = "ZIP.Code") |>
  filter(!is.na(Vehicles))

# Spatial join name
la_zip_ev_sf <- st_join(la_zip_ev_sf, la_county["NAME"])

la_zip_ev_sf <- la_zip_ev_sf |>
  mutate(
    label = paste0(
      "ZIP: ", ZIP.Code, "<br>",
      "County: ", NAME, "<br>",
      "EV Count: ", Vehicles
    )
  )

# Create mapview
map_zip <- mapview(
  la_zip_ev_sf,
  alpha.regions = 0.15,
  lwd = 0.5,
  label = "label"
)

map_ev <- mapview(
  la_zip_ev_sf,
  zcol = "Vehicles",
  alpha.regions = 0.9,
  layer.name = "EV Density",
  label = "label"
)

map_zip + map_ev
In [5]:
# Transform
la_zip_sf <- zctas(year = 2025) |> 
  filter(GEOID20 >= "90001", GEOID20 <= "91608") |> 
  rename(ZIP.Code = GEOID20) |> 
  mutate(ZIP.Code = as.numeric(ZIP.Code)) |>
  left_join(df_population_la, by = "ZIP.Code") |>
  st_transform(3857)

# Build centroid
zip_centroids <- st_centroid(la_zip_sf)
Warning: st_centroid assumes attributes are constant over geometries
zip_centroids <- zip_centroids |>
  left_join(df_ev_full, by = "ZIP.Code") |>
  filter(!is.na(Vehicles))

# Normalize both metrics to a shared scale
zip_centroids <- zip_centroids |>
  mutate(population_area = Population / Area) |>
  mutate(
    pop_scaled = rescale(population_area, to = c(0.2, 2)),
    ev_scaled = rescale(Vehicles, to = c(0.2, 2))
  )

# Purple population circles (scaled)
map_pop <- mapview(
  zip_centroids,
  zcol = "population_area",
  cex = "pop_scaled",
  col.regions = "purple",
  layer.name = "Population Per Square Miles (scaled)"
)

# Yellow EV circles (scaled)
map_ev <- mapview(
  zip_centroids,
  zcol = "Vehicles",
  cex = "ev_scaled",
  col.regions = "yellow",
  layer.name = "EV Count (scaled)"
)

map_pop + map_ev

We are able to tell that areas with large population don’t seem to exhibit high volumn of electric vehicles. Its deterministic factors must be something else.

In [6]:
df_income <- read.csv(
  "data/Income_California.csv",
  check.names = FALSE
)

# Pivot longer: turn all ZCTA columns into rows
df_long <- df_income %>%
  pivot_longer(
    cols = starts_with("ZCTA5"),
    names_to = "colname",
    values_to = "value"
  )

# Extract ZIP and variable type
df_long <- df_long %>%
  mutate(
    ZIP.Code = str_extract(colname, "[0-9]{5}") %>% as.numeric(),
    VarType = case_when(
      str_detect(colname, "Households!!Estimate") ~ "Households",
      str_detect(colname, "Families!!Estimate") ~ "Families",
      str_detect(colname, "Married-couple families!!Estimate") ~ "MarriedCouple",
      str_detect(colname, "Nonfamily households!!Estimate") ~ "NonFamily",
      TRUE ~ NA
    )
  ) %>%
  filter(!is.na(ZIP.Code)) %>%
  filter(ZIP.Code >= 90001, ZIP.Code <= 91608)

# Extract Mean Income row
df_mean_income <- df_long %>% 
  filter(
    `Label (Grouping)` == "Median income (dollars)",
    str_detect(colname, "Families!!Estimate")
  ) %>%
  select(ZIP.Code, MeanIncome = value) %>% 
  mutate(MeanIncome = as.numeric(gsub(",", "", MeanIncome)))
Warning: There was 1 warning in `mutate()`.
ℹ In argument: `MeanIncome = as.numeric(gsub(",", "", MeanIncome))`.
Caused by warning:
! NAs introduced by coercion
# Extract "Total" Household / Family statistics for each ZIP
df_zip_totals <- df_long %>%
  filter(`Label (Grouping)` == "Total") %>%
  select(ZIP.Code, VarType, value) %>%
  mutate(value = as.numeric(gsub(",", "", value))) %>%
  pivot_wider(
    names_from = VarType,
    values_from = value
  )

# Combine into final clean income table
df_income_zip <- df_zip_totals %>%
  left_join(df_mean_income, by = "ZIP.Code")

Now, use mean income per household.

In [7]:
# Transform
la_zip_sf <- zctas(year = 2025) |> 
  filter(GEOID20 >= "90001", GEOID20 <= "91608") |> 
  rename(ZIP.Code = GEOID20) |> 
  mutate(ZIP.Code = as.numeric(ZIP.Code)) |>
  left_join(df_income_zip, by = "ZIP.Code") |>
  st_transform(3857)

# Build centroid
zip_centroids <- st_centroid(la_zip_sf)
Warning: st_centroid assumes attributes are constant over geometries
zip_centroids <- zip_centroids |>
  left_join(df_ev_full, by = "ZIP.Code") |>
  filter(!is.na(Vehicles))

# Purple MeanIncome circles
map_income <- mapview(
  zip_centroids,
  zcol = "MeanIncome",
  cex = "MeanIncome",
  col.regions = "blue",
  layer.name = "Mean Income"
)

# Yellow EV circles
map_ev <- mapview(
  zip_centroids,
  zcol = "Vehicles",
  cex = "Vehicles",
  col.regions = "yellow",
  layer.name = "EV Count"
)

map_income + map_ev

There seems to be a positive correlation. Realtively high EV counts and higher mean income along the coast.

Comparing Estimated Intensity Functions

Here, zip code 90704(Avalon, Catalina Island) is not included here since it is an outlier and it is certainly not metropolis(small population with only 33 EVs). And

In [8]:
# ZCTA polygons
zcta_sf <- zctas(year = 2025)

# Keep only LA ZIP codes (90001–91608)
la_zcta_sf <- zcta_sf |>
  filter(
    GEOID20 >= "90001",
    GEOID20 <= "91608",
    GEOID20 != "90704"
  ) |>
  filter(GEOID20 %in% zip_centroids$ZIP.Code) |>
  st_transform(3857)

la_centroids <- la_zcta_sf |>
  st_centroid() |>
  mutate(
    lon = st_coordinates(geometry)[,1],
    lat = st_coordinates(geometry)[,2]
  )
Warning: st_centroid assumes attributes are constant over geometries
In [9]:
zip_centroids <- zip_centroids |>
  filter(ZIP.Code != "90704") |>
  filter(ZIP.Code %in% zip_centroids$ZIP.Code)
coords <- st_coordinates(zip_centroids)
la_sfc <- la_centroids |> st_geometry()

hull_sf <- la_sfc |> 
  st_union() |> 
  sf::st_concave_hull(ratio = 0.2) |> 
  st_buffer(dist = 500)

# Convert hull polygon to spatstat window
W <- as.owin(hull_sf)

# Convert sfc POINT to ppp
ev_ppp <- ppp(
  x = coords[,1],
  y = coords[,2],
  window = W,
  marks = zip_centroids$Vehicles,
  checkdup = TRUE
)

plot(W, main = "LA EV ZIP Centroid PPP (Marks = EV Count)")

plot(ev_ppp)

In [10]:
# Function to generate random points within a polygon
sample_points_in_polygon <- function(polygon, n) {
  spatstat.random::rpoint(n, win = as.owin(polygon))
}

# Convert ZIP polygons to spatstat windows
la_zip_ev_sf$win <- lapply(st_geometry(la_zip_ev_sf), as.owin)

# Generate EV points for each ZIP
ev_points_list <- mapply(
  FUN = function(win, n) {
    spatstat.random::rpoint(n, win = win)
  },
  win = la_zip_ev_sf$win,
  n = la_zip_ev_sf$Vehicles,
  SIMPLIFY = FALSE
)

# Combine all PPP objects into one big PPP
ev_points <- do.call(superimpose, ev_points_list)
plot(ev_points, main = "Observed EV Points in LA")

In [11]:
ggplot(as.data.frame(ev_points), aes(x, y)) +
  geom_point(alpha = 0.05, size = 0.5)

ZIP Intensity :

In [12]:
# Estimated intensity functions for zip
ev_int <- density(ev_ppp)
plot(ev_int, main = "Unweighted EV Intensity (PPP)")

EV-Weighted Intensity:

In [13]:
# Estimated intensity functions for ev count
ev_int_w <- density(ev_ppp, weights = ev_ppp$marks)
plot(ev_int_w, main = "EV-Weighted Intensity (Vehicles as Marks)")

Population-Weighted Intensity:

In [14]:
# Estimated intensity functions for population
zip_centroids <- zip_centroids |> 
  left_join(df_population_la, by = "ZIP.Code") |>
  filter(!is.na(Area)) |>
  mutate(population_area = Population / Area)

coords <- st_coordinates(zip_centroids)
W <- as.owin(hull_sf)

pop_ppp <- ppp(
  x = coords[,1],
  y = coords[,2],
  window = W,
  marks = zip_centroids$population_area,
  checkdup = TRUE
)

pop_int_w <- density(pop_ppp, weights = pop_ppp$marks)
plot(pop_int_w, main = "Population-Weighted Intensity")

Income-Weighted Intensity:

In [15]:
# Estimated intensity functions for income
zip_inc_cleanIncome <- zip_centroids %>%
  filter(!is.na(MeanIncome))

coords <- st_coordinates(zip_inc_cleanIncome)

inc_ppp <- ppp(
  x = coords[,1],
  y = coords[,2],
  window = W,
  marks = zip_inc_cleanIncome$MeanIncome,
  checkdup = TRUE
)

inc_int_w <- density(inc_ppp, weights = inc_ppp$marks)
plot(inc_int_w, main = "Income-Weighted Intensity")

Region Split: Population Density

In [16]:
num_regions <- 3
region_labels <- c("Low", "Medium", "High")

pop_vals <- pop_int_w$v  # numeric values
xcol <- pop_int_w$xcol  # x coordinates
yrow <- pop_int_w$yrow  # y coordinates
W <- pop_int_w$window

# compute split thresholds
prob_custom <- c(0, 0.10, 0.10 + 0.60, 1)  # based on U.S. Census Bureau
pop_quant <- quantile(pop_vals, probs = prob_custom, na.rm = TRUE)

# cut values into regions
pop_cut_values <- cut(
  pop_vals,
  breaks = pop_quant,
  labels = region_labels,
  include.lowest = TRUE
)

# reshape into matrix with same dimensions as original raster
pop_cut_im <- im(
  mat = matrix(pop_cut_values, nrow = nrow(pop_vals), ncol = ncol(pop_vals)),
  xcol = xcol,
  yrow = yrow,
  unitname = pop_int_w$unitname
)

pop_cut_im$window <- W

pop_areas <- tess(image = pop_cut_im)
plot(pop_areas)

Region Split: Income Density

In [17]:
num_regions <- 3
region_labels <- c("Low", "Medium", "High")

inc_vals <- inc_int_w$v  # numeric values
xcol_inc <- inc_int_w$xcol  # x coordinates
yrow_inc <- inc_int_w$yrow  # y coordinates
W_inc <- inc_int_w$window  # window

# compute split thresholds
prob_qtiles <- (0:num_regions) / num_regions
prob_custom <- c(0, 0.20, 0.20 + 0.52, 1)  # based on Pew Research Center
inc_quant <- quantile(inc_vals, probs = prob_qtiles, na.rm = TRUE)

# cut values into regions
inc_cut_values <- cut(
  inc_vals,
  breaks = inc_quant,
  labels = region_labels,
  include.lowest = TRUE
)

# reshape into an spatstat im
inc_cut_im <- im(
  mat = matrix(inc_cut_values, nrow = nrow(inc_vals), ncol = ncol(inc_vals)),
  xcol = xcol_inc,
  yrow = yrow_inc,
  unitname = inc_int_w$unitname
)

inc_cut_im$window <- W_inc

# income tessellation
inc_areas <- tess(image = inc_cut_im)
plot(inc_areas)

Simple Regression: EV Count vs Population Density

In [18]:
plot_df <- zip_centroids %>%
  filter(!ZIP.Code %in% c(90301, 91208, 91501, 91321, 90504, 90262)) %>%
  mutate(pop_density = Population / Area) %>%
  select(ZIP.Code, Vehicles, pop_density, MeanIncome)

# Simple regression
p1 <- ggplot(plot_df, aes(x = pop_density, y = Vehicles, label = ZIP.Code)) +
  geom_point(color = "darkblue") +
  geom_smooth(method = "lm", se = FALSE, color = "red") +
  labs(
    title = "EV Count vs Population Density",
    x = "Population Density",
    y = "EV Count"
  ) +
  theme_classic()

ggplotly(p1, tooltip = c("label", "x", "y"))
`geom_smooth()` using formula = 'y ~ x'
Warning: The following aesthetics were dropped during statistical transformation: label.
ℹ This can happen when ggplot fails to infer the correct grouping structure in
  the data.
ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
  variable into a factor?

After removing the outliers(in order to closely examine the relationship):

In [19]:
# Simple regression with no outlier
p1 <- ggplot(plot_df, aes(x = pop_density, y = Vehicles, label = ZIP.Code)) +
  geom_point(color = "darkblue") +
  geom_smooth(method = "lm", se = FALSE, color = "red") +
  labs(
    title = "EV Count vs Population Density",
    x = "Population Density",
    y = "EV Count"
  ) +
  theme_classic()

ggplotly(p1, tooltip = c("label", "x", "y"))
`geom_smooth()` using formula = 'y ~ x'
Warning: The following aesthetics were dropped during statistical transformation: label.
ℹ This can happen when ggplot fails to infer the correct grouping structure in
  the data.
ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
  variable into a factor?

There is no clear realtionship between EV count and population.

Simple Regression: EV Count vs Mean Income

In [20]:
p2 <- ggplot(plot_df, aes(x = MeanIncome, y = Vehicles, label = ZIP.Code)) +
  geom_point(color = "darkgreen") +
  geom_smooth(method = "lm", se = FALSE, color = "orange") +
  labs(
    title = "EV Count vs Mean Income",
    x = "Mean Household Income ($)",
    y = "EV Count"
  ) +
  theme_classic()

ggplotly(p2, tooltip = c("label", "x", "y"))
`geom_smooth()` using formula = 'y ~ x'
Warning: Removed 10 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: The following aesthetics were dropped during statistical transformation: label.
ℹ This can happen when ggplot fails to infer the correct grouping structure in
  the data.
ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
  variable into a factor?

It seems that EV counts in LA is positively correlated with Mean Income

Monte Carlo Simulation

To formally test the hypothesis, I constructed two null models:

  1. a population-weighted null in which EVs were simulated proportionally to residential density; and

  2. an income-weighted null in which EVs were simulated according to neighborhood income levels.

For each null, I generated 999 Monte Carlo realizations. The simulations produced distributions of EV counts within each region (Low, Medium, High population or income), allowing direct comparison between the observed EV counts and the values expected under each null model.

For Population Density:

In [21]:
gen_sims_ppp <- function(num_sims) {
  ev_sims <- spatstat.random::rpoint(
    # n = nrow(zip_centroids),
    n = ev_points$n,
    f = pop_int_w,  # population intensity
    nsim = num_sims
  )
  return(ev_sims)
}

compute_quadrat_counts <- function(pp) {
  counts <- quadratcount(pp, tess = pop_areas)
  return(as.numeric(counts))
}

# real_counts <- compute_quadrat_counts(ev_ppp)
real_counts <- compute_quadrat_counts(ev_points)
Warning in quadratcount.ppp(pp, tess = pop_areas): Tessellation does not
contain all the points of X
# Run Monte Carlo simulations
mc_sims <- 999
full_sims_list <- gen_sims_ppp(num_sims = mc_sims)

# Compute quadrat counts for each simulation
full_sim_area_counts <- lapply(
  X = full_sims_list,
  FUN = compute_quadrat_counts
)

# Convert to tibble
full_count_df <- full_sim_area_counts |> 
  do.call(rbind, args = _) |>
  as_tibble()
Warning: The `x` argument of `as_tibble.matrix()` must have unique column names if
`.name_repair` is omitted as of tibble 2.0.0.
ℹ Using compatibility `.name_repair`.
# Assign region names
colnames(full_count_df) <- region_labels

# Preview the simulated counts
full_count_df |> head()
Low Medium High
166670 35 50040
166258 26 50461
166251 24 50470
166219 30 50496
166052 27 50666
165698 42 51005

For Mean Income:

In [22]:
gen_sims_inc <- function(num_sims) {
  sim_list <- spatstat.random::rpoint(
    # n = nrow(zip_centroids),
    n = ev_points$n,
    f = inc_int_w,  # income intensity
    nsim = num_sims
  )
  return(sim_list)
}

compute_inc_quadrat_counts <- function(pp) {
  counts <- quadratcount(pp, tess = inc_areas)
  as.numeric(counts)
}

# run simulations
mc_sims_inc <- 999
full_sims_inc_list <- gen_sims_inc(mc_sims_inc)

# convert to df
full_inc_sim_counts <- lapply(full_sims_inc_list, compute_inc_quadrat_counts)
full_inc_df <- full_inc_sim_counts |> do.call(rbind, args = _) |> as_tibble()
colnames(full_inc_df) <- region_labels

head(full_inc_df)
Low Medium High
97992 50420 68333
97921 50638 68186
97794 50907 68044
97909 50483 68353
97926 50341 68478
98093 50864 67788

Plotting Test Statistic Values

In [23]:
# Add names to real observed counts
real_counts_named <- setNames(real_counts, region_labels)

# Convert to tibble row
obs_df <- tibble::as_tibble_row(real_counts_named)

# Combine simulated counts + observed row
mc_df <- bind_rows(full_count_df, obs_df)

# Density plot for High region
ggplot(full_count_df, aes(x = High)) +
  geom_density(fill = "#56B4E9", alpha = 0.5) +
  geom_vline(
    xintercept = obs_df$High,
    linetype = "dashed",
    color = "#E69F00"
  ) +
  theme_classic() +
  labs(
    title = "Monte Carlo vs Observed EV Count in High-Population Region",
    x = "Simulated EV Counts (High Region)",
    y = "Density"
  )

In [24]:
more_extreme_df <- mc_df[mc_df$High >= real_counts_named["High"], ]

prop_more_extreme <- nrow(more_extreme_df) / nrow(mc_df)
print("p-value:")
[1] "p-value:"
prop_more_extreme
[1] 0.001
In [25]:
# EV counts inside income regions
# real_inc_counts <- quadratcount(ev_ppp, tess = inc_areas)
# real_inc_counts <- as.numeric(real_inc_counts)
real_inc_counts <- compute_inc_quadrat_counts(ev_points)
Warning in quadratcount.ppp(pp, tess = inc_areas): Tessellation does not
contain all the points of X
# name regions
real_inc_counts_named <- setNames(real_inc_counts, region_labels)

# convert observed to row tibble
obs_inc_df <- tibble::as_tibble_row(real_inc_counts_named)

# merge simulated + observed
mc_inc_df <- bind_rows(full_inc_df, obs_inc_df)

# plot High region
ggplot(full_inc_df, aes(x = High)) +
  geom_density(fill = "#56B4E9", alpha = 0.5) +
  geom_vline(
    xintercept = obs_inc_df$High,
    linetype = "dashed",
    color = "#E69F00"
  ) +
  theme_classic() +
  labs(
    title = "Monte Carlo vs Observed EV Count in High-Income Region",
    x = "Simulated EV Counts (High Income Region)",
    y = "Density"
  )

In [26]:
more_extreme_inc_df <- mc_inc_df[mc_inc_df$High <= real_inc_counts_named["High"], ]
prop_more_extreme_inc <- nrow(more_extreme_inc_df) / nrow(mc_inc_df)
print("p-value:")
[1] "p-value:"
prop_more_extreme_inc
[1] 0.001

Comparing the observed EV intensity surface with the simulation envelopes revealed that EV concentrations in high-income areas exceeded the 95% Monte Carlo envelope. In contrast, the observed EV distribution was largely consistent with the population-weighted null model, suggesting that population density alone does not fully explain EV spatial patterns. These results jointly suggest that income exerts a stronger influence on EV adoption than population density, and that EV locations exhibit meaningful clustering behavior at local scales.

Conclusion

Hypothesis Examined: EV ownership is spatially clustered and higher near high-income neighborhoods in the LA metropolitan area, beyond what would be expected under population-weighted randomness.

This project investigated the spatial distribution of EV ownership using exploratory visualizations, intensity estimation, regression analysis, and Monte Carlo hypothesis testing. The results consistently show that EVs are spatially clustered and disproportionately concentrated in wealthy neighborhoods. Population density explains part of the spatial structure, but income explains significantly more, with observed patterns falling outside the 95% envelopes of the income-weighted null model. These findings support the hypothesis that socio-economic factors—particularly household income—play a central role in shaping the spatial adoption of electric vehicles.

Next Steps…

While the analysis provides strong evidence that EV ownership is influenced by income-driven first-order intensity and local clustering, several extensions would strengthen and refine these conclusions.

First, improving the underlying dataset would allow for a more robust assessment—particularly by incorporating more precise EV registration counts, ZIP-level household characteristics, or updated measures of charging infrastructure availability. Many ZIP codes contain incomplete EV information, so targeted data collection or integration with more accurate administrative records would reduce uncertainty in the intensity estimation.

Second, incorporating additional covariates such as housing type, percentage of single-family homes, and proximity to public chargers would help disentangle whether income effects are direct or mediated through built-environment factors.

Third, repeating the analysis across multiple years would allow for a spatio-temporal view of EV adoption, enabling tests of how clustering evolves as diffusion accelerates.

Together, these steps would help validate the current findings and support a more comprehensive understanding of how and why EV adoption clusters spatially.

Hsu, Chih-Wei, and Kevin Fingerman. 2021. “Public Electric Vehicle Charger Access Disparities Across Race and Income in California.” Transport Policy 100 (January): 59–67. https://doi.org/10.1016/j.tranpol.2020.10.003.
Liu, Xiaoli, Matthew C. Roberts, and Ramteen Sioshansi. 2017. “Spatial Effects on Hybrid Electric Vehicle Adoption.” Transportation Research Part D: Transport and Environment 52 (May): 85–97. https://doi.org/10.1016/j.trd.2017.02.014.
Slowik, Peter, and Nic Lutsey. 2017. “Expanding the Electric Vehicle Market in u.s. Cities.” International Council on Clean Transportation (ICCT). https://theicct.org/wp-content/uploads/2021/06/US-Cities-EVs_ICCT-White-Paper_25072017_vF.pdf.