Skip to content

Commit 4856920

Browse files
schroedtertchraibi
andauthored
Modernize Readme (#461)
Co-authored-by: Mohcine Chraibi <m.chraibi@fz-juelich.de>
1 parent aeacffc commit 4856920

8 files changed

Lines changed: 122 additions & 50 deletions

README.md

Lines changed: 122 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,172 @@
1-
21
<div align="center">
3-
<img src="docs/source/_static/logo_text.svg" height="100px" alt="PedPy Logo">
2+
<img src="https://raw.githubusercontent.com/PedestrianDynamics/PedPy/refs/heads/main/docs/source/_static/logo_text.svg" height="100px" alt="PedPy Logo">
43
</div>
54

6-
-----------------
5+
<div align="center">
6+
77
[![PyPI Latest Release](https://img.shields.io/pypi/v/pedpy.svg)](https://pypi.org/project/pedpy/)
88
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pedpy)
99
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7194992.svg)](https://doi.org/10.5281/zenodo.7194992)
1010
[![License](https://img.shields.io/pypi/l/pedpy.svg)](https://github.com/PedestrianDynamics/pedpy/blob/main/LICENSE)
11-
![ci workflow](https://github.com/PedestrianDynamics/pedestrian-trajectory-analyzer/actions/workflows/ci.yml/badge.svg)
11+
![ci workflow](https://github.com/PedestrianDynamics/PedPy/actions/workflows/ci.yml/badge.svg)
1212
[![codecov](https://codecov.io/gh/PedestrianDynamics/PedPy/graph/badge.svg?token=X5C9NTKAVK)](https://codecov.io/gh/PedestrianDynamics/PedPy)
1313
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
1414
[![Documentation Status](https://readthedocs.org/projects/pedpy/badge/?version=latest)](http://pedpy.readthedocs.io/?badge=latest)
1515
[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/7046/badge)](https://bestpractices.coreinfrastructure.org/projects/7046)
1616
[![fair-software.eu](https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F-green)](https://fair-software.eu)
1717
[![JuRSE Code Pick – July 2025](https://img.shields.io/badge/JuRSE_Code_Pick-Jul_2025-blue)](https://www.fz-juelich.de/en/rse/jurse-community/jurse-code-of-the-month/july-2025)
1818

19-
# PedPy: Analysis of pedestrian dynamics based on trajectory files.
19+
</div>
2020

21-
*PedPy* is a python module for pedestrian movement analysis.
22-
It implements different measurement methods for density, velocity and flow.
21+
# PedPy
2322

24-
If you use *PedPy* in your work, please cite it using the following information from zenodo:
23+
**PedPy** is a Python library for quantitative analysis of pedestrian dynamics from trajectory data.
2524

26-
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7194992.svg)](https://doi.org/10.5281/zenodo.7194992)
25+
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.
2726

2827

29-
## Getting started
28+
## Features
3029

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

33-
For setting up your Python Environment a Python version >= 3.11 is recommended (our code is tested with 3.11, 3.12, and 3.13).
34-
To avoid conflicts with other libraries/applications the usage of virtual environments is recommended, see [Python Documentation](https://docs.python.org/3/library/venv.html) for more detail.
37+
## Getting Started
3538

36-
### Installing PedPy
39+
### Installation
40+
41+
**PedPy** requires Python >= 3.11.
42+
It is recommended to use a [virtual environment](https://docs.python.org/3/library/venv.html).
43+
44+
Install the latest stable release from PyPI:
3745

38-
To install the latest **stable** version of *PedPy* and its dependencies from PyPI:
3946
```bash
4047
python3 -m pip install pedpy
4148
```
4249

43-
You can also install the latest version of *PedPy* directly from the repository, by following these steps:
50+
To install the latest development version from the repository:
4451

45-
1. Uninstall an installed version of *PedPy*:
4652
```bash
47-
python3 -m pip uninstall pedpy
53+
python3 -m pip install --force-reinstall git+https://github.com/PedestrianDynamics/PedPy.git
4854
```
4955

50-
2. Install latest version of *PedPy* from repository:
51-
```
52-
python3 -m pip install git+https://github.com/PedestrianDynamics/PedPy.git
56+
> [!IMPORTANT]
57+
> The latest repository version may be unstable. Use with caution.
58+
59+
### Quickstart
60+
61+
```python
62+
from pedpy import *
63+
64+
# Load trajectory data from file
65+
traj = load_trajectory(
66+
trajectory_file=pathlib.Path("some_trajectory_data.txt")
67+
)
68+
69+
# Create measurement area
70+
measurement_area = MeasurementArea(
71+
[(-0.4, 0.5), (0.4, 0.5), (0.4, 1.3), (-0.4, 1.3)]
72+
)
73+
74+
# Compute classic density in the measurement area
75+
classic_density = compute_classic_density(
76+
traj_data=traj, measurement_area=measurement_area
77+
)
78+
79+
plot_density(density=classic_density, title="Classic density")
5380
```
5481

82+
See the [Getting Started Guide](https://pedpy.readthedocs.io/stable/getting_started.html) for a step-by-step introduction.
83+
A more extensive documentation and demonstration of **PedPy**'s capabilities can be found in the [User Guide](https://pedpy.readthedocs.io/stable/user_guide.html).
84+
85+
5586
### Usage
5687

57-
For first time users, have a look at the [getting started notebook](notebooks/getting_started.ipynb), as it shows the first steps to start an analysis with *PedPy*.
58-
A more detailed overview of *PedPy* is demonstrated in the [user guide notebook](notebooks/user_guide.ipynb).
59-
The [fundamental diagram notebook](notebooks/fundamental_diagram.ipynb) shows how to use *PedPy* for computing the fundamental diagram of a series of experiments.
88+
PedPy is designed to be used in scripts or interactive Jupyter notebooks.
6089

61-
#### Interactive online session
90+
- Explore [getting started](notebooks/getting_started.ipynb), [user guide](https://github.com/PedestrianDynamics/PedPy/blob/main/notebooks/user_guide.ipynb), and [fundamental diagram](https://github.com/PedestrianDynamics/PedPy/blob/main/notebooks/fundamental_diagram.ipynb) notebooks.
91+
- For local usage, clone the repository and install the extra requirements for notebooks and plotting:
6292

63-
If you want to try out *PedPy* for the first time, you can find an interactive online environments for both notebooks here:
93+
```bash
94+
git clone https://github.com/PedestrianDynamics/pedpy.git
95+
python3 -m pip install jupyter matplotlib
96+
```
6497

65-
- Getting started: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/PedestrianDynamics/PedPy/main?labpath=notebooks%2Fgetting_started.ipynb)
66-
- User guide: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/PedestrianDynamics/PedPy/main?labpath=notebooks%2Fuser_guide.ipynb)
67-
- Fundamental diagram: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/PedestrianDynamics/PedPy/main?labpath=notebooks%2Ffundamental_diagram.ipynb)
98+
Then start a Jupyter server:
6899

69-
**Note:**
70-
The execution might be slower compared to a local usage, as only limited resources are available.
71-
It is possible to also upload different trajectory files and run the analysis completely online, but this might not be advisable for long computations.
100+
```bash
101+
jupyter notebook
102+
```
72103

73-
#### Local usage of the notebooks
104+
## Example Visualizations
74105

75-
For local usage of the notebooks, you can either download the notebooks and [demo files](notebooks/demo-data) from the GitHub repository or clone the whole repository with:
76-
```bash
77-
git clone https://github.com/PedestrianDynamics/pedpy.git
78-
```
79106

80-
For using either of the notebook some additional libraries need to be installed, mainly for plotting.
81-
You can install the needed libraries with:
107+
<div align="center">
108+
<table style="border-collapse: collapse; border: none;">
109+
<tr style="border: none;">
110+
<td style="border: none;"><img src="https://raw.githubusercontent.com/PedestrianDynamics/PedPy/refs/heads/main/figs/bottleneck_setup.png" width="400" alt="Bottleneck Setup Example"/></td>
111+
<td style="border: none;">
112+
<img src="https://raw.githubusercontent.com/PedestrianDynamics/PedPy/refs/heads/main/figs/voronoi_cells.png" width="400" alt="Voronoi-based Density Analysis"/>
113+
<img src="https://raw.githubusercontent.com/PedestrianDynamics/PedPy/refs/heads/main/figs/speed_density_profile.png" width="400" alt="Speed-Density Profile"/>
114+
</td>
115+
</tr>
116+
</table>
117+
<table style="border-collapse: collapse; border: none;">
118+
<tr style="border: none;">
119+
<td style="border: none;" width="50%"><img src="https://raw.githubusercontent.com/PedestrianDynamics/PedPy/refs/heads/main/figs/density_comparison.png" width="500" alt="Density Comparison Methods"/></td>
120+
<td style="border: none;" width="50%"><img src="https://raw.githubusercontent.com/PedestrianDynamics/PedPy/refs/heads/main/figs/time_distance.png" width="500" alt="Time-Distance Analysis"/></td>
121+
</tr>
122+
</table>
123+
</div>
82124

83-
```bash
84-
python3 -m pip install jupyter matplotlib
85-
```
86125

87-
Afterward, you can start a jupyter server with:
126+
## Documentation
88127

89-
```bash
90-
jupyter notebook
128+
- [Full Documentation](https://pedpy.readthedocs.io/)
129+
- [Getting Started Guide](https://pedpy.readthedocs.io/stable/getting_started.html)
130+
- [Extensive User Guide](https://pedpy.readthedocs.io/stable/user_guide.html)
131+
- [API Reference](https://pedpy.readthedocs.io/stable/api/index.html)
132+
133+
134+
## Citation
135+
136+
If you use **PedPy** in your work, please cite:
137+
138+
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7194992.svg)](https://doi.org/10.5281/zenodo.7194992)
139+
140+
For the latest release (v.1.3.2) the BibTeX entry is:
141+
```
142+
@software{schrodter_2025_15337052,
143+
author = {Schrödter, Tobias and
144+
The PedPy Development Team},
145+
title = {PedPy - Pedestrian Trajectory Analyzer},
146+
month = may,
147+
year = 2025,
148+
publisher = {Zenodo},
149+
version = {v1.3.2},
150+
doi = {10.5281/zenodo.15337052},
151+
url = {https://doi.org/10.5281/zenodo.15337052},
152+
}
91153
```
92154
93-
After navigating to one of the notebooks, you can see how the library can be used for different kinds of analysis.
155+
If you used a different version, please use Zenodo to get the citation information.
156+
157+
## Contributing
158+
159+
Contributions are welcome and we are looking forward to any contribution from the community!
160+
Take a look at our [Developer Guide](https://pedpy.readthedocs.io/stable/developer_guide.html) to check out different ways to contribute to **PedPy**.
161+
See the [contributing guidelines](CONTRIBUTING.md) and open an issue or pull request on [GitHub](https://github.com/PedestrianDynamics/PedPy/issues).
162+
163+
## Getting Help
164+
165+
If you find yourself in a position where you need assistance from us, don't hesitate to contact us.
166+
- GitHub Issues: Report bugs or unexpected behavior
167+
- GitHub Discussions: Ask questions, share ideas, request features
94168
95-
Some examples how the computed values can be visualized are also shown in the notebooks, e.g., density/velocity profiles, fundamental diagrams, N-T-diagrams, etc.
169+
## License
96170
97-
![voronoi](figs/voronoi_diagrams.png)
171+
**PedPy** is released under the [MIT License](LICENSE).
98172
99-
![density](figs/density_comparison.png)

figs/bottleneck_setup.png

317 KB
Loading

figs/density_comparison.png

-554 KB
Loading

figs/speed_density_profile.png

80.1 KB
Loading

figs/time_distance.png

472 KB
Loading

figs/voronoi_cells.png

240 KB
Loading

figs/voronoi_diagrams.png

-329 KB
Binary file not shown.

runtime.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)