Urbanity¶
Automated modelling and analysis of multidimensional urban networks
What is Urbanity?¶
Urbanity is a network and graph-based Python package developed at the NUS Urban Analytics Lab since 2022. It automates the construction of feature-rich, contextual, and semantic urban networks and graphs at any geographical scale β from a single neighbourhood to an entire city.
Feature-rich networks of cities around the world
Features¶
City-Scale Networks
Generate complete, analysis-ready street networks for any city in the world using OpenStreetMap data.
Rich Indicators
Automatically compute metric, topological, contextual, and semantic network indicators at every node and edge.
Multiple Graph Types
Generate primal planar, dual, and spatial graphs β all convertible to graph-ML-ready formats.
Building Integration
Integrate building footprints, heights, use types, and energy characteristics into your network.
Street View Imagery
Process Mapillary street view images for semantic segmentation and visual urban indicators.
Satellite Imagery
Pull and process Mapbox satellite tiles and Google Earth Engine raster layers.
Population Data
Overlay disaggregated population grids (GHS, Meta) for demographic context.
Graph ML Ready
Export directly to PyTorch Geometric or DGL for node, edge, and graph-level prediction tasks.
Quickstart¶
import urbanity
# Create an interactive map
m = urbanity.Map(country="Singapore")
m.show()
# Draw your area of interest on the map, then build the network
G = m.get_network(network_type="drive")
G.get_indicators()
β See the full Quickstart guide for a step-by-step walkthrough.
Global Dataset¶
Don't want to build from scratch? Download pre-built, feature-rich urban graphs for hundreds of cities:
Citation¶
If you use Urbanity in your research, please cite:
See the full citation list for all related publications.