City2Graph: A Python library for Heterogeneous Graph Neural Networks and spatial analysis in urban systems
The researchers developed City2Graph, an open-source Python library that standardises the construction of heterogeneous Graph Neural Networks (GNNs) across urban morphology, transportation, mobility, and proximity domains. The library converts spatial geometries and network topologies into GNN-ready tensors and supports metapath construction to capture higher-order connections. Its utility was demonstrated in Liverpool, UK, where a heterogeneous Graph Autoencoder model using spatial contiguity, walking accessibility, and multimodal transit relations clustered urban functions more coherently than a homogeneous baseline.
Why it matters — It bridges the gap between spatial data science and deep graph learning by providing a unified, reproducible pipeline to build and train heterogeneous GNNs, which previously suffered from fragmented workflows across different data domains.
Caveat: The library's performance advantages were demonstrated on a single case study of urban function clustering in Liverpool, meaning its comparative benefits may vary for other spatial prediction or classification tasks.