9
New Yorkers consume more energy inside than Americans on average. In New York around 75% of the greenhouse gas emissions come from activities such as lighting, heating, cooling and appliances, while on a national level that figure is 39%. NEW YORK CITY’S ELECTRICITY CONSUMPTION 2010 Source: http://www.nycedc.com/blog-entry/energy-consumption-new-york-city

Data visualization of NYC's electricity consumption in 2010 per building type

Embed Size (px)

DESCRIPTION

A data visualization of New York City's electricity consumption per building type in 2010.

Citation preview

Page 1: Data visualization of NYC's electricity consumption in 2010 per building type

New Yorkers consume more energy inside than Americans on average. In New York around 75% of the greenhouse gas emissions come from activities such as lighting, heating, cooling and appliances, while on a national level that figure is 39%.

NEW YORK CITY’SELECTRICITY CONSUMPTION 2010

Source: http://www.nycedc.com/blog-entry/energy-consumption-new-york-city

Page 2: Data visualization of NYC's electricity consumption in 2010 per building type

We take a closer look on New York City’s electricity consumption to figure out what is actually happening within NYC buildings.

Page 3: Data visualization of NYC's electricity consumption in 2010 per building type

Commercial buildings use 55% of the city’s entire electricity consumption

Institutional buildings consume

12%

Large residential buildings consume

7%

Small residential buildings consume

26%

Data source: NYC Open Data (www.nyc.gov). Data visualization by Marija Drobnjak and Lise White, Dec. 2013

high

low

ELECTRICITY CONSUMPTION IN NEW YORK CITY 2010

Page 4: Data visualization of NYC's electricity consumption in 2010 per building type

high

low

LARGE RESIDENTIAL BUILDINGS ELECTRICITY CONSUMPTION

Max consumption per year = 100 million kWh per zip code area

The areas with highest large residential consumption are predominately zip codes containing public housing

Large residential buildings use 7 % of New York City’s entire electricity consumption

Data source: NYC Open Data (www.nyc.gov). Data visualization by Marija Drobnjak and Lise White, Dec. 2013

Page 5: Data visualization of NYC's electricity consumption in 2010 per building type

high

low

INSTITUTIONAL BUILDINGS ELECTRICITY CONSUMPTION

Max consumption per year = 467 million kWh per zip code area

South Ozone park has the highest consumption within institutional buildings, here lies JFK Airport

Institutional buildings use 12 % of New York City’s entire electricity consumption

Data source: NYC Open Data (www.nyc.gov). Data visualization by Marija Drobnjak and Lise White, Dec. 2013

Page 6: Data visualization of NYC's electricity consumption in 2010 per building type

high

low

SMALL RESIDENTIAL BUILDINGS ELECTRICITY CONSUMPTION

Max consumption per year = 224 million kWh per zip code area

Staten Island and The Upper East and Upper West Side have the highest small residential energy consumption

Staten Island has 2.7 people per household where Manhattan has 1.7

Small residential buildings use 26 % of New York City’s entire electricity consumption

Data source: NYC Open Data (www.nyc.gov). Data visualization by Marija Drobnjak and Lise White, Dec. 2013

Page 7: Data visualization of NYC's electricity consumption in 2010 per building type

high

low

COMMERCIAL BUILDINGS ELECTRICITY CONSUMPTION

Max consumption per year = 1.4 billion kWh per zip code area

4 zip codes between 42nd and 57th street use 20 % of the total commercial consumption. They range between 1.2 and 1.4 billion kWh use

Commercial buildings use 55 % of New York City’s entire electricity consumption

Data source: NYC Open Data (www.nyc.gov). Data visualization by Marija Drobnjak and Lise White, Dec. 2013

Page 8: Data visualization of NYC's electricity consumption in 2010 per building type

The City of New York has recently released a report benchmarking commercial building consumption in NYC. This is the first time a city in the nation releases private sector building data. The objective is to make the general public aware of the current consumption patterns and thereby stimulate an interest in changing these.

Our data analysis fully supports the city’s initiative. We therefore hope our data visualization can function as a supporting tool to encourage change. Source: http://www.nyc.gov/html/gbee/html/plan/ll84_scores.shtml

Page 9: Data visualization of NYC's electricity consumption in 2010 per building type

require(ggplot2)# shape file, download from: http://www.census.gov/cgi-bin/geo/shapefiles2010/mainshape_fp <- " xx "shape_fn <- "tl_2010_36_zcta510.shp"

electricity_fp <- " xx "electricity_fn <- "Electric_Consumption.csv"

library(ggplot2)library(maptools)library(rgdal)library(rgeos)

setwd(shape_fp)ogrListLayers(shape_fn)nyc_shp <- readOGR(shape_fn, layer="tl_2010_36_zcta510")nycs <- fortify(nyc_shp, region= "ZCTA5CE10")

setwd(electricity_fp)electric <- read.csv(electricity_fn, header=TRUE)

electric$loc1 <- regexpr("\n", as.character(electric$Zip.Code)) electric$loc2 <- regexpr(",", as.character(electric$Zip.Code)) electric$loc3 <- regexpr("-", as.character(electric$Zip.Code)) electric$loc4 <- regexpr(")", as.character(electric$Zip.Code))

electric$Zip <- substr(as.character(electric$Zip.Code), 1, 5)electric$Lat <- as.numeric(substr(as.character(electric$Zip.Code), electric$loc1 + 2, electric$loc2 - 1))electric$Long <- as.numeric(substr(as.character(electric$Zip.Code), electric$loc3, electric$loc4 - 1))

electric$loc1 <- NULLelectric$loc2 <- NULLelectric$loc3 <- NULLelectric$loc4 <- NULL

electric$Building.type..service.class. <- gsub('Small residential', 'Small Residential', electric$Building.type..service.class.)electric$Building.type..service.class. <- as.factor(electric$Building.type..service.class.)electric$kwdecN <- as.numeric(cut(electric$Consumption..kWh.,quantile(electric$Consumption..kWh.,(0:10)/10),include.lowest=TRUE,lable=TRUE))

summary(electric)attach(electric)elec.summ <- aggregate(electric, by=list(Zip, Building.type..service.class.), FUN = mean, na.rm=TRUE)

elec.summ.largeres <- elec.summ[elec.summ$Group.2=="Large Residential",]elec.summ.largeres$id <- elec.summ.largeres$Group.1elec.summ.largeres$Group.1 <- NULLhead(elec.summ.largeres)summary(elec.summ.largeres)

head(nycs)head(elec.summ.largeres)formap <- merge(nycs, elec.summ.largeres, by="id", all.x = TRUE)head(formap)summary(formap)nrow(nycs)nrow(formap)formap <- formap[order(formap$order), ]rm(nycs)

ggplot(formap, aes(x = long, y = lat, group=group)) +geom_polygon(aes(fill= kwdecN), color="grey") +coord_cartesian(xlim=c(-74.3, -73.7), ylim=c(40.41, 40.92)) +theme(plot.background = element_rect(fill='black', colour='black')) +theme(panel.background = element_rect(fill="black")) +theme(line = element_blank()) + theme(text = element_blank()) + theme(title = element_blank()) + labs(x=NULL, y=NULL) + scale_x_continuous(expand=c(0,0)) + scale_fill_gradientn(colours = c("yellow" , "red")) table(cut(electric$Consumption..kWh.,quantile(electric$Consumption..kWh.,(0:10)/10),include.lowest=TRUE,lable=TRUE)) getwd()

ggsave("elec.svg", width = 7, height = 7)ggsave("elec.png", width= 7, height=7)