•  

HomeKey Stats Bristol

Line 11: Line 11:
 
|-
 
|-
 
|}
 
|}
 +
 +
 +
<R output="display" iframe="width:400px;height:400px">
 +
pdf(rpdf, width=5, height=5)
 +
library(ggplot2)
 +
consumption.data <- data.frame(Year = c(2009,2010,2011,2012,2013),
 +
                              DomesticConsumption = c(718754856.9, 718735925.8,
 +
                                                      718586755.1, 715382012,
 +
                                                      709352993.9),
 +
                              DomesticMPANs = c(189391, 191066, 192449,
 +
                                                193322, 194083),
 +
                              NonDomesticConsumption = c(1176217057,
 +
                                                          1202799481,
 +
                                                          1185903139,
 +
                                                          1135575674,
 +
                                                          1152307023),
 +
                              NonDomesticMPANs = c(17500, 17444, 17350, 17552,
 +
                                                    17590))
 +
consumption.data$Domestic <- consumption.data$DomesticConsumption/consumption.data$DomesticMPANs
 +
consumption.data$NonDomestic <- consumption.data$NonDomesticConsumption/consumption.data$NonDomesticMPANs
 +
consumption.data <- consumption.data[,c(1,6,7)]
 +
ggplot(data=consumption.data, aes(x=Year, y=Domestic)) +
 +
  geom_bar(stat="identity", fill="#4D4D4D") +
 +
  theme_bw() +
 +
  theme(panel.border = element_blank(), axis.line = element_line()) +
 +
  theme(plot.title = element_text(vjust = 2)) +
 +
  scale_y_continuous(expand = c(0,0)) +
 +
  xlab("Year") + ylab("Average consumption (kWh)")+
 +
  ggtitle("Average domestic electricity consumption\nper customer in Bristol")
 +
</R>
 +
 +
<R output="display" iframe="width:400px;height:400px">
 +
pdf(rpdf, width=5, height=5)
 +
library(ggplot2)
 +
consumption.data <- data.frame(Year = c(2009,2010,2011,2012,2013),
 +
                              DomesticConsumption = c(718754856.9, 718735925.8,
 +
                                                      718586755.1, 715382012,
 +
                                                      709352993.9),
 +
                              DomesticMPANs = c(189391, 191066, 192449,
 +
                                                193322, 194083),
 +
                              NonDomesticConsumption = c(1176217057,
 +
                                                          1202799481,
 +
                                                          1185903139,
 +
                                                          1135575674,
 +
                                                          1152307023),
 +
                              NonDomesticMPANs = c(17500, 17444, 17350, 17552,
 +
                                                    17590))
 +
consumption.data$Domestic <- consumption.data$DomesticConsumption/consumption.data$DomesticMPANs
 +
consumption.data$NonDomestic <- consumption.data$NonDomesticConsumption/consumption.data$NonDomesticMPANs
 +
consumption.data <- consumption.data[,c(1,6,7)]
 +
ggplot(data=consumption.data, aes(x=Year, y=NonDomestic)) +
 +
  geom_bar(stat="identity", fill="#4D4D4D") +
 +
  theme_bw() +
 +
  theme(panel.border = element_blank(), axis.line = element_line()) +
 +
  theme(plot.title = element_text(vjust = 2)) +
 +
  scale_y_continuous(expand = c(0,0)) +
 +
  xlab("Year") + ylab("Average consumption (kWh)")+
 +
  ggtitle("Average non-domestic electricity consumption\nper customer in Bristol")
 +
</R>

Revision as of 11:04, 11 August 2015

Key stats about Bristol

2011 census Mid 2013 estimated
Population 428,100 437,500
Households 182,747 186,760


REngine.php: 
in

pdf(rpdf, width=5, height=5) library(ggplot2) consumption.data <- data.frame(Year = c(2009,2010,2011,2012,2013),

                              DomesticConsumption = c(718754856.9, 718735925.8,
                                                      718586755.1, 715382012,
                                                      709352993.9),
                              DomesticMPANs = c(189391, 191066, 192449,
                                                193322, 194083),
                              NonDomesticConsumption = c(1176217057,
                                                         1202799481,
                                                         1185903139,
                                                         1135575674,
                                                         1152307023),
                              NonDomesticMPANs = c(17500, 17444, 17350, 17552,
                                                   17590))

consumption.data$Domestic <- consumption.data$DomesticConsumption/consumption.data$DomesticMPANs consumption.data$NonDomestic <- consumption.data$NonDomesticConsumption/consumption.data$NonDomesticMPANs consumption.data <- consumption.data[,c(1,6,7)] ggplot(data=consumption.data, aes(x=Year, y=Domestic)) +

 geom_bar(stat="identity", fill="#4D4D4D") +
 theme_bw() + 
 theme(panel.border = element_blank(), axis.line = element_line()) +
 theme(plot.title = element_text(vjust = 2)) +
 scale_y_continuous(expand = c(0,0)) + 
 xlab("Year") + ylab("Average consumption (kWh)")+
 ggtitle("Average domestic electricity consumption\nper customer in Bristol")
REngine.php: 
in

pdf(rpdf, width=5, height=5) library(ggplot2) consumption.data <- data.frame(Year = c(2009,2010,2011,2012,2013),

                              DomesticConsumption = c(718754856.9, 718735925.8,
                                                      718586755.1, 715382012,
                                                      709352993.9),
                              DomesticMPANs = c(189391, 191066, 192449,
                                                193322, 194083),
                              NonDomesticConsumption = c(1176217057,
                                                         1202799481,
                                                         1185903139,
                                                         1135575674,
                                                         1152307023),
                              NonDomesticMPANs = c(17500, 17444, 17350, 17552,
                                                   17590))

consumption.data$Domestic <- consumption.data$DomesticConsumption/consumption.data$DomesticMPANs consumption.data$NonDomestic <- consumption.data$NonDomesticConsumption/consumption.data$NonDomesticMPANs consumption.data <- consumption.data[,c(1,6,7)] ggplot(data=consumption.data, aes(x=Year, y=NonDomestic)) +

 geom_bar(stat="identity", fill="#4D4D4D") +
 theme_bw() + 
 theme(panel.border = element_blank(), axis.line = element_line()) +
 theme(plot.title = element_text(vjust = 2)) +
 scale_y_continuous(expand = c(0,0)) + 
 xlab("Year") + ylab("Average consumption (kWh)")+
 ggtitle("Average non-domestic electricity consumption\nper customer in Bristol")
 
OFFICIAL SUPPLIER