Skip to content

A Python library modeling pedestrian and bicycle trips over networks.

License

Notifications You must be signed in to change notification settings

City-Form-Lab/madina

Folders and files

NameName
Last commit message
Last commit date

Latest commit

317f5fe · Feb 6, 2024
Feb 6, 2024
Feb 2, 2024
Feb 6, 2024
Jan 23, 2024
Feb 2, 2024
Dec 4, 2023
Oct 24, 2023
Dec 27, 2023
Nov 14, 2023
Nov 14, 2023
Feb 6, 2024
Feb 6, 2024
Dec 23, 2023

Repository files navigation

Madina

Madina (Arabic for the word 'city') is a package of classes and functions to streamline the representation and analysis of urban data. The package provide layer management (Similar to layers in CAD/GIS), urban network representation and visualization. The package also includes a python implemetation of the Urban Network Analysis Toolbox (Homepage - User Guide).

More detailed documentation of the package is available here

HIghlights

  • Organization of data layers using Geopandas
  • Creation of topological (Routable) networks from a geometric representaion. Network is represented using NetworkX
  • Insertion of origin and destination poitnts from data layers into topological network
  • Creating maps using DeckGL with various streamlined styling options
  • Improved implementation of UNA Tools that uses multiprocessing and novel path generation algorithoms to enable effecient betweenness flow simulations on large scale.
  • Added functionalities for UNA including percieved distance, elastic trip generation, turn penalties,
  • streamlined workflow for pedestrian flow simulation in urban environments.

Pedestrain Flow Simulation

The package features a streamlined way to model pedestrian activity in urban areas between pairs of pre-specified origins and destinations. This can be done by following these steps:

  • Prepare input data files for the network, and each origin and destination. Place all data in a folder called Cities/city_name/Data
  • Fill in the pairing table to specify origin-destination pairs, and specify specific parameters for each pair. Save the filled pairing table in the same Cities/city_name/Data folder
  • run the simulation:
from madina.una.betweenness import betweenness_flow_simulation

betweenness_flow_simulation(
    city_name="new_york"
)
  • Output would be saved in Cities/city_name/Simulations.
  • More instructions on running a pedestrain flow simulation, preparing data and creating the pairing table are found in the documentation here

Simulated Flow in New York City

Installation

First, install geopandas through conda in a new environment

conda create -n madina_env -c conda-forge --strict-channel-priority geopandas

Activate the newly created environment

conda activate madina_env

Install Madina through pip

pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple madina

Detailed instructions are available in the documentation here

Library Structure

  • Zonal class: This is the main class that the user interacts with. A user would create a Zonal object, populate it with data layers and calls functions to create a network object within a Zonal object.
  • Network Class: Created inside a Zonal ovject to represent a network of origins, destinations and 'street' connections. This object is used internally as input to most network algorithms.
  • UNA Module: A set of functions implementing the UNA functionalities. Each function tales a Zonal object as input.
  • Workflows module: A set of standarized workdlows that takes a set of structured inpurs. Examples for Pedesstrain flow simulartiob

Referencing this work

If you find this package useful in your research, feel free to read and reference this paper (Link).

Bibtex ENTRY PLACEHOLDER

About

A Python library modeling pedestrian and bicycle trips over networks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published