We will study the potential of using domestic and commerical rooftop area in the city of Sheffield to install Photovoltaic generators.
Shef.Land <- as_tibble(read.csv("https://raw.githubusercontent.com/JMawyin/MSDS2019-607/master/SheffieldAreaStats.csv"))
The breakdown below shows the breakdown of surface area in Sheffield based on different types.
colnames(Shef.Land)
## [1] "LA.Code" "District"
## [3] "LSOA" "LSOA.Name"
## [5] "Total.Area.of.All.Land.Types" "Area.of.Domestic.Buildings"
## [7] "Area.of.Non.Domestic.Buildings" "Area.of.Road"
## [9] "Area.of.Path" "Area.of.Rail"
## [11] "Area.of.Domestic.Gardens" "Area.of.Greenspace"
## [13] "Area.of.Water" "Area.of.Other.Land.Uses"
## [15] "Area.of.Unclassified.Land" "Area.of.Admin.Geography"
## [17] "Quality.of.Fit.Indicator"
The dataset has an area breakdown below the District level of interest for us. First, we need to add up all the per District components and focus on the Total Distric Area, Total Domestic Area and Total Commercial Area. (Area in thousands of square meters)
##Using data.table to aggregate
require(data.table)
## Loading required package: data.table
##
## Attaching package: 'data.table'
## The following objects are masked from 'package:dplyr':
##
## between, first, last
DT <- data.table(Shef.Land)
District.Sums <- DT[ , .(Total.Area = sum(Total.Area.of.All.Land.Types), T.Area.Domestic = sum(Area.of.Domestic.Buildings),T.Area.Non.Domestic = sum(Area.of.Non.Domestic.Buildings)), by = .(District)]
District.Sums
Then we will use a simple estimate to calculate the generation potential per district and per location.
#Roof Percentage Suitable for PV
N.Domestic.PV.Suitable.PC <- .60
Domestic.PV.Suitable.PC <- .22
#Generation capacity of one thousand square meters of PV in kilowatts
T.SM.Generation <- 150
District.Sums <- mutate(District.Sums, PV.Capacity.Domestic.KW = round((T.Area.Domestic*Domestic.PV.Suitable.PC*T.SM.Generation),2), PV.Capacity.Non.Domestic.KW = round((T.Area.Non.Domestic*N.Domestic.PV.Suitable.PC*T.SM.Generation),2))
District.Sums
Ordering Data Frame “District.Sums” by descending values of the column “PV.Capacity.Non.Domestic.KW”
District.Sums <- arrange(District.Sums, desc(PV.Capacity.Non.Domestic.KW))
What are the Residential, Comercial and Photovoltaic generation statistics of the City of Sheffield?
Shef.Area.Stats <- colSums(District.Sums[,2:6])
Shef.Area.Stats
## Total.Area T.Area.Domestic
## 371262.29 12673.53
## T.Area.Non.Domestic PV.Capacity.Domestic.KW
## 7457.84 418226.49
## PV.Capacity.Non.Domestic.KW
## 671205.60
#colnames(Shef.Area.Stats) <- c("Total Area", "Residential Area", "Commercial Area", "PV Potential Domestic", "PV Potential Commercial")
What is the PV Generation Potential in KiloWatts of the different areas in the City of Sheffield.
dfm <- melt(District.Sums[,c('District','PV.Capacity.Domestic.KW','PV.Capacity.Non.Domestic.KW')],id.vars = 1)
#reorder(,-value) orders the bars from high to low.
ggplot(dfm,aes(x = reorder(District, -value),y = value)) +
geom_bar(aes(fill = variable),stat = "identity",position = "dodge") + theme(axis.text.x = element_text(angle = 90))+ ylab("Generation Potential in KW") + xlab("City of Sheffield Districts")
We have shown a way to calculate the PV generation potential of the different districs in Sheffield.