Categories
Urban

Street Network Simplification

How many street intersections do you see in this figure? I have a new article published this week in Transactions in GIS (open-access) and its first sentence sums it up: “Counting is hard.” Hear me out… it really is!

Street network graph simplification of complex intersections, nonplanarity, and curve digitization from OpenStreetMap dataMost real-world objects belong to fuzzy categories, resulting in subjective decisions about what to include or exclude from counts. Yet this complexity is often obscured by a superficial impression that counting is easy to do because its mechanics seem easy to understand. After all, everyone learns to count in kindergarten by simply enumerating the elements in a set. But counting is hard because defining that set and identifying its members are often nontrivial tasks. Many of the world’s most important analytics rely far less on flashy data science techniques than they do on counting things well and justifying those counts effectively.

Street intersection counts and densities are ubiquitous measures in transportation geography and planning. However, typical street network data and typical street network analysis tools can substantially overcount them. This article explains the 3 main reasons why this happens and presents solutions to each.

Street intersections, particularly the complex kind common in modern car-centric urban areas, are fuzzy objects for which most data sources do not provide a simple 1:1 representation. This results in spatial uncertainty due to data challenges in representing network nonplanarity, intersection complexity, and curve digitization. Essentially all data sources suffer from at least 1 of these problems due to difficulties representing divided roads, slip lanes, roundabouts, interchanges, complex turning lanes, etc. If unaddressed, my assessment shows that typical intersection counts (and downstream densities) would be overestimated by >14%, but very unevenly so in different parts of the world. This bias’s extreme heterogeneity particularly hinders comparative urban analytics.Street network topology simplification with OSMnx and OpenStreetMapMitigating these 3 problems is a project I’ve been iteratively refining for the past decade. It was a central focus of my dissertation and a key motivation for originally developing OSMnx. This article presents OSMnx’s algorithms to automatically simplify spatial graphs of urban street networks—via edge simplification and node consolidation—resulting in faster parsimonious models and more accurate network measures like intersection counts and densities, street segment lengths, and node degrees. These algorithms’ information compression drastically improves downstream graph analytics’ memory and runtime efficiency, boosting analytical tractability without loss of model fidelity.

Counting is hard, but we can make it a little easier by using better models. For more, check out the open-access article.

Categories
Data

OSMnx Reference Paper Published

The official OSMnx reference paper, titled “Modeling and Analyzing Urban Networks and Amenities With OSMnx,” has just been published open-access by Geographical Analysis. Years in the making, this article describes what OSMnx does and why it does it that way.

OSMnx: Figure-ground diagrams of one square mile of each street network, from OpenStreetMap, made in Python with matplotlib, geopandas, and NetworkXBut wait, there’s more! I also discuss many lessons learned over the past decade in geospatial software development, including:

  • what makes a good API, and why is it so hard for academics to make one
  • how your development pipeline and continuous integration can make or break your quality of life as an open-source developer
  • dependency ecosystems and the fine line between dependency heaven and dependency hell
  • why reusable geospatial software is so important for open science, and how we can advance it

All of these lessons have become central to the work my RAs do in the Urban Analytics lab at USC. They’re not always easy, but they make a clear improvement in code quality, clarity, and reusability that directly impacts our downstream empirical analyses and scientific theorizing.

From the abstract:

OSMnx is a Python package for downloading, modeling, analyzing, and visualizing urban networks and any other geospatial features from OpenStreetMap data. A large and growing body of literature uses it to conduct scientific studies across the disciplines of geography, urban planning, transport engineering, computer science, and others. The OSMnx project has recently developed and implemented many new features, modeling capabilities, and analytical methods. The package now encompasses substantially more functionality than was previously documented in the literature. This article introduces OSMnx’s modern capabilities, usage, and design—in addition to the scientific theory and logic underlying them. It shares lessons learned in geospatial software development and reflects on open science’s implications for urban modeling and analysis.

This year will mark the 10th anniversary of my work on the OSMnx project. It recently reached version 2.0 with a slew of new features and enhancements. If you haven’t used it before, OSMnx is a Python package to easily download, model, analyze, and visualize street networks and any other geospatial features from OpenStreetMap. You can download and model walking, driving, or biking networks with a single line of code then quickly analyze and visualize them. You can just as easily work with urban amenities/points of interest, building footprints, transit stops, elevation data, street orientations, speed/travel time, and routing.

For more, check out the article at Geographical Analysis.

Categories
Data

OSMnx 2.0 Beta

OSMnx v2.0.0 is targeted for release later in 2024. This major release includes some breaking changes (including removing previously deprecated functionality) that are not backwards compatible with v1. See the migration guide and reference paper for details.

The first beta pre-release is out now, and testers are needed. If you use OSMnx, you can help test it by installing the latest pre-release. Create a virtual environment then run: pip install --pre osmnx

For more, check out the migration guide and reference paper.

Categories
Data

Worldwide Street Network Models and Indicators

My article, “Street Network Models and Indicators for Every Urban Area in the World” has been published by Geographical Analysis. This project was a massive undertaking and I’m excited to share it. As you might guess from the title, I modeled and analyzed the street network of each urban area in the world then deposited all the source code and models and indicators in open repositories for public reuse. The article also includes a high-level analysis of urban street network form across the world.

Cities worldwide exhibit a variety of street patterns and configurations that shape human mobility, equity, health, and livelihoods. Using boundaries derived from the Global Human Settlement Layer, I modeled and analyzed the street networks of every urban area in the world using OSMnx and OpenStreetMap raw data. In total, I modeled over 160 million street network nodes and over 320 million edges across 8,914 urban areas in 178 countries. I attached node elevations and street grades to every node/edge in the final models. All the final models were topologically simplified such that nodes represent intersections and dead-ends, and edges represent the street segments linking them.

Street network topology simplification with OSMnx and OpenStreetMap

Categories
Data

GIS and Computational Notebooks

I have a new chapter “GIS and Computational Notebooks,” co-authored with Dani Arribas-Bel, out now in The Geographic Information Science & Technology Body of Knowledge. Want to make your spatial analyses more reproducible, portable, and well-documented? Our chapter is a short, gentle intro to using code and notebooks for modern GIS work.

Science and analytics both struggle with reproducibility, documentation, and portability. But GIS in both research and practice particularly suffers from these problems due to some of its unique characteristics. Our chapter discusses this challenge and its urgency for building better and more actionable knowledge from geospatial data. Then we introduce an emerging solution, the computational notebook, using Jupyter as our central example to illustrate what it does and how it works.

Jupyter notebook JupyterLab user interface