Skip to main content

Implementation of Trajectory classes and functions built on top of GeoPandas

Project description

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

movingpandas_animated 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.

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

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.

Publications

[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. URL: https://www.austriaca.at/rootcollection?arp=0x003aba2b

[1] Graser, A. (2019). Analyzing Movement Data with MovingPandas. Workshop at the OpenGeoHub summer school, Münster, Germany.

[2] Graser, A. & Dragaschnig, M. (2020). Open Geospatial Tools for Movement Data Exploration. KN ‒ Journal of Cartography and Geographic Information, 70(1), 3-10. doi:10.1007/s42489-020-00039-y.

WorkshopVideo

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

movingpandas-0.4rc1.tar.gz (27.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page