{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Building heights by distance from a point" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "by Chris Prince [chrprince@gmail.com] - 12 May 2018" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Similar analysis for NYC as for the plots shown in this tweet:\n", "https://twitter.com/geographyjim/status/994949659461341184" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "![building heights by distance for London and Paris](https://pbs.twimg.com/media/Dc7FSwFXkAA5-br.jpg:large)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Imports:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import pandas as pd\n", "import geopandas as gpd\n", "from shapely.wkt import loads\n", "import pylab as pl\n", "import seaborn as sns" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [], "source": [ "%matplotlib inline" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [], "source": [ "buildings = pd.read_csv('/home/cmp/data/building.csv')\n", "#buildings = pd.read_csv('/home/cmp/data/chicago_buildings.csv')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Sources" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**NYC**: https://data.cityofnewyork.us/Housing-Development/Building-Footprints/nqwf-w8eh/data\n", "\n", "Similar data exists for Chicago, but appears incomplete: https://data.cityofchicago.org/Buildings/Building-Footprints-deprecated-August-2015-/qv97-3bvb (and the current version may be broken) as of 12 May 2018." ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", " | the_geom | \n", "NAME | \n", "CNSTRCT_YR | \n", "BIN | \n", "LSTMODDATE | \n", "LSTSTATYPE | \n", "DOITT_ID | \n", "HEIGHTROOF | \n", "FEAT_CODE | \n", "GROUNDELEV | \n", "SHAPE_AREA | \n", "SHAPE_LEN | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "MULTIPOLYGON (((-73.81023637428498 40.72623326... | \n", "NaN | \n", "1993 | \n", "4441987 | \n", "12/19/2017 12:00:00 AM +0000 | \n", "Constructed | \n", "1283366 | \n", "21.540000 | \n", "2100 | \n", "70 | \n", "1089.812313 | \n", "166.785929 | \n", "
1 | \n", "MULTIPOLYGON (((-73.86002815218995 40.57354222... | \n", "NaN | \n", "1920 | \n", "4518072 | \n", "08/17/2017 12:00:00 AM +0000 | \n", "Constructed | \n", "964744 | \n", "16.381832 | \n", "5110 | \n", "6 | \n", "329.898503 | \n", "77.673856 | \n", "
2 | \n", "MULTIPOLYGON (((-73.76711333552652 40.61130961... | \n", "NaN | \n", "1940 | \n", "4299860 | \n", "08/22/2017 12:00:00 AM +0000 | \n", "Constructed | \n", "547717 | \n", "26.795523 | \n", "2100 | \n", "8 | \n", "1234.856322 | \n", "146.929814 | \n", "
3 | \n", "MULTIPOLYGON (((-73.74704802666373 40.60410892... | \n", "NaN | \n", "1930 | \n", "4516837 | \n", "08/17/2017 12:00:00 AM +0000 | \n", "Constructed | \n", "861127 | \n", "11.358426 | \n", "5110 | \n", "29 | \n", "275.411758 | \n", "68.476327 | \n", "
4 | \n", "MULTIPOLYGON (((-73.77058283711517 40.59512166... | \n", "NaN | \n", "1931 | \n", "4301765 | \n", "08/22/2017 12:00:00 AM +0000 | \n", "Constructed | \n", "288652 | \n", "26.632714 | \n", "2100 | \n", "6 | \n", "1420.221189 | \n", "208.893121 | \n", "