Skip to content

Examples

Runnable Jupyter notebooks from the examples/ directory, rendered in place below.

  • Quickstart — loads small local GTFS feeds bundled in the repo (examples/test_files/sevilla), runs offline. Covers building a Feed, the interactive route_map, and stop/edge-level speed and headway analysis.
  • Cambridge, Massachusetts, USA — full example — an end-to-end workflow against real, downloaded GTFS data: searching and downloading feeds from the Mobility Database, building a Feed, picking a representative service day, route maps, speed/headway analysis at stops and edges, exporting to GIS-ready files, and a full GTFS DataFrame column reference.
  • Direction clustering and headway: a Y-shaped worked example — why route_id-based headway is unreliable and geometric, direction-based headway is not; how direction clustering works; the headway formula; and a real-feed (Sevilla) headway map. Companion to the Direction & headway methodology docs page.
  • Direction & headway methodology — how direction_id is derived from geometry alone (reconciling forward/backward bearings at a stop, clustering bearings via the "widest gap" split) and how per-stop departures are summarized into a single headway number, with small synthetic examples.

Tip

These notebooks are also runnable directly in Google Colab — each one has a "Open in Colab" badge as its first cell.