President Joe Biden signed an Executive Order setting a target that 50% of all vehicles sold in the US will be net-zero emitters of greenhouse gases by 2030. I would like to use the historical data of electric vehicle charing stations to develop a view of what might be like in 15 years.
The data source is from USAFACTS.
## Installing package into 'C:/Users/linwe/Documents/R/win-library/4.1'
## (as 'lib' is unspecified)
## Installing package into 'C:/Users/linwe/Documents/R/win-library/4.1'
## (as 'lib' is unspecified)
## Installing package into 'C:/Users/linwe/Documents/R/win-library/4.1'
## (as 'lib' is unspecified)
## Installing package into 'C:/Users/linwe/Documents/R/win-library/4.1'
## (as 'lib' is unspecified)
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
## -- Attaching packages ---------------------------------------------- fpp2 2.4 --
## v ggplot2 3.4.0 v expsmooth 2.3
## v fma 2.4
##
## Registered S3 methods overwritten by 'ggfortify':
## method from
## autoplot.Arima forecast
## autoplot.acf forecast
## autoplot.ar forecast
## autoplot.bats forecast
## autoplot.decomposed.ts forecast
## autoplot.ets forecast
## autoplot.forecast forecast
## autoplot.stl forecast
## autoplot.ts forecast
## fitted.ar forecast
## fortify.ts forecast
## residuals.ar forecast
## Loading required package: timechange
##
## Attaching package: 'lubridate'
## The following objects are masked from 'package:base':
##
## date, intersect, setdiff, union
EV <- read.csv("data-6g4YP.csv")
EV
str(EV)
## 'data.frame': 12 obs. of 3 variables:
## $ ï..Year : int 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 ...
## $ Charging.Ports : chr " 5,070.00 " " 14,982.00 " " 19,472.00 " " 25,602.00 " ...
## $ Station.Locations: chr " 2,100.00 " " 6,200.00 " " 8,100.00 " " 10,712.00 " ...
EV$Charging.Ports <- gsub(",", "", EV$Charging.Ports)
EV$Station.Locations <- gsub(",", "", EV$Station.Locations)
EV$Charging.Ports <- as.numeric(as.character(EV$Charging.Ports))
EV$Station.Locations <- as.numeric(as.character(EV$Station.Locations))
EV$ï..Year <- year(as.Date(as.character(EV$ï..Year),
format = "%Y"))
ts <- ts(data = EV$Station.Locations, start = c(2011), frequency = 1)
str(ts)
## Time-Series [1:12] from 2011 to 2022: 2100 6200 8100 10712 13696 ...
head(ts)
## Time Series:
## Start = 2011
## End = 2016
## Frequency = 1
## [1] 2100 6200 8100 10712 13696 17723
ts
## Time Series:
## Start = 2011
## End = 2022
## Frequency = 1
## [1] 2100 6200 8100 10712 13696 17723 19792 22826 26959 31738 50054 56256
sum(is.na(ts))
## [1] 0
summary(ts)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 2100 10059 18758 22180 28154 56256
plot(ts)
ARIMA stands for Autoregressive Integrated Moving Average. It is a combination of the Autoregressive (AR) and Moving Average (MR) model. The AR model forecast corresponds to a linear combination of past values of the variable. The moving average model forecast corresponds to a linear combination of past forecast errors. The “I” represents the data values that are replaced by the difference between their values and the previous values.
mymodel <- auto.arima(ts)
mymodel
## Series: ts
## ARIMA(0,1,0) with drift
##
## Coefficients:
## drift
## 4923.273
## s.e. 1327.049
##
## sigma^2 = 21308589: log likelihood = -107.89
## AIC=219.79 AICc=221.29 BIC=220.58
plot.ts(mymodel$residuals)
myforecast <- forecast(mymodel, level=c(80), h=10)
plot(myforecast)
There are currently more than 56000 EV charing stations with about 148000 charging ports across the country. From the model, the US would need to significantly increase installations rates over the next 10 years to support the anticipated number of EVs on the road. As a investor, I would keep an eye on the asset related to EV and asscoiated accessories as a potential investment area.