My article “OSMnx: New methods for acquiring, constructing, analyzing, and visualizing complex street networks” was published in the journal Computers, Environment and Urban Systems earlier this month. OSMnx is a Python package that lets you download a street network anywhere in the world at any scale with a single line of code, then analyze or visualize it with one more line of code.
From the abstract:
Urban scholars have studied street networks in various ways, but there are data availability and consistency limitations to the current urban planning/street network analysis literature. To address these challenges, this article presents OSMnx, a new tool to make the collection of data and creation and analysis of street networks simple, consistent, automatable and sound from the perspectives of graph theory, transportation, and urban design. OSMnx contributes five significant capabilities for researchers and practitioners: first, the automated downloading of political boundaries and building footprints; second, the tailored and automated downloading and constructing of street network data from OpenStreetMap; third, the algorithmic correction of network topology; fourth, the ability to save street networks to disk as shapefiles, GraphML, or SVG files; and fifth, the ability to analyze street networks, including calculating routes, projecting and visualizing networks, and calculating metric and topological measures. These measures include those common in urban design and transportation studies, as well as advanced measures of the structure and topology of the network. Finally, this article presents a simple case study using OSMnx to construct and analyze street networks in Portland, Oregon.
I developed OSMnx as part of my dissertation research. For more info on using OSMnx, check out this blog post, its documentation, or its GitHub repo. Or, check out some quick demonstrations of using OSMnx to analyze street network patterns or the urban form.