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.

Categories
Data

What’s New with OSMnx, Part 1

There have been some major changes to OSMnx in the past couple months. I’ll review them briefly here, demonstrate some usage examples, then reflect on a couple upcoming improvements on the horizon. First, what’s new:

  • new consolidate_intersections function with topological option
  • new speed module to impute missing street speeds and calculate travel times for all edges
  • generalized POIs module to query with a flexible tags dict
  • you can now query OSM by date
  • you can now save graph as a geopackage file
  • clean up and streamline the OSMnx API
Categories
Data

New Article on Computational Notebooks

I have a new article out in Region: Journal of the European Regional Science Association, “Urban Street Network Analysis in a Computational Notebook.” It reflects on the use of Jupyter notebooks in applied data science research, pedagogy, and practice, and it uses the OSMnx examples repository as an example.

From the abstract:

Computational notebooks offer researchers, practitioners, students, and educators the ability to interactively conduct analytics and disseminate reproducible workflows that weave together code, visuals, and narratives. This article explores the potential of computational notebooks in urban analytics and planning, demonstrating their utility through a case study of OSMnx and its tutorials repository. OSMnx is a Python package for working with OpenStreetMap data and modeling, analyzing, and visualizing street networks anywhere in the world. Its official demos and tutorials are distributed as open-source Jupyter notebooks on GitHub. This article showcases this resource by documenting the repository and demonstrating OSMnx interactively through a synoptic tutorial adapted from the repository. It illustrates how to download urban data and model street networks for various study sites, compute network indicators, visualize street centrality, calculate routes, and work with other spatial data such as building footprints and points of interest. Computational notebooks help introduce methods to new users and help researchers reach broader audiences interested in learning from, adapting, and remixing their work. Due to their utility and versatility, the ongoing adoption of computational notebooks in urban planning, analytics, and related geocomputation disciplines should continue into the future.

For more, check out the article.

Categories
Planning

Off the Grid at TRB

I am presenting my ongoing research into the recent evolution of American street network planning and design at the annual meeting of the Transportation Research Board in Washington DC on January 13. This presentation asks the question: how has street network design changed over time, especially in recent years? I analyze the street networks of every US census tract and estimate each’s vintage.

Street network designs grew more disconnected, coarse-grained, and circuitous over the 20th century… but the 21st century has witnessed a promising rebound back toward more traditional, dense, and interconnected grids. Higher griddedness is associated with less car ownership, even when controlling for related socioeconomic, topographical, and other urban factors.

Update: the paper has been published in JAPA.

Categories
Urban

Big Data in Urban Morphology

My new article “Spatial Information and the Legibility of Urban Form: Big Data in Urban Morphology” has been published in the International Journal of Information Management (download free PDF). It builds on recent work by Crooks et al, presenting workflows to integrate data-driven and narrative approaches to urban morphology in today’s era of ubiquitous urban big data. It situates this theoretically in the visual culture of planning to present a visualization-mediated interpretative process of data-driven urban morphology, focusing on transportation infrastructure via OSMnx.

OSMnx: Figure-ground diagrams of one square mile of each street network, from OpenStreetMap, made in Python with matplotlib, geopandas, and NetworkX

Categories
Urban

Urban Street Network Orientation

My new article, Urban Spatial Order: Street Network Orientation, Configuration, and Entropy, has just been published in one of my favorite journals: Applied Network Science (download free PDF). This study explores the spatial signatures of urban evolution and central planning. It examines street network orientation, connectivity, granularity, and entropy in 100 cities around the world using OpenStreetMap data and OSMnx for modeling and visualization:

City street network grid orientations, order, disorder, entropy, rose plot, polar histogram made with Python, OSMnx, OpenStreetMap, matplotlib.

So, who’s got a grid and who doesn’t? Each of the cities above is represented by a polar histogram (aka rose diagram) depicting how its streets orient. Each bar’s direction represents the compass bearings of the streets (in that histogram bin) and its length represents the relative frequency of streets with those bearings. The cities above are in alphabetical order. Here they are again, re-sorted from most-ordered/gridded city (Chicago) to most-disordered (Charlotte):

Categories
Data

New Article in Frontiers in Neurology

I recently teamed up with an international group of public health researchers and spatial analysts to co-author an article, An Introduction to Software Tools, Data, and Services for Geospatial Analysis of Stroke Services, that has been accepted for publication at Frontiers in Neurology (download free PDF).

Hospital catchment basin for stroke services. Spatial analysis in python, geopandas, osmnx.

Categories
Academia

AAG Transactions in GIS Plenary

Manhattan, New York City, New York street network, bearing, orientation from OpenStreetMap mapped with OSMnx and PythonI am giving the Transactions in GIS plenary address at the AAG conference this afternoon. I’ll be reflecting on urban science, spatial networks, and tool-building in academia, focusing on OSMnx. A paper will be forthcoming soon, but in the meantime, for any interested plenary session attendees or other folks, here are a few links to more info and related resources:

Getting started

What is OSMnx? What does it do? Here’s a succinct overview.

The easiest way to get started with street network modeling and analysis in OSMnx is with this docker image and these example/tutorial Jupyter notebooks. The OSMnx software documentation is available here and this journal article introduces it more formally.

Categories
Data

US Street Network Models and Measures

My new article, “Street Network Models and Measures for Every U.S. City, County, Urbanized Area, Census Tract, and Zillow-Defined Neighborhood” has been published in Urban Science. This paper reports results from a broader project that collected raw street network data from OpenStreetMap using the Python-based OSMnx software for every U.S. city and town, county, urbanized area, census tract, and Zillow-defined neighborhood boundary. It constructed nonplanar directed multigraphs for each and analyzed their structural and morphological characteristics.

The resulting public data repository contains over 110,000 processed, cleaned street network graphs (which in turn comprise over 55 million nodes and over 137 million edges) at various scales—comprehensively covering the entire U.S.—archived as reusable open-source GraphML files, node/edge lists, and ESRI shapefiles that can be immediately loaded and analyzed in standard tools such as ArcGIS, QGIS, NetworkX, graph-tool, igraph, or Gephi.

Categories
Data

Street Network Analysis in a Docker Container

Containerization is the way of the future present. I’ve heard feedback from some folks over the past few months who would like to play around with OSMnx for street network analysis, transport modeling, and urban design—but can’t because they can’t install Python and its data science stack on their computers. Furthermore, it would be nice to have a consistent reference environment to deploy on AWS or elsewhere in the cloud.

So, I’ve created a docker image containing OSMnx, Jupyter, and the rest of the Python geospatial data science stack, available on docker hub alongside additional usage instructions. If you’re starting from scratch, you can get started in four simple steps: