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
Urban

Urban Form and OpenStreetMap

My chapter “Exploring Urban Form Through OpenStreetMap Data: A Visual Introduction” has just been published in the new book Urban Experience and Design: Contemporary Perspectives on Improving the Public Realm edited by Justin Hollander and Ann Sussman.

From the abstract:

This chapter introduces OpenStreetMap—a crowdsourced, worldwide mapping project and geospatial data repository—to illustrate its usefulness in quickly and easily analyzing and visualizing planning and design outcomes in the built environment. It demonstrates the OSMnx toolkit for automatically downloading, modeling and visualizing spatial data from OpenStreetMap. We explore patterns and configurations in street networks and buildings around the world computationally through visualization methods—including figure-ground diagrams and polar histograms—that help compress urban complexity into comprehensible artifacts that reflect the human experience of the built environment. Ubiquitous urban data and computation can open up new urban form analyses from both quantitative and qualitative perspectives.

For more, check out the chapter.

Categories
Academia

Geospatial Tool Building

My new article “The Right Tools for the Job: The Case for Spatial Science Tool-Building” has been published in Transactions in GIS (free PDF). I originally presented this paper as the 8th annual Transactions in GIS plenary address at the AAG annual meeting last year. I argue that tool-building is an essential but poorly incentivized component of academic geography and social science more broadly. To conduct better science, we need to build better tools. Better tools and data models, spearheaded by academics, can help infuse theory into our field’s quantitative work where it is too often lacking. But if we want better tools, we have to build them. It is not ESRI’s job to satisfy all the theoretical needs of the spatial sciences.

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.

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

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:

Categories
Planning

City Street Orientations around the World

City street network grid orientations, order, disorder, entropy, rose plot, polar histogram made with Python, OSMnx, OpenStreetMap, matplotlib.This post is adapted from this research paper that you can read/cite for more info. It analyzes and visualizes 100 cities around the world.

By popular request, this is a quick follow-up to this post comparing the orientation of streets in 25 US cities using Python and OSMnx. Here are 25 more cities around the world:

City street network grid orientations, rose plot, polar histogram made with Python, OSMnx, OpenStreetMap, matplotlib. Bangkok, Barcelona, Beijing, Budapest, Cairo, Delhi, Dubai, Glasgow, Hong Kong, Lagos, London, Madrid, Melbourne, Mexico City, Moscow, Mumbai, Munich, Paris, Rio de Janeiro, Rome, Seoul, Sydney, Tehran, Toronto, Warsaw, Tokyo, Berlin, Venice