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

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
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: