Thursday, 20 August 2015

Manhattan Building Heights

As part of work to stress test the implementation of d3.js in the plugin, the MapPluto tax lot database from the Department of City Planning City of New York with almost 43000 records seems like a good choice. As the data details building footprints it would be unwise to use the simplification methods built into the d3 (or any simplification method), so this should result in a large topojson file. The database merges land use and geographic data with features from the Digital Tax Map. The metadata is also excellent, so you aren't wondering what each attribute is supposed to represent.

Although some attributes are incomplete the number of floors is recorded for all features. To visualise the height of the buildings it should be possible to use the number of floors from the dataset and apply some logic to figure out building height. Coupled with the building use classification it is possible to use the Council on Tall Buildings and Urban habitat guidelines for calculating building height. A bit of head scratching and flicking through the MapPluto metadata resulted in a SQL fragment for use in the QGIS Field Calculator:

CASE WHEN substr(coalesce("BldgClass", 'X'), 0, 1) = 'O' THEN 
 (3.9 * toint("NumFloors")) + 11.7 + (3.9 * (toint( "NumFloors") / 20))
WHEN substr(coalesce("BldgClass", 'X'), 0, 1) IN ('A', 'B', 'C', 'D') THEN
 (3.1 * toint("NumFloors")) + 7.75 + (1.55 * (toint( "NumFloors") / 30))
 (3.5 * toint("NumFloors")) + 9.625 + (2.625 * (toint( "NumFloors") / 25))

Although this algorithm seemed the most accurate when comparing a randomly selected set of buildings with the online records, it is not perfect. There is no way of knowing the height of the building's spire, which accounts for quite a large proportion of the tallest buildings. In the end I manually "fixed up" the six buildings I knew were actually over 300m (because I wanted to highlight them), but this leaves me feeling somewhat dirty.

For the classification by building height, natural breaks in a graduated scheme was used, whilst the penultimate class boundary was overridden at 300 meters, and a gothic colour scheme with a highlight of red for the tallest buildings. For the background, the New York City Coastal Boundary and a United States Census TIGER/Line Shapefile for New Jersey work well.

Manhattan building heights in metres. Pan and zoom around the map, click on a polygon to view the details of the building.

After exporting via the plugin choosing options for a legend and information popup, a quick change is all that is needed to the tooltip template before the results are published online.