Categories
Data

OSMnx 2.0 Released

OSMnx version 2.0.0 has been released. This has been a massive effort over the past year to streamline the package’s API, re-think its internal organization, and optimize its code. Today OSMnx is faster, more memory efficient, and fully type-annotated for a better user experience.

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.OSMnx: Figure-ground diagrams of one square mile of each street network, from OpenStreetMap, made in Python with matplotlib, geopandas, and NetworkXThis has now been a labor of love for me for about 9 years. Wow. I initially developed this package to enable the empirical research for my dissertation. Since then, it has powered probably 2/3 of the articles I’ve published over the years. And it has received hundreds of contributions from many other code contributors. Thank you to everyone who helped make this possible.

I hope you find the package as useful as I do. Now I’m looking forward to all of your bug reports.

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

Urban Analytics: History, Trajectory and Critique

I have a new chapter titled “Urban Analytics: History, Trajectory and Critique,” co-authored with Mike Batty, Shan Jiang, and Lisa Schweitzer, now published in the Handbook of Spatial Analysis in the Social Sciences, edited by Serge Rey and Rachel Franklin.

From our abstract:

Urban analytics combines spatial analysis, statistics, computer science, and urban planning to understand and shape city futures. While it promises better policymaking insights, concerns exist around its epistemological scope and impacts on privacy, ethics, and social control. This chapter reflects on the history and trajectory of urban analytics as a scholarly and professional discipline. In particular, it considers the direction in which this field is going and whether it improves our collective and individual welfare. It first introduces early theories, models, and deductive methods from which the field originated before shifting toward induction. It then explores urban network analytics that enrich traditional representations of spatial interaction and structure. Next it discusses urban applications of spatiotemporal big data and machine learning. Finally, it argues that privacy and ethical concerns are too often ignored as ubiquitous monitoring and analytics can empower social repression. It concludes with a call for a more critical urban analytics that recognizes its epistemological limits, emphasizes human dignity, and learns from and supports marginalized communities.

For more, check out the chapter.

Categories
Data

OSMnx v1.2 Released

OSMnx v1.2.0 has been released. It includes several new features, bug fixes, and performance enhancements. I encourage you to upgrade and take advantage of everything new. For more information, check out the OSMnx documentation and usage examples for demonstrations of all you can do.

Categories
Data

OSMnx v1.1 Released

OSMnx v1.1.0 has been released. It includes several new features, bug fixes, and performance enhancements. I encourage you to upgrade and take advantage of everything new. I’ll summarize some of the key improvements in this post.

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

Categories
Data

OSMnx 1.0 Is Here

Happy new year! After five years of development and over 2,000 code commits from dozens of contributors, OSMnx v1.0 has officially been released. This has been a long labor of love and I’m thrilled to see it reach this milestone.

Much has changed in recent months with new features added and a few things deprecated. Most of this development occurred in a major overhaul over the summer, which I covered at the time in three previous posts. Among these dozens of enhancements were major speed and efficiency improvements throughout the package, better visualization, a new geometries module for retrieving any geospatial objects from OSM, topological intersection consolidation, and much more. I encourage you to read those posts to familiarize yourself with what’s new.

Categories
Data

OSMnx Summer Wrap-Up

OSMnx underwent a major overhaul this summer, with the development of several new features, improvements, and optimizations. This project concluded yesterday with the release of v0.16.0.

This post briefly summarizes what’s changed since the previous mid-summer updates. It covers the new k shortest paths solver, auto-selecting the first polygon when geocoding, better conversion of graph types, and the new geometries module that lets you flexibly download any OSM geospatial objects as a geopandas GeoDataFrame.

Categories
Data

What’s New With OSMnx, Part 2

This is a follow-up to last month’s post discussing the many new features, improvements, and optimizations made to OSMnx this summer. As this major improvement project now draws to a close, I will summarize what’s new(er) here. Long story short: there are a bunch of new features and everything in the package has been streamlined and optimized to be easier to use, faster, and more memory efficient.

First off, if you haven’t already, read the previous post about new features including topological intersection consolidation, automatic max speed imputation and travel time calculation, generalized points-of-interest queries, querying OSM by date, and API streamlining. This post covers new changes since then, including improved visualization and plotting, improved graph simplification, the new geocoder module, and other miscellaneous improvements.