c2g-dev/city2graph
Transform geospatial relations into graphs for Graph Neural Networks and spatial network analysis observed · 2026-08-28
Health v2 · maintenance only
86/100
- Activity 98
- Release rhythm 95
- Longevity 42
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 11.5
- age_days: 593
- days_rel: 32
- days_push: 15
- n_releases_24m: 17
Adoption not part of the score
1872 stars · 197 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
City2Graph is a Python library that converts geospatial data such as buildings, streets, GTFS transit feeds, and origin-destination matrices into spatial and heterogeneous graphs. It bridges GeoPandas, NetworkX, and PyTorch Geometric so the same data supports both network analysis and Graph Neural Network workflows.
Use cases
- convert openstreetmap buildings and streets into graphs for gnn training
- build stop-to-stop transit graphs from gtfs feeds
- turn origin-destination mobility matrices into weighted spatial graphs
- compute knn delaunay or queen contiguity spatial weights
- convert geodataframes to pytorch geometric heterodata tensors
- urban morphology and street network analysis
- spatial knowledge graphs for geoai applications
When to choose
- you need to bridge geospatial vector data with graph neural networks
- you work with gtfs, gbfs, or od flow data and want graph representations
- you want one library spanning geopandas, networkx, and pytorch geometric
- you do urban analytics, transportation, or geoai research in python
When to avoid
- you need raster or satellite imagery processing rather than vector graphs
- you need production gnn training infrastructure rather than graph construction
- you work outside python or need non-geospatial graph databases
Facets
library · maturity active
geospatial machine-learning data-science parser machine-learning data-science python cross-platform graph-neural-networks pytorch-geometric urban-analytics gis network-analysis gtfs mobility spatial-graphs geopandas networkx geoai urban-morphology geospatial maps transportation
2 sources
- readme: https://github.com/c2g-dev/city2graph · fetched 2026-08-28 · 517aa60ab098
- registry_pypi: https://pypi.org/pypi/city2graph/json · fetched 2026-08-29 · 547a44e4bcf2
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| c2g-dev/city2graph | main | 86 |
For agents
markdown · JSON · MCP: product_card(name="c2g-dev/city2graph")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem