Detect stops in trajectories, extract them as points or segments, and use them to split trajectories
Trajectory generalization
Generalize trajectories using spatial, temporal, and spatiotemporal methods
Trajectory cleaning & smoothing
Clean and sooth trajectories by removing outliers and applying Kalman filters
Trajectory aggregation
Aggregate trajectories to explore larger patterns
Installation
MovingPandas for Python >= 3.9 and all its dependencies are available from conda-forge and can be installed using
conda install -c conda-forge movingpandas
or faster using
mamba install -c conda-forge movingpandas
Note that it is NOT recommended to install MovingPandas from PyPI!
If you are using Windows or Mac, many GeoPandas / MovingPandas dependencies may not install correctly with pip
(for details see the corresponding notes in the GeoPandas documentation).
On Ubuntu, pip install may fail, e.g. on cartopy with "Proj 4.9.0 must be installed".
Development installation
Use the following steps to install MovingPandas in "develop" or "editable" mode and run the notebooks using the current development version:
scikit-mobility is a similar package which also deals with movement data.
It implements TrajectoryDataFrames and FlowDataFrames on top of Pandas instead of GeoPandas.
There is little overlap in the covered use cases and implemented functionality (comparing
MovingPandas tutorials and
scikit-mobility tutorials).
MovingPandas focuses on spatio-temporal data exploration with corresponding functions for data manipulation and analysis.
scikit-mobility on the other hand focuses on computing human mobility metrics, generating synthetic trajectories
and assessing privacy risks. Plotting is based on Folium.
Traja extends the capabilitis of Pandas DataFrames specific for animal trajectory analysis in 2D. Plots (static) are based on seaborn.
PyMove provides functionality similar to MovingPandas.
It implements PandasMoveDataFrames and DaskMoveDataFrame on top of Pandas and Dask DataFrames. Plotting is based on Folium.
Tracktable is a related Python package with its core data structures and algorithms implemented in C++, i.e. it is not based on Pandas. Plotting is based on Cartopy (for still images) and Folium (for interactive rendering).
Citation information
Please cite [0] when using MovingPandas in your research and reference the appropriate release version. All releases of MovingPandas are listed on Zenodo where you will find citation information, including DOIs.
[Lei, J., Chu, Z., Wu, Y., Liu, X., Luo, M., He, W., & Liu, C. (2024). Predicting vessel arrival times on inland waterways: A tree-based stacking approac