Skip to content

Urbanity

Automated modelling and analysis of multidimensional urban networks

PyPI version Downloads License: MIT Documentation Status Open In Colab

Get Started View on GitHub


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.

Urban networks of cities around the world 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:

Yap, W., Stouffs, R. & Biljecki, F. **Urbanity: automated modelling and analysis of multidimensional networks in cities.** *npj Urban Sustainability* 3, 45 (2023). https://doi.org/10.1038/s42949-023-00125-w

See the full citation list for all related publications.


NUS Urban Analytics Lab