Skip to main content

A lib python to processing and visualization of trajectories and other spatial-temporal data

Project description

Use PyMove and go much further


Information

Package Status
License
Python Version
Platforms
Build Status
PyPi version
PyPi Downloads
Conda version
Conda Downloads
Code Quality
Code Coverage

What is PyMove

PyMove is a Python library for processing and visualization of trajectories and other spatial-temporal data.

We will also release wrappers to some useful Java libraries frequently used in the mobility domain.

Read the full documentation on ReadTheDocs


Main Features

PyMove proposes:

  • A familiar and similar syntax to Pandas;

  • Clear documentation;

  • Extensibility, since you can implement your main data structure by manipulating other data structures such as Dask DataFrame, numpy arrays, etc., in addition to adding new modules;

  • Flexibility, as the user can switch between different data structures;

  • Operations for data preprocessing, pattern mining and data visualization.


Creating a Virtual Environment

It is recommended to create a virtual environment to use pymove.

Requirements: Anaconda Python distribution installed and accessible

  1. In the terminal client enter the following where env_name is the name you want to call your environment, and replace x.x with the Python version you wish to use. (To see a list of available python versions first, type conda search "^python$" and press enter.)

    • conda create -n <env_name> python=x.x

    • Press y to proceed. This will install the Python version and all the associated anaconda packaged libraries at path_to_your_anaconda_location/anaconda/envs/env_name

  2. Activate your virtual environment. To activate or switch into your virtual environment, simply type the following where yourenvname is the name you gave to your environment at creation.

    • conda activate <env_name>
  3. Now install the package from either conda, pip or github


Conda instalation

  1. conda install -c conda-forge pymove

Pip installation

  1. pip install pymove

Github installation

  1. Clone this repository

    • git clone https://github.com/InsightLab/PyMove
  2. Switch to folder PyMove

    • cd PyMove
  3. Switch to a new branch

    • git checkout -b developer
  4. Make a pull of branch

    • git pull origin developer
  5. Install pymove in developer mode

    • make dev

For windows users

If you installed from pip or github, you may encounter an error related to shapely due to some dll dependencies. To fix this, run conda install shapely.


Examples

You can see examples of how to use PyMove here


Mapping PyMove methods with the Paradigms of Trajectory Data Mining

ZHENG 2015.

  • 1: Spatial Trajectoriespymove.core

    • MoveDataFrame
    • DiscreteMoveDataFrame
  • 2: Stay Point Detectionpymove.preprocessing.stay_point_detection

    • create_or_update_move_stop_by_dist_time
    • create_or_update_move_and_stop_by_radius
  • 3: Map-Matchingpymove-osmnx

  • 4: Noise Filteringpymove.preprocessing.filters

    • by_bbox
    • by_datetime
    • by_label
    • by_id
    • by_tid
    • clean_consecutive_duplicates
    • clean_gps_jumps_by_distance
    • clean_gps_nearby_points_by_distances
    • clean_gps_nearby_points_by_speed
    • clean_gps_speed_max_radius
    • clean_trajectories_with_few_points
    • clean_trajectories_short_and_few_points
    • clean_id_by_time_max
  • 5: Compressionpymove.preprocessing.compression

    • compress_segment_stop_to_point
  • 6: Segmentationpymove.preprocessing.segmentation

    • bbox_split
    • by_dist_time_speed
    • by_max_dist
    • by_max_time
    • by_max_speed
  • 7: Distance Measurespymove.distances

    • medp
    • medt
    • euclidean_distance_in_meters
    • haversine
  • 8: Query Historical Trajectoriespymove.query.query

    • range_query
    • knn_query
  • 9: Managing Recent Trajectories

  • 10: Privacy Preserving

  • 11: Reducing Uncertainty

  • 12: Moving Together Patterns

  • 13: Clusteringpymove.models.pattern_mining.clustering

    • elbow_method
    • gap_statistics
    • dbscan_clustering
  • 14: Freq. Seq. Patterns

  • 15: Periodic Patterns

  • 16: Trajectory Classification

  • 17: Trajectory Outlier / Anomaly Detectionpymove.semantic.semantic

    • outliers
    • create_or_update_out_of_the_bbox
    • create_or_update_gps_deactivated_signal
    • create_or_update_gps_jump
    • create_or_update_short_trajectory
    • create_or_update_gps_block_signal
    • filter_block_signal_by_repeated_amount_of_points
    • filter_block_signal_by_time
    • filter_longer_time_to_stop_segment_by_id

Cite

The library was originally created during the bachelor's thesis of 2 students from the Federal University of Ceará, so you can cite using both works.

@mastersthesis{arina2019,
	title        = {Uma arquitetura e implementação do módulo de pré-processamento para biblioteca PyMove},
	author       = {Arina De Jesus Amador Monteiro Sanches},
	year         = 2019,
	school       = {Universidade Federal Do Ceará},
	type         = {Bachelor's thesis}
}
@mastersthesis{andreza2019,
	title        = {Uma arquitetura e implementação do módulo de visualização para biblioteca PyMove},
	author       = {Andreza Fernandes De Oliveira},
	year         = 2019,
	school       = {Universidade Federal Do Ceará},
	type         = {Bachelor's thesis}
}

Publications


Useful list of related libraries and links

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

pymove-3.0.1.tar.gz (506.7 kB view details)

Uploaded Source

Built Distribution

pymove-3.0.1-py3-none-any.whl (400.4 kB view details)

Uploaded Python 3

File details

Details for the file pymove-3.0.1.tar.gz.

File metadata

  • Download URL: pymove-3.0.1.tar.gz
  • Upload date:
  • Size: 506.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pymove-3.0.1.tar.gz
Algorithm Hash digest
SHA256 a773b9c5017afd4f1db69691dc699a77d97ef0281540004c5dcfee2e1818360c
MD5 d3e9a8e2fdcd0f300f182e166760c59a
BLAKE2b-256 60126d4cfad5966685ce359f3f21ae0a4ca6ced2cf00dce7b728b3ddb12aae57

See more details on using hashes here.

File details

Details for the file pymove-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: pymove-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 400.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pymove-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2aa1efc3867b8c685afaee9a2896f2f219680c8df0be057491ecebe6854e98ba
MD5 f470305413ab6c1c7828fe14e25780c7
BLAKE2b-256 dc9429812762915f5c8267b1f4bb78b4ab3fe4ffabea54c08d9b0447ca53daaa

See more details on using hashes here.

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