Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Urban Complexity

Python library and research pipeline for the analysis of urban complexity, mobility, and socio-spatial segregation.

This project is part of a broader research initiative that investigates the relationship between urban form, mobility patterns, and segregation through graph theory, information theory, and computational modeling.

The first phase of the project focuses on the implementation and validation of the Trajectory Entropy (ET) metric using a pilot area in Porto Alegre, Brazil.


Objectives

  • Download and process urban street networks from OpenStreetMap.
  • Characterize transportation infrastructure.
  • Generate and analyze movement trajectories.
  • Compute Trajectory Entropy (ET).
  • Support future implementations of segregation and complexity indicators.

Project Structure

urban-complexity/

│
├── data/
│   ├── raw/
│   ├── processed/
│   ├── results/
│   └── graph/
│
├── notebooks/
│   ├── 01_download_network.ipynb
│   ├── 02_explore_network.ipynb
│   ├── 03_characterize_network.ipynb
│   └── ...
│
├── src/
│   ├── network.py
│   ├── classification.py
│   ├── visualization.py
│   ├── origins.py
│   └── metrics/
│       ├── entropy.py
│       └── ...
├── config/
│   ├── config.json
│   ├── road_classification.json
│   └── ...
│
├── requirements.txt
├── README.md
├── anotacoes.md
└── .gitignore


Environment

Create a virtual environment

python -m venv .venv

Activate

Windows

.venv\Scripts\activate

Linux / macOS

source .venv/bin/activate

Install dependencies

pip install -r requirements.txt

Main Libraries

  • OSMnx
  • GeoPandas
  • NetworkX
  • Shapely
  • Pandas
  • NumPy
  • Matplotlib

Additional libraries will be incorporated as the project evolves.


Workflow

The project is organized as a sequential research pipeline:

  1. Download street network
  2. Characterize road infrastructure
  3. Generate origins (population)
  4. Generate destinations (amenities)
  5. Build OD matrix
  6. Compute routes
  7. Build trajectories
  8. Compute urban metrics
  9. Calculate Trajectory Entropy (ET)
  10. Visualize and analyze results

Current Status

Current implementation:

  • ✔ Street network download
  • ✔ Road classification
  • ✔ Network visualization
  • ✔ Build origins

In progress:

  • Network Cleaning
  • Routing
  • Trajectory generation
  • Trajectory Entropy (ET)

Future work:

  • Segregation indicators
  • Accessibility analysis
  • Agent-Based Modeling
  • Machine Learning
  • Space-time analysis

References

The implementation is based on concepts from:

  • Shannon (1948)
  • Kwan (1998, 2013)
  • Netto et al.
  • Boeing (2018)
  • Network Science
  • OSMnx

License

Research project.

For academic use only.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages