Alexander Kuznetsov
07/12/2018
Power plant data can be downloaded from World Resources Institute website (1). Original dataset was preprocessed to extract data relevant to United States and power plants generating electricity from coal, gas, hydro, nuclear, oil, solar and wind sources.
Added capacity in megawatts of power is plotted against year of plant commissioning. The chart is interactive, which allows selecting energy source categories of interest. User can zoom in on particular area of the chart related to specific time period. Some interesting trends in added capacity of power plants over the years can be observed with respect to the source of energy. Following R code can be used to reproduce the charts below.
library(knitr)
library(plotly)
powerplants <- unzip("globalpowerplantdatabasev110.zip", exdir=getwd())
pp <- read.csv(list.files()[1])
ppa <- pp[, c(1,2,3,5,8,12)]
ppU <- ppa[grep("USA", ppa$country),]
ppU1 <- aggregate(capacity_mw~commissioning_year+fuel1, data=ppU, sum)
ppu2 <- ppU1[grep("Coal|Gas|Hydro|Nuclear|Oil|Solar|Wind", ppU1$fuel1),]
plot_ly(ppu2, x=~round(commissioning_year), y=~capacity_mw, color=~fuel1, type="bar") %>%
layout(title="Added Power Generation Capacity", xaxis=list(title="Year"), yaxis=list(title="Added Power Generation Capacity (MW)"))
ppu4 <- aggregate(capacity_mw~fuel1, data=ppU1, sum)
ppu4 <- data.frame(ppu4, stringsAsFactors=FALSE)
ppu4$fuel1 <- factor(ppu4$fuel1, levels=unique(ppu4$fuel1)[order(ppu4$capacity_mw, decreasing=TRUE)])
plot_ly(ppu4, x=~fuel1, y=~capacity_mw, type="bar")%>%
layout(title="Total Added Power Generation Capacity", xaxis=list(title="Source of Energy"), yaxis=list(title="Added Power Generation Capacity (MW)"))