MarciaFG / movingpandas

Implementation of Trajectory classes and functions built on top of GeoPandas

Home Page:http://movingpandas.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MovingPandas

Project Status: Active – The project has reached a stable, usable state and is being actively developed. build status docs status codecov DOI pyOpenSci

MovingPandas implements a Trajectory class and corresponding methods based on GeoPandas.

Visit movingpandas.org for details!

You can try MovingPandas in a MyBinder notebook - no installation required: Binder

Documentation

The official documentation is hosted on ReadTheDocs

Examples

Trajectory plots

movingpandas_animated

Stop detection

movingpandas_stop_detection_clip

Trajectory aggregation

movingpandas_ais

Installation

MovingPandas for Python >= 3.7 and all it's dependencies are available from conda-forge and can be installed using conda install -c conda-forge movingpandas.

Conda status

Conda Recipe Conda Downloads Conda Version Conda Platforms

Note that it is NOT recommended to install MovingPandas from PyPI! If you're on Windows or Mac, many GeoPandas / MovingPandas dependencies cannot be pip installed (for details see the corresponding notes in the GeoPandas documentation). On Ubuntu, pip install fails 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

Linux/Mac:

conda env create -f environment.yml

Windows:

conda config --add channels conda-forge
conda config --add channels defaults
conda config --set channel_priority strict
conda env create -f environment.yml

On Windows, because conda-forge relies on some package built with defaults blas (like scipy) one must use the defaults channel on top of conda-forge and activate conda's new strict channel feature. Source: conda-forge/gdal-feedstock#269 (comment)

Using Anaconda

  1. Install Anaconda
  2. Clone the movingpandas repository
  3. In Anaconda Navigator | Environments | Import select the movingpandas environment.yml from the cloned directory:

image

  1. Wait until the environment is ready, then change to the Home tab and install Jupyter notebooks into the movingpandas environment
  2. Launch Jupyter notebooks and navigate to the movingpandas/tutorials directory to execute them
  3. Now you can run the notebooks, experiment with the code and adjust it to your own data

Known issues:

  • On Windows, importing rasterio can lead to DLL errors. If this happens, downgrade the rasterio version to 1.0.13.

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

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.

Citation information

Please cite [0] when using MovingPandas in your research.

All releases of MovingPandas have DOIs via Zenodo: https://doi.org/10.5281/zenodo.3710950

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.

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

Referencing MovingPandas

Full Google Scholar list

Workshop Videos

WorkshopVideo

About

Implementation of Trajectory classes and functions built on top of GeoPandas

http://movingpandas.org

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 53.6%Language:Jupyter Notebook 46.4%