How to use Python and OSMnx to create beautiful visuals of global cities’ road networks.
Road networks are beautiful bird-eye view representations of cities. However, their importance reaches far beyond eye candies used as wallpapers. In fact, for the trained urbanist eyes, the visual structure of a city’s road network already hints at lots of information about the masterplan (if there was any) and the possible paths of development a city took, as well as the potential pitfalls and problems currently, or in the near future could affect the city. These can range from public and private transportation planning to the improvement of green infrastructure and the accessibility of services and amenities.
In this article, I introduce you to the first step of this process by using the OSMnx library to download various global cities road networks.
All images were created by the author.
Prototyping the road network visualization process
Let’s start with something simple and quick to process, for instance, a smaller ity district. As an example, I use downtown, District 5, in Budapest.
First, using OSMnx, I download the admin boundaries of the city, and then use the graph_from_polygon command…