Git Product home page Git Product logo

movingpandas's Introduction

MovingPandas

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

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

Binder build status docs status

trajectory_manager_v1

Documentation

The official documentation is hosted on ReadTheDocs: https://movingpandas.readthedocs.io

Introduction

Common Simple Features-based data models where trajectories consist of geometries with timestamps can be readily implemented in GIS environments, but they suffer from a lack of support for the temporal dimension, such as functions for duration and speed.

In stark contrast, the Pandas data analysis library has been developed with a strong focus on time series. By choosing Pandas data structures (1D series and 2D DataFrames) as a base for MovingPandas, we gain access to the library’s built-in functionality, including: flexible indexing on timestamps and other column types; memory-efficient sparse data structures for data that is mostly missing or mostly constant; an integrated ‘group by’ engine for aggregating and transforming datasets, and moving window statistics (rolling mean, rolling standard deviation, etc.).

GeoPandas extends the data types that can be used in Pandas DataFrames, thus creating GeoDataFrames. Geometric operations on these spatial data types are performed by Shapely. Geopandas further depends on Fiona for file access (which enables direct reading of GeoDataFrames from common spatial file formats, such as GeoPackage or Shapefile), and descartes and matplotlib for plotting.

MovingPandas uses the following terminology. A trajectory is, or more correctly has, a time-ordered series of geometries. These geometries and associated attributes are stored in a GeoDataFrame df. Furthermore, a trajectory can have a parent trajectory and can itself be the parent of successive trajectories. Raw unsegmented streams of movement data, as well as semantically meaningful subsections or other subsections, can therefore be represented as trajectories. Depending on the use case, the trajectory object can access a point-based or a line-based representation of its data. (Source: [0])

Installation

Movingpandas for Python >= 3.7 is available from PyPI and can be installed using pip install movingpandas

If you're on Windows, however, many GeoPandas / MovingPandas dependencies cannot be pip installed (for details see the corresponding notes in the GeoPandas documentation). Therefore, Windows users are encouraged to use the MovingPandas conda package.

Development Installation

Use the following steps to run the notebooks using the current development version:

  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.

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.

WorkshopVideo

movingpandas's People

Contributors

anitagraser avatar gprichter avatar javibecerra avatar ocefpaf avatar parnelandr avatar rlukevie avatar robinlovelace avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.