OSMnx is a Python package for easily downloading and analyzing street networks anywhere in the world. Among other analyses, we can use it to explore street network orientation. That is, what are the bearings and spatial orientations of the streets in the network? All of the code for this example is in this GitHub notebook. First we use OSMnx to download the street network of Moraga, California, a small town in the hills just east of Berkeley:

Moraga, California street network OSMnx OpenStreetMap Python

OSMnx automatically calculates all of the streets’ bearings. Specifically it calculates the compass bearing from each directed edge’s origin node u to its destination node v. Now we can visualize these bearings, binned together as a histogram to get a sense of the relative frequency of the streets’ spatial orientations. Or better yet, we can project that histogram as a polar plot to match the compass bearings:

Moraga, California street network orientation edge bearings polar plot OSMnx
OpenStreetMap Python

In the polar plot above, it’s easy to see how Moraga’s street orientations are scattered in all directions, much as we’d expect given its winding, dendritic street network pattern. By contrast, we can download the street network of Santa Monica, California, a small city surrounded by western Los Angeles:

Santa Monica, California street network OSMnx OpenStreetMap Python

We can easily see that Santa Monica has a more orthogonal, grid-like street network than Moraga does. This is clearly reflected in its polar plot:

Santa Monica, California street network orientation edge bearings polar plot
OSMnx OpenStreetMap Python

In this polar plot, Santa Monica’s orthogonal grid is clearly visible in the clustering of its streets’ compass bearings. We can further use these clustered (or not clustered) bearings to calculate indicators of the urban form, such as how grid-like or non-grid-like different cities’ or neighborhoods’ street networks are. For more, check out this example notebook, read this overview of OSMnx, or get OSMnx from GitHub.