Geography of Electric Vehicle Charging Stations in North Carolina

Using Moran’s I to understand clusters at County Level

Rajesh Sigdel

2021-06-02


Introduction

Electric vehicles are considered as one of the important solutions to the global climate change as it does not have any tailpipe to emit carbon dioxide. Many companies have started to manufacture EV vehicles in mass and they have also installed charging stations throughout the country.

In this project, I wanted to examine the geography of charging stations of electric vehicles in North Carolina.

Question/Problem Statement

• Is there any significant spatial autocorrelation in the distribution of electric vehicles charging stations in North Carolina State?

Dashboard

Click here to see the dashboard of the data set that was created using ArcGIS online.

Methods:

First, the point data (latitude/longitude) of charging stations are aggregated based on county level. For example, if there is one charging stations within the polygon of a county, then the value of that county will be 1, and if there are two charging stations, then the value of that county would be two and so on.

The spatial autocorrelation is calculated by using Global Moran’s I index.

One key thing to note is that the Moran’s I index (or simply I ) is a global spatial autocorrelation index, it does not tell us where the cluster is. Local Indicator of Spatial Autocorrelation tells us if there is any clustering in the local level. For the scope of this class project, I will limit my finding upto to global index. Calculating I is both similar and dissimilar to time series autocorrelation that we learned in the class.

In time series, the values are repeated (or influenced) by the previous values, whereas the values are influenced by its neighbor values in spatial autocorrelation.

Formula:

where zi is the deviation from its means, and wij is the spatial weight between feature j and feature j. SO refers to the aggregate of the all the spatial weight and is given by:



Dataset

The data was downloaded on March 9, 2021 from Alternative Fuels Data Center.

Excel file containing data with geographic attributes (latitude and longitude of points data)

Exploratory data analysis

setwd("D:/Spring_2021/STA 662/Project")

library(readr)
electric <- read_csv("data.csv")

# View(electric)

let’s count the number of electric vehilces in North Carolina

library (tidyverse)
## -- Attaching packages --------------------------------------------------------------------------------------------------- tidyverse 1.3.0 --
## v ggplot2 3.3.2     v dplyr   1.0.2
## v tibble  3.0.3     v stringr 1.4.0
## v tidyr   1.1.2     v forcats 0.5.0
## v purrr   0.3.4
## -- Conflicts ------------------------------------------------------------------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
electric %>% 
  count()
## # A tibble: 1 x 1
##       n
##   <int>
## 1   849

There are 849 total charging stations in the State of North Carolina.

electric %>% 
  count (`EV Connector Types`)
## # A tibble: 12 x 2
##    `EV Connector Types`         n
##    <chr>                    <int>
##  1 CHADEMO                      2
##  2 CHADEMO J1772               20
##  3 CHADEMO J1772 J1772COMBO     3
##  4 CHADEMO J1772COMBO          42
##  5 J1772                      628
##  6 J1772 J1772COMBO             2
##  7 J1772 NEMA515                7
##  8 J1772 NEMA520                2
##  9 J1772 TESLA                 64
## 10 J1772COMBO                  10
## 11 NEMA1450                     1
## 12 TESLA                       68

Map

library(leaflet)
## Warning: package 'leaflet' was built under R version 4.0.3
m <- leaflet() %>% 
  addTiles() %>% 
  addMarkers( data = electric, lng = ~Longitude, lat = ~Latitude, 
              popup = ~ `Station Name` )
m



If you look closely, the points that are plotted on the map does not show any spatial pattern. However, when zoom closely, it reveals that the large cities such as Charlotte or Raleigh has more electric vehicles charging stations compared to the other cities.

Note When converted from HTML to pdf, the points looks random. I had to first export the file in HTML because the map package can only render in HTML file. In HMTL, you can zoom in and see the spatial clusterin

Null Hypothesis: The data (charging stations) are randomly distributed.
Alternative Hypothesis: The data are not randomly distributed

First, I calculated the Moran’s I index using ArcPy package in ArcGIS. The index is similar to calculation of r in time series. Then I calculated whether the Moran’s I index is statistically significant or not. Moran’s I index follows Z distribution.

The formula to calculate z score using Morans I index is provided in the method section


Result

A snippet of the result of the result from python’s ArcPy package is as follows:


As we see from the image that the Morans I index was 0.129 and the z score of the Index was 2.38. Using Z distribution table, we we get the P value of 0.01. The result showed that there is less than 5% likelihood that this clustered pattern could be the result of the random choice.



Discussion

Based on our analysis, the electric vehicle charging stations in county level are clustered in North Carolina. However, this spatial clustering do not tell us where the cluster is. Local Morans I for spatial Autocorrelation (LISA) developed by Anselin (1995) is a good tool to find the local clusters.