# Alan Turing Institute Data Dive 2017¶

## Where can we build more houses?¶

### Identification of brownfield sites from satellite data using Machine Learning¶

#### (Exploratory data analysis by B. Soergel, Institute of Astronomy, Cambridge)¶

Brownfield sites are sites which have previously been developed and built on, often for industrial use. Now they are disused, which makes them candidate sites for the construction of new homes. In particular, building on existing brownfield sites would reduce urban sprawl into the green belt (for some more details see e.g. http://www.bbc.co.uk/schools/gcsebitesize/geography/urban_environments/urbanisation_medcs_rev5.shtml).

Using multi-band satellite image of the Greater Manchester area and a pilot register of brownfield sites, we can extract the spectral signature of these sites. We can then train a classification algorithm on these data. The classifier could then be applied to satellite images from other cities, where there is no brownfield register available.

In [1]:
import gdal
# import osgeo
from osgeo import osr
import os
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sn
%matplotlib inline


Image data was provided by Satellite Applications Catapult: https://sa.catapult.org.uk/

In [2]:
datapath = '/media/bjoern/data/datadive/SatelliteApplicationsCatapult/'
#Manchester
#Glasgow
path = os.path.join(datapath,imname)

In [3]:
#read geotiff
ds = gdal.Open(path)

In [4]:
#some settings for zoom-in on Manchester
xmin,xmax = 4250,5750
ymin,ymax = 7000,8000
plt.rcParams['xtick.labelsize'] = 20 #40
plt.rcParams['ytick.labelsize'] = 20 #40
extent = (0,(xmax-xmin)/1e2,0,(ymax-ymin)/1e2)

In [5]:
#band5
arr=data[4]
plt.figure(figsize=(24,24))
plt.imshow(arr[ymin:ymax,xmin:xmax].astype('float')/float(arr.max()),cmap=plt.cm.gray,
vmin=0,vmax=0.2,extent=extent)
cb = plt.colorbar(shrink=0.5)
cb.set_label('normalized surface reflectance',fontsize=30)
plt.grid(ls='--')
plt.xlabel('[km]',fontsize=40)
plt.ylabel('[km]',fontsize=40)
plt.title('Greater Manchester (Sentinel2 - Band5)',fontsize=40)
#plt.savefig('Manchester_overview_Band5.png',dpi=300,bbox_inches='tight')

Out[5]:
<matplotlib.text.Text at 0x7f9e9c18fb70>