Skip to content

Latest commit

 

History

History
232 lines (138 loc) · 18.8 KB

README.md

File metadata and controls

232 lines (138 loc) · 18.8 KB

MovingPandas

pypi Conda Version Conda Downloads Conda Recipe Conda Platforms Project Status: Active – The project has reached a stable, usable state and is being actively developed. Tests docs status codecov DOI pyOpenSci Code style: black StandWithUkraine Mastodon Follow

SWUbanner

MovingPandas is a Python library for movement data exploration and analysis.

MovingPandas provides trajectory data structures and functions for handling movement data based on Pandas, GeoPandas, and HoloViz.

Visit movingpandas.org for details!

You can run MovingPandas examples on MyBinder - no installation required: Binder (These examples use the latest MovingPandas release version.)

To try the cutting-edge dev version, use this MyBinder link.

Documentation

We recommend starting your MovingPandas journey with the tutorial notebooks on the official homepage

The official API documentation is hosted on ReadTheDocs

Examples

Trajectory plots

Create interactive trajectory plots using Folium and Geoviews with ease

image

Including multiple linked plots View Jupyter Notebook

movingpandas_animated

For all types of tracking data, e.g. video-based trajectories

Bicycle tracks from object tracking in videos

Including plots in custom projections View Jupyter Notebook

MovingPandas Iceberg trajectory in custom SouthPolarStereo projection

Stop detection View Jupyter Notebook

Detect stops in trajectories, extract them as points or segments, and use them to split trajectories

movingpandas_stop_detection

Trajectory generalization View Jupyter Notebook

Generalize trajectories using spatial, temporal, and spatiotemporal methods

movingpandas_generalize

Trajectory cleaning & smoothing View Jupyter Notebook

Clean and sooth trajectories by removing outliers and applying Kalman filters

movingpandas smooth

Trajectory aggregation View Jupyter Notebook

Aggregate trajectories to explore larger patterns

movingpandas_ais

Installation

MovingPandas for Python >= 3.7 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 run the notebooks using the current development version:

Using conda / mamba

conda env create -f environment.yml

Develop mode

To install MovingPandas in "develop" or "editable" mode you may use:

python setup.py develop

Contributing to MovingPandas GitHub contributors

All contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome.

A detailed overview on how to contribute can be found in the contributing guide on GitHub.

Related Python packages

For a more comprehensive list, including non-Python solutions, check https://github.com/anitagraser/movement-analysis-tools

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.

Publications

About MovingPandas

[0] Graser, A. (2019). MovingPandas: Efficient Structures for Movement Data in Python. GI_Forum ‒ Journal of Geographic Information Science 2019, 1-2019, 54-68. doi:10.1553/giscience2019_01_s54.

@article{graser_movingpandas_2019,
	title = {{MovingPandas}: {Efficient} {Structures} for {Movement} {Data} in {Python}},
	volume = {7},
	number = {1},
	issn = {2308-1708, 2308-1708},
	shorttitle = {{MovingPandas}},
	url = {https://hw.oeaw.ac.at?arp=0x003aba2b},
	doi = {10.1553/giscience2019_01_s54},
	language = {en},
	urldate = {2023-04-19},
	journal = {GI\_Forum ‒ Journal of Geographic Information Science},
	author = {Graser, Anita},
	year = {2019},
	pages = {54--68},
}

[1] Graser, A. & Dragaschnig, M. (2020). Exploring movement data in notebook environments. Presented at MoVIS 2020, IEEE VIS 2020.

[2] Graser, A. (2021). Exploratory Movement Data Analysis. GeoPython 2021. – 🎬 video

Scientific publications using MovingPandas

Full Google Scholar list

Platforms using MovingPandas

Teaching materials referencing MovingPandas

Workshop videos

WorkshopVideo ogh2023