Skip to content

PyTDLM: Systematic comparison of trip distribution laws and models in Python

Test Build and Distribution PyPI Version PyPI Downloads Conda Version Conda Downloads

Description

The main purpose of these packages is to provide a rigorous framework for fairly comparing trip distribution laws and models, as described in Lenormand et al. (2016). This general framework relies on a two-step approach to generate mobility flows, separating the trip distribution law, gravity or intervening opportunities, from the modeling approach used to derive flows from this law.

To make this framework more accessible, we developed both an R package and a Python package, which replace the original Java scripts and extend their functionality.

PyTDLM is a Python port of the TDLM R package, with numpy-based implementations and parallel processing support for multiple exponent values.

Installation

Using conda

conda install -c conda-forge pytdlm

Using pip

pip install PyTDLM

From source

git clone https://github.com/PyTDLM/TDLM.git
cd PyTDLM
pip install -e .

Citation

If you use this library in your research, please cite: [Reference to come].

@software{PyTDLM,
  author = {Perrier, R., Gargiulo, G., Jayet, C. and Lenormand, M.},
  title = {PyTDLM: Systematic comparison of trip distribution laws and models in Python},
  year = {2025},
  note = {Reference forthcoming}
}