MovingPandas

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

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: https://github.com/conda-forge/gdal-feedstock/issues/269#issuecomment-473661530

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

GitHub

https://github.com/anitagraser/movingpandas