Street network figure-ground diagrams, à la Allan Jacobs's Great Streets

Use OSMnx to download square-mile city street networks and visualize them as figure-ground diagrams. Discussed in this blog post.

In [1]:
import osmnx as ox
from IPython.display import Image
%matplotlib inline
ox.config(log_file=True, log_console=True, use_cache=True)
In [2]:
# configure the inline image display
img_folder = 'images'
size = 350

Part I: create diagrams by passing in lat-long points

In [3]:
place = 'sf'
point = (37.793897, -122.402189)
fig, ax = ox.plot_figure_ground(point=point, filename=place)
Image('{}/{}.jpg'.format(img_folder, place), height=size, width=size)
Out[3]:
In [4]:
place = 'portland'
point = (45.517309, -122.682138)
fig, ax = ox.plot_figure_ground(point=point, filename=place, network_type='drive')
Image('{}/{}.jpg'.format(img_folder, place), height=size, width=size)
Out[4]: