Skip to main content

PedPy is a Python module for pedestrian movement analysis.

Project description

PedPy Logo

PyPI Latest Release PyPI - Python Version DOI License Downloads ci workflow codecov Ruff Documentation Status OpenSSF Best Practices fair-software.eu JuRSE Code Pick – July 2025

PedPy

PedPy is a Python library for quantitative analysis of pedestrian dynamics from trajectory data.

It provides a high-level interface for extracting fundamental measures (density, velocity, flow) and advanced analyses such as Voronoi-based methods, profiles, and pair-distribution functions, which can be combined to derive fundamental diagrams.

Features

  • Compute core pedestrian measures: density, velocity, flow
  • Advanced analyses: Voronoi-based density, profiles, pair-distribution functions
  • Directly load trajectory data from multiple tools: Crowdit, Viswalk, JuPedSim, Vadere, Pathfinder
  • Easy-to-use API for loading, processing, and visualizing data
  • Built-in plotting for quick inspection and comparison of results
  • Open-source, tested, and aligned with FAIR and OpenSSF best practices

Getting Started

Installation

PedPy requires Python >= 3.11. It is recommended to use a virtual environment.

Install the latest stable release from PyPI:

python3 -m pip install pedpy

To install the latest development version from the repository:

python3 -m pip install --force-reinstall git+https://github.com/PedestrianDynamics/PedPy.git

[!IMPORTANT] The latest repository version may be unstable. Use with caution.

Quickstart

from pedpy import *

# Load trajectory data from file
traj = load_trajectory(
  trajectory_file=pathlib.Path("some_trajectory_data.txt")
)

# Create measurement area
measurement_area = MeasurementArea(
  [(-0.4, 0.5), (0.4, 0.5), (0.4, 1.3), (-0.4, 1.3)]
)

# Compute classic density in the measurement area
classic_density = compute_classic_density(
    traj_data=traj, measurement_area=measurement_area
)

plot_density(density=classic_density, title="Classic density")

See the Getting Started Guide for a step-by-step introduction. A more extensive documentation and demonstration of PedPy's capabilities can be found in the User Guide.

Usage

PedPy is designed to be used in scripts or interactive Jupyter notebooks.

  • Explore getting started, user guide, and fundamental diagram notebooks.

  • For local usage, clone the repository and install the extra requirements for notebooks and plotting:

    git clone https://github.com/PedestrianDynamics/pedpy.git
    python3 -m pip install jupyter matplotlib
    

    Then start a Jupyter server:

    jupyter notebook
    

Example Visualizations

Bottleneck Setup Example Voronoi-based Density Analysis Speed-Density Profile
Density Comparison Methods Time-Distance Analysis

Documentation

Citation

If you use PedPy in your work, please cite:

DOI

For the latest release (v.1.3.2) the BibTeX entry is:

@software{schrodter_2025_15337052,
  author       = {Schrödter, Tobias and
                  The PedPy Development Team},
  title        = {PedPy - Pedestrian Trajectory Analyzer},
  month        = may,
  year         = 2025,
  publisher    = {Zenodo},
  version      = {v1.3.2},
  doi          = {10.5281/zenodo.15337052},
  url          = {https://doi.org/10.5281/zenodo.15337052},
}

If you used a different version, please use Zenodo to get the citation information.

Contributing

Contributions are welcome and we are looking forward to any contribution from the community! Take a look at our Developer Guide to check out different ways to contribute to PedPy. See the contributing guidelines and open an issue or pull request on GitHub.

Getting Help

If you find yourself in a position where you need assistance from us, don't hesitate to contact us.

  • GitHub Issues: Report bugs or unexpected behavior
  • GitHub Discussions: Ask questions, share ideas, request features

License

PedPy is released under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pedpy-1.5.0.tar.gz (79.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pedpy-1.5.0-py3-none-any.whl (92.8 kB view details)

Uploaded Python 3

File details

Details for the file pedpy-1.5.0.tar.gz.

File metadata

  • Download URL: pedpy-1.5.0.tar.gz
  • Upload date:
  • Size: 79.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pedpy-1.5.0.tar.gz
Algorithm Hash digest
SHA256 2adc27c49a2d72379dc0478c21500aa5c197e776ca1b513d685f73a3d3bbf0cc
MD5 11346012448439a40ae35f0f0bbe2fd2
BLAKE2b-256 0b2bbad2f19e0aba86c76dfd5fbcff8f8b8e2d98dfb02fed7046146c774e2bac

See more details on using hashes here.

File details

Details for the file pedpy-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: pedpy-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 92.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pedpy-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f307072f2fd59bf1ae571d2b074b60e00189886c404d8b13c5811774799f2497
MD5 90f718629ede4fdeaa2b1aeff813a4b1
BLAKE2b-256 c7347b0de470d610dfc470bb41d68c06b4fa05e497c44002e675047e24a708c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page