Examples

Worked recipes for every part of cityseer, built on bundled real-world data. Each recipe page renders the executed notebook and offers the raw .py file for download. To work with a notebook interactively, download it (or clone the repository) and open it with uv run marimo edit <file>. The notebooks are marimo files, but nothing ties the code to marimo: the cells are plain Python, so you can equally create a notebook in your own preferred environment and copy the cells across as you follow along.

The recipes build on each other, so if you are wondering why or how to do something, you may find the answer in a preceding recipe. Start with the Quickstart; the underlying concepts (network conversion, distance thresholds, edge rolloff) are explained in the guide. Open an issue to request additional examples.

Topics

  • Network Preparation: building cityseer-compatible graphs from OSM, GeoDataFrames, OSMnx, and momepy; simplification; dual graphs; directed networks.
  • Network Centrality: metric and angular centrality, custom expressions, adaptive sampling, demand-weighted betweenness, GTFS.
  • Accessibility: land-use accessibility and mixed-use metrics.
  • Statistics: aggregating numeric feature properties over the network.
  • Visibility: street enclosure and openness from footprints and rasters.
  • Continuity: street name, route, and classification continuity.

Datasets

The real-world datasets used by the recipes are documented on the datasets page, with source links and licensing information.