University College London
Browse (52.95 MB)

Urban Segregation on multilayered transport networks: a random walk approach

Download (52.95 MB)
posted on 2024-02-12, 11:14 authored by Mateo Neira AlvarezMateo Neira Alvarez

This repository contains software to compute the segregation indices proposed in:

M Neira, C Molinero, S Marshall, E Arcaute "Urban Segregation on multilayered transport networks: a random walk approach". arXiv

The repository consists of a python package 'multilayer_segregation' - which contains a class definition for a multilayered transport network -a long with functions to compute different segregation indices based on normal, preferential, and levy flight random walks.

Multilayered Transport Networks

Concept: A multilayered transport network is a complex model that considers different modes of transportation within a city (like buses, trains, and pedestrian paths) as interconnected layers within a single network. This approach acknowledges that the urban movement is not restricted to a single mode of transport but involves transitions between multiple modes.

Importance in Segregation Studies: By analysing transport networks as multilayered systems, researchers can gain insights into how the accessibility and connectivity of different urban areas might contribute to social segregation. It allows for a more nuanced understanding of how people move within urban spaces and how this movement can either bridge or reinforce social divides.

Python Package: multilayer_segregation

Class Definition: The package likely includes a class that represents the multilayered transport network. This class encapsulates the properties and methods necessary to model the complex interactions and transitions between different transport layers.

Functions to Compute Segregation Indices: The package provides functions to calculate various segregation indices. These indices are measures that quantify the degree of segregation in the city. The computation of these indices is based on the behavior of random walks on the network, which are used to simulate the movement of individuals within the urban environment.

Types of Random Walks

Normal Random Walks: This is the simplest form of random movement, where each step is taken in a random direction without any preference or memory of past steps.

Preferential Random Walks: In this type, some nodes or paths in the network are more likely to be chosen than others, possibly simulating the behavior of individuals who prefer certain routes or modes of transport based on convenience, safety, or other factors.

Levy Flight Random Walks: Levy flights are a type of random walk characterized by a series of short movements in a local area and occasional long jumps to distant locations. This might model the occasional longer trips individuals make outside their usual local movements.

Implications and Applications

The software provided in this repository can be a powerful tool for urban planners, sociologists, and geographers interested in understanding and addressing urban segregation. By using this software, researchers can:

  1. Analyse the impact of transport network design on social integration.
  2. Identify areas within cities that are particularly segregated or integrated.
  3. Propose changes to transport networks to reduce segregation.

Given the complexity and novelty of the approach, users of the software would need a solid understanding of network theory, urban studies, and computational methods to effectively apply it to their research or planning projects.


The code base requires python>=3.10 to run. The following dependencies are also required: networkx, osmnx, pandas, numpy, geopandas, shapely, matplotlib, seaborn, descartes, scipy, h3, and mapclassify.

The package along with all its dependencies can be installed using the pyproject.toml provided.

The code can be copied, used, modified, and redistributed under the terms of the MIT/Expat License. Please see the file LICENSE for additional details.


Usage metrics

    Centre for Advanced Spatial Analysis



    Ref. manager