Chicago’s tallest buildings by ward
I grew up in a residential neighborhood in Chicago. I recently heard someone referring to themselves as living on the 9th floor of a building in that neighborhood, and I couldn’t remember any building that height in the old neighborhood.
It got me thinking how to find the tallest building in the neighborhood. As Chicago neighborhoods are sort of vaguely defined, I figured I’d try and determine the tallest building in each of the 50 wards of the cities. Wards are easier to work with, as they are specifically defined for voting purposes. They get reconfigured often, but at any given time, each ward is well defined.
The Chicago Open Data portal is ideal for this sort of exercise. I was able to obtain two types of data from the portal
1. A listing of building with their longitude and latitudes as well as their height in stories
2. A shapefile of ward boundaries. With this, I can determine into which ward any building falls.
So then the problem breaks down to basically assigning each building to a ward, ranking buildings by height within ward and plotting the results. The R code that follows will use R’s GIS capabilities to so
library(ggplot2)
library(dplyr)
library(rgdal)
library(rgeos)
wards<-readOGR(dsn=”.”,layer=”Wards”)
bldgs<-read.csv(“buildings.csv”)
bldgs_df<-data.frame(bldgs)
coordinates(bldgs_df)<-c(“X_COORD”,”Y_COORD”)
proj4string(bldgs_df) <- proj4string(wards)
bldgs_df$ward <- over(bldgs_df, wards)$WARD
grp_bldgs<-data.frame(bldgs_df)
grp_bldgs<-group_by(grp_bldgs,ward)
maxbldgs<-summarize(grp_bldgs,maxht=max(STORIES))
maxbldgs$wardnum<-as.numeric(as.character(maxbldgs$ward))
library(Cairo)
Cairo(1000, 1000, file=”maxhtbarlg1.png”, type=”png”, bg=”white”)
ggplot(maxbldgs,aes(x=wardnum,y=maxht)) + geom_bar(stat=’identity’)
dev.off()
EDIT: Some of the data from the portal seems to be incorrect. As an example, in my 32nd ward, the two tallest buildings listed as 35 and 21 stories, respectively, are in fact 3 story buildings. In fact, the tallest building in the ward is the one correctly listed as 16 stories. A quick listing and informal review of the tallest buildings by ward reveals that this may be an isolated problem, but this indicates there are at least some issues.
This is a good reminder that any analysis is only as good as its data and that results should always be verified.