(Geo-)postcard from Chicago

I've spent this weekend in Chicago and, out of my love for maps, I could not resist buying one of the beautiful cards that VeniCity puts together:

In [1]:
from IPython.display import Image
url = 'https://img1.etsystatic.com/025/0/9114470/il_570xN.598946441_460h.jpg'
Image(url)
Out[1]:

Out of the same geeky love, I haven't been able to resist to geo-reference the imagine using the QGIS georeferencer. The cool thing is that it produces a .tiff file of spatial raster data that we can now plot, say, on top of OpenStreetMap. Very easy with cartopy:

In [2]:
%matplotlib inline
import matplotlib.pyplot as plt
from cartopy import config
import cartopy.crs as ccrs
import cartopy.io.img_tiles as cimgt
In [3]:
fig = plt.figure(figsize=(8, 12))

sta = cimgt.StamenTerrain()
ax = plt.axes(projection=sta.crs)

img_extent = (-9780547, -9742718, 5108138, 5164592)
ax.set_extent(img_extent, crs=cimgt.OSM().crs)
ax.add_image(sta, 10, alpha=0.5)

gp = plt.imread('chicago_geopostcard.tif')
ax.imshow(gp, origin='upper', extent=img_extent, transform=cimgt.OSM().crs, alpha=1)

plt.show()