Examples¶
This section provides examples of how to use City2Graph in various urban analysis scenarios.
| Example | Description |
|---|---|
| Metapath Construction for Heterogeneous GNNs | Demonstrates the workflow of metapath construction from a heterogeneous graph. The example creates a dual graph of streets, connects amenities, and materializes metapaths between amenities via streets for Heterogeneous Graph Neural Networks (HGNNs). |
| Morphological Graphs from Overture Maps & OpenStreetMap | Create morphological graphs from Overture Maps and OpenStreetMap (OSM), capturing relationships between public (streets) and private (tessellations/buildings) spaces for urban form analysis. |
| GTFS to Public Transit Networks as Graphs | Transforms General Transit Feed Specification (GTFS) schedules into intuitive graph representations for public transport accessibility analysis and multi-modal network visualization. |
| OD Matrices to Mobility Networks as Graphs | Demonstrates the conversion of Origin-Destination (OD) Matrices into mobility networks, supporting both edge-list and adjacency formats for modeling human mobility flows. |
| Spatial Proximity Graphs | Illustrates how to generate and visualize different spatial graph types based on proximity metrics (KNN, Delaunay Triangulation, Gilbert, Waxman), bridging and grouping nodes for spatial connectivity. |
External Links¶
| Title | Author | Language | Type | Release |
|---|---|---|---|---|
| City2Graph: Python package for spatial network analysis and GeoAI with GNNs | Yuta Sato | EN | Tutorial | Sep 23, 2025 |
| I created a Python library that converts geospatial data into graph representations for heterogeneous GNNs | Yuta Sato | JA | Tutorial | Oct 14, 2025 |
| Verifying Hiroshima Station Redevelopment with Network Science using city2graph | Koki Eguchi | JA | Blog | Dec 22, 2025 |
| How to Use Overture Maps Like OSMnx — by City2Graph | Yuta Sato | EN | Tutorial | Mar 12, 2026 |
Note: We welcome external examples! Please submit a pull request if you have an example to share.