PyMove is a Python library to simplify queries and visualization of trajectories and other spatial-temporal data

Overview

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

Comments
  • Visualizaçoes

    Visualizaçoes

    • [x] HeatMap (https://towardsdatascience.com/data-101s-spatial-visualizations-and-analysis-in-python-with-folium-39730da2adf)
    • [x] HeatMapWithTime (https://towardsdatascience.com/data-101s-spatial-visualizations-and-analysis-in-python-with-folium-39730da2adf)
    • [x] Plotagem de uma trajectory/lista de pontos sob o mapa (https://deparkes.co.uk/2016/06/03/plot-lines-in-folium/) -> botar as setinhas de direção
    • [x] Clustered marker

    OBS

    • [x] Delimitar escopo da plotagem se for muito dado- por exemplo por janela de tempo, por boundbox e tempo
    • [x] Opcao de gerar .html
    • [x] Opcao de mostrar no jupyter
    • [x] Opcao de printar o id e o datetime de cada ponto

    Fontes

    • https://blog.dominodatalab.com/creating-interactive-crime-maps-with-folium/
    • https://towardsdatascience.com/data-101s-spatial-visualizations-and-analysis-in-python-with-folium-39730da2adf
    • https://deparkes.co.uk/2016/06/03/plot-lines-in-folium/
    • https://blog.dominodatalab.com/creating-interactive-crime-maps-with-folium/
    opened by AndyFernandes 3
  • Padronização funções.

    Padronização funções.

    • [x] Tirar dúvidas das operações de memória e tempo com Nicksson.
    • [x] Verificar se as colunas com a outro nome dá certo ou ele trava.
    • [x] Padronização dos imports
    • [x] Terminar de documentar as funções
    • [x] Verificar se as funções estão de acordo com PEP 8
    • [x] Revisar documentação das funções => Verificar se estão completas e legíveis.
    • [x] Verificar se realmente todas as funções que chamavam create_update_... => generate_...
    • [x] Padronização dos init
    • [x] Limpeza do código
    • [x] Verificar TODOs
    • [x] Ajeitar notebooks em seções e organiza-los em pastas.
    enhancement 
    opened by AndyFernandes 3
  • How to Cite Cite PyMove in an academic paper?

    How to Cite Cite PyMove in an academic paper?

    I am along with other contributors, writing an evaluation of PyMove library in an academic paper and we want to cite the authors. Can you please help us with the citation?

    opened by YakshHaranwala 2
  • Verbose

    Verbose

    Types of changes

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [X] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] I have read the CONTRIBUTING document.
    • [ ] My code follows the code style of this project (see .code-style.md).
    • [X] All new and existing tests passed (see .testing.md).
    • [ ] I have added tests to cover my changes.
    • [ ] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly (see .documentation.md).

    Description

    • What is the current behavior? (You can also link to an open issue here) see #177

    • What is the new behavior (if this is a feature change)? Added a utils.log.logger to control logging. INFO shows only useful information, like progress bars DEBUG shows information from various steps in the functions WARN hides all output except warnings and errors Default behaviour shows is INFO. Can be controlled with utils.log.set_verbose or by creating an environment variable PYMOVE_VERBOSE

    closes #177

    opened by mxaviersmp 2
  • Ajustes nas funções de core.dataframe

    Ajustes nas funções de core.dataframe

    Sugestões de alterações dos locais das funções, parâmetros e padronização de semelhantes

    • [x] generate_day_of_the_week, generate_time_of_day => padronizar os nomes das colunas para caixa baixa ou capitalizados

    • [x] generate_time_of_day => trecho do print está mal formatado

    • [x] generate_datetime_in_format_cyclical => não esta perto de outros geradores de features que usam datetime

    • [x] generate_weekend_features =>

      • [x] não esta perto de outros geradores de features que usam datetime
      • [x] create_day_of_week=True não funciona
      • [x] não retorna dataframe indicando fds se inplace=False
      • [x] executar mais de uma vez levanta erro
        AttributeError: 'DataFrame' object has no attribute 'delete'
        
    • [x] plot_all_features, plot_trajs, plot_traj_id => padronizar parâmetros e retorno

    • [x] plot_traj_id =>

      IndexError: single positional indexer is out-of-bounds
      
    • [x] any => não existe all

    • [x] isin => existem dois métodos isin

    • [x] to_csv => não possui parametro index

    • [x] last_operation =>

      • [x] às vezes não exibe a última exibindo {'name': 'dtypes', 'time': 0, 'mem': 0}
      • [x] exibir valores de tempo e memoria de forma mais legível
    • [x] impedir que os métodos que modifiquem as colunas removam as colunas necessárias ao MoveDataFrame => dropna, drop, set_index, astype

    • [x] write_file => não esta perto de to_csv

    • [x] len => não esta perto de shape

    • [x] nomes de colunas com ' e "

    low 
    opened by mxaviersmp 2
  • Bugs

    Bugs

    • [x] Ajeitar o negocio do resources que tá comentado (solução aqui https://stackoverflow.com/questions/938733/total-memory-used-by-python-process)
    • [x] Revisar docs das funções
    • [x] Botar pra sempre retornar um objeto do tipo MoveDataFrame -> O que tá acontecendo: tenho um move dataframe, quando ponho uma operação .loc, .iloc, at ele retorna um dataframe
    • [x] Melhorar exibição de legendas no folium
    • [x] Validar colunas ao gerar dataframe.
    >>> list_data = [
                 [39.984094, 116.319236, '2008-10-23 05:53:05', 1],
                 [39.984198, 116.319322, '2008-10-23 05:53:06', 1],
                 [39.984224, 116.319402, '2008-10-23 05:53:11', 1],
                 [39.984224, 116.319402, '2008-10-23 05:53:11', 1],
                 [39.984224, 116.319402, '2008-10-23 05:53:11', 1],
                 [39.984224, 116.319402, '2008-10-23 05:53:11', 1]
    ]
    >>> move_df = pymove.PandasMoveDataFrame(data=list_data, latitude="lat", longitude="lon", datetime="datetime", traj_id="id")
    >>> print(move_df.dtypes)
    lat         float64
    lon         float64
    datetime     object
    id            int64
    dtype: object
    
    • [x] Tratar caso de dataframe sem as colunas do tipo especificado em plot_all_features
    • [x] Exibir versão correta do pymove instalado através do pip
    >>> import pymove
    >>> pymove.__version__
    '0+unknown'
    
    • [x] Corrigir erro ao ler dataframe usando pm.read_csv com coluna de data com nome não padrão
    df = pd.read_csv(filename, sep=sep, encoding=encoding, parse_dates=["datetime"])
    
    • [x] Permitir a leitura de arquivos sem header utilizando pymove.read_csv(filename)
    • [x] Erro ao instalar no windows devido ao README.md “path_to_your_anaconda_location/anaconda/envs/yourenvname”
    • [x] Erro ao importar o pymove no windows devido aos módulos pwd e resource
    • [x] Rever funções em pymove.utils.datetime
      • slot_of_day_to_time
      • slot_of_day
      • slot
      • str_to_min_slot
    • [x] Ao plotar multiplas trajetória no foliim, é exibido apenas um marcador de início e fim
    • [x] Modificar os marcadores de início e fim de trajetória para ficarem mais legíveis
    Priority 
    opened by AndyFernandes 2
  • ImportError: cannot import name 'FilePathOrBuffer' from 'pandas._typing'

    ImportError: cannot import name 'FilePathOrBuffer' from 'pandas._typing'

    Describe the bug Importing pymove raises ImportError: cannot import name 'FilePathOrBuffer' from 'pandas._typing'

    To Reproduce Steps to reproduce the behavior:

    1. Conda install pymove
    2. Run import pymove
    (pymove) PS C:\Users\anita> python
    Python 3.10.4 | packaged by conda-forge | (main, Mar 24 2022, 17:34:17) [MSC v.1929 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pymove
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "H:\miniconda3\envs\pymove\lib\site-packages\pymove\__init__.py", line 13, in <module>
        from .core.pandas import PandasMoveDataFrame
      File "H:\miniconda3\envs\pymove\lib\site-packages\pymove\core\pandas.py", line 47, in <module>
        from pymove.utils.trajectories import shift
      File "H:\miniconda3\envs\pymove\lib\site-packages\pymove\utils\trajectories.py", line 23, in <module>
        from pandas._typing import FilePathOrBuffer
    ImportError: cannot import name 'FilePathOrBuffer' from 'pandas._typing' (H:\miniconda3\envs\pymove\lib\site-packages\pandas\_typing.py)
    

    Desktop (please complete the following information):

    • OS: Win10
    (pymove) PS C:\Users\anita> conda list
    # packages in environment at H:\miniconda3\envs\pymove:
    #
    # Name                    Version                   Build  Channel
    argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
    argon2-cffi-bindings      21.2.0          py310he2412df_2    conda-forge
    asttokens                 2.0.5              pyhd8ed1ab_0    conda-forge
    attrs                     21.4.0             pyhd8ed1ab_0    conda-forge
    backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
    backports                 1.0                        py_2    conda-forge
    backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
    beautifulsoup4            4.11.1             pyha770c72_0    conda-forge
    bleach                    5.0.0              pyhd8ed1ab_0    conda-forge
    bokeh                     2.4.2           py310h5588dad_1    conda-forge
    branca                    0.4.2              pyhd8ed1ab_0    conda-forge
    brotli                    1.0.9                h8ffe710_7    conda-forge
    brotli-bin                1.0.9                h8ffe710_7    conda-forge
    brotlipy                  0.7.0           py310he2412df_1004    conda-forge
    bzip2                     1.0.8                h8ffe710_4    conda-forge
    ca-certificates           2021.10.8            h5b45459_0    conda-forge
    certifi                   2021.10.8       py310h5588dad_2    conda-forge
    cffi                      1.15.0          py310hcbf9ad4_0    conda-forge
    charset-normalizer        2.0.12             pyhd8ed1ab_0    conda-forge
    click                     8.1.2           py310h5588dad_0    conda-forge
    cloudpickle               2.0.0              pyhd8ed1ab_0    conda-forge
    colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
    convertdate               2.4.0              pyhd8ed1ab_0    conda-forge
    cryptography              36.0.2          py310ha857299_1    conda-forge
    cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
    cytoolz                   0.11.2          py310he2412df_2    conda-forge
    dask                      2022.4.1           pyhd8ed1ab_0    conda-forge
    dask-core                 2022.4.1           pyhd8ed1ab_0    conda-forge
    debugpy                   1.6.0           py310h8a704f9_0    conda-forge
    decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
    defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
    distributed               2022.4.1           pyhd8ed1ab_0    conda-forge
    entrypoints               0.4                pyhd8ed1ab_0    conda-forge
    executing                 0.8.3              pyhd8ed1ab_0    conda-forge
    flit-core                 3.7.1              pyhd8ed1ab_0    conda-forge
    folium                    0.12.1.post1       pyhd8ed1ab_1    conda-forge
    fonttools                 4.32.0          py310he2412df_0    conda-forge
    freetype                  2.10.4               h546665d_1    conda-forge
    fsspec                    2022.3.0           pyhd8ed1ab_0    conda-forge
    geohash2                  1.1                        py_0    conda-forge
    geojson                   2.5.0                      py_0    conda-forge
    geos                      3.10.2               h39d44d4_0    conda-forge
    heapdict                  1.0.1                      py_0    conda-forge
    hijri-converter           2.2.3              pyhd8ed1ab_0    conda-forge
    holidays                  0.13               pyhd8ed1ab_0    conda-forge
    idna                      3.3                pyhd8ed1ab_0    conda-forge
    importlib-metadata        4.11.3          py310h5588dad_1    conda-forge
    importlib_resources       5.7.1              pyhd8ed1ab_0    conda-forge
    intel-openmp              2022.0.0          h57928b3_3663    conda-forge
    ipykernel                 6.13.0          py310hbbfc1a7_0    conda-forge
    ipython                   8.2.0           py310h5588dad_0    conda-forge
    ipython_genutils          0.2.0                      py_1    conda-forge
    ipywidgets                7.7.0              pyhd8ed1ab_0    conda-forge
    jbig                      2.1               h8d14728_2003    conda-forge
    jedi                      0.18.1          py310h5588dad_1    conda-forge
    jinja2                    3.1.1              pyhd8ed1ab_0    conda-forge
    joblib                    1.1.0              pyhd8ed1ab_0    conda-forge
    jpeg                      9e                   h8ffe710_0    conda-forge
    jsonschema                4.4.0              pyhd8ed1ab_0    conda-forge
    jupyter_client            7.2.2              pyhd8ed1ab_1    conda-forge
    jupyter_core              4.9.2           py310h5588dad_0    conda-forge
    jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
    jupyterlab_widgets        1.1.0              pyhd8ed1ab_0    conda-forge
    kiwisolver                1.4.2           py310h476a331_1    conda-forge
    korean_lunar_calendar     0.2.1              pyh9f0ad1d_0    conda-forge
    lcms2                     2.12                 h2a16943_0    conda-forge
    lerc                      3.0                  h0e60522_0    conda-forge
    libblas                   3.9.0              14_win64_mkl    conda-forge
    libbrotlicommon           1.0.9                h8ffe710_7    conda-forge
    libbrotlidec              1.0.9                h8ffe710_7    conda-forge
    libbrotlienc              1.0.9                h8ffe710_7    conda-forge
    libcblas                  3.9.0              14_win64_mkl    conda-forge
    libdeflate                1.10                 h8ffe710_0    conda-forge
    libffi                    3.4.2                h8ffe710_5    conda-forge
    liblapack                 3.9.0              14_win64_mkl    conda-forge
    libpng                    1.6.37               h1d00b33_2    conda-forge
    libsodium                 1.0.18               h8d14728_1    conda-forge
    libtiff                   4.3.0                hc4061b1_3    conda-forge
    libwebp                   1.2.2                h57928b3_0    conda-forge
    libwebp-base              1.2.2                h8ffe710_1    conda-forge
    libxcb                    1.13              hcd874cb_1004    conda-forge
    libzlib                   1.2.11            h8ffe710_1014    conda-forge
    locket                    0.2.0                      py_2    conda-forge
    lz4                       4.0.0           py310h7b86b54_1    conda-forge
    lz4-c                     1.9.3                h8ffe710_1    conda-forge
    m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
    m2w64-gcc-libs            5.3.0                         7    conda-forge
    m2w64-gcc-libs-core       5.3.0                         7    conda-forge
    m2w64-gmp                 6.1.0                         2    conda-forge
    m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
    markupsafe                2.1.1           py310he2412df_1    conda-forge
    matplotlib-base           3.5.1           py310h79a7439_0    conda-forge
    matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
    mistune                   0.8.4           py310he2412df_1005    conda-forge
    mkl                       2022.0.0           h0e2418a_796    conda-forge
    mplleaflet                0.0.5                      py_4    conda-forge
    msgpack-python            1.0.3           py310h476a331_1    conda-forge
    msys2-conda-epoch         20160418                      1    conda-forge
    munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
    nbclient                  0.6.0              pyhd8ed1ab_0    conda-forge
    nbconvert                 6.5.0              pyhd8ed1ab_0    conda-forge
    nbconvert-core            6.5.0              pyhd8ed1ab_0    conda-forge
    nbconvert-pandoc          6.5.0              pyhd8ed1ab_0    conda-forge
    nbformat                  5.3.0              pyhd8ed1ab_0    conda-forge
    nest-asyncio              1.5.5              pyhd8ed1ab_0    conda-forge
    notebook                  6.4.10             pyha770c72_0    conda-forge
    numpy                     1.22.3          py310hcae7c84_2    conda-forge
    openjpeg                  2.4.0                hb211442_1    conda-forge
    openssl                   1.1.1n               h8ffe710_0    conda-forge
    packaging                 21.3               pyhd8ed1ab_0    conda-forge
    pandas                    1.4.2           py310hf5e1058_1    conda-forge
    pandoc                    2.18                 h57928b3_0    conda-forge
    pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
    parso                     0.8.3              pyhd8ed1ab_0    conda-forge
    partd                     1.2.0              pyhd8ed1ab_0    conda-forge
    pickleshare               0.7.5                   py_1003    conda-forge
    pillow                    9.1.0           py310h767b3fd_2    conda-forge
    pip                       22.0.4             pyhd8ed1ab_0    conda-forge
    prometheus_client         0.14.1             pyhd8ed1ab_0    conda-forge
    prompt-toolkit            3.0.29             pyha770c72_0    conda-forge
    psutil                    5.9.0           py310he2412df_1    conda-forge
    pthread-stubs             0.4               hcd874cb_1001    conda-forge
    pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
    pycparser                 2.21               pyhd8ed1ab_0    conda-forge
    pygments                  2.11.2             pyhd8ed1ab_0    conda-forge
    pymeeus                   0.5.10             pyhd8ed1ab_0    conda-forge
    pymove                    3.0.0              pyhd8ed1ab_0    conda-forge
    pyopenssl                 22.0.0             pyhd8ed1ab_0    conda-forge
    pyparsing                 3.0.8              pyhd8ed1ab_0    conda-forge
    pyrsistent                0.18.1          py310he2412df_1    conda-forge
    pysocks                   1.7.1           py310h5588dad_5    conda-forge
    python                    3.10.4          h9a09f29_0_cpython    conda-forge
    python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
    python-fastjsonschema     2.15.3             pyhd8ed1ab_0    conda-forge
    python_abi                3.10                    2_cp310    conda-forge
    pytz                      2022.1             pyhd8ed1ab_0    conda-forge
    pywin32                   303             py310he2412df_0    conda-forge
    pywinpty                  2.0.5           py310h00ffb61_1    conda-forge
    pyyaml                    6.0             py310he2412df_4    conda-forge
    pyzmq                     22.3.0          py310h73ada01_2    conda-forge
    requests                  2.27.1             pyhd8ed1ab_0    conda-forge
    scikit-learn              1.0.2           py310h4dafddf_0    conda-forge
    scipy                     1.8.0           py310h33db832_1    conda-forge
    send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
    setuptools                62.1.0          py310h5588dad_0    conda-forge
    shapely                   1.8.0           py310h3578588_6    conda-forge
    six                       1.16.0             pyh6c4a22f_0    conda-forge
    sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
    soupsieve                 2.3.1              pyhd8ed1ab_0    conda-forge
    sqlite                    3.38.2               h8ffe710_0    conda-forge
    stack_data                0.2.0              pyhd8ed1ab_0    conda-forge
    tbb                       2021.5.0             h2d74725_1    conda-forge
    tblib                     1.7.0              pyhd8ed1ab_0    conda-forge
    terminado                 0.13.3          py310h5588dad_1    conda-forge
    threadpoolctl             3.1.0              pyh8a188c0_0    conda-forge
    tinycss2                  1.1.1              pyhd8ed1ab_0    conda-forge
    tk                        8.6.12               h8ffe710_0    conda-forge
    toolz                     0.11.2             pyhd8ed1ab_0    conda-forge
    tornado                   6.1             py310he2412df_3    conda-forge
    tqdm                      4.64.0             pyhd8ed1ab_0    conda-forge
    traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
    typing_extensions         4.2.0              pyha770c72_0    conda-forge
    tzdata                    2022a                h191b570_0    conda-forge
    ucrt                      10.0.20348.0         h57928b3_0    conda-forge
    unicodedata2              14.0.0          py310he2412df_1    conda-forge
    urllib3                   1.26.9             pyhd8ed1ab_0    conda-forge
    vc                        14.2                 hb210afc_6    conda-forge
    vs2015_runtime            14.29.30037          h902a5da_6    conda-forge
    wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
    webencodings              0.5.1                      py_1    conda-forge
    wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
    widgetsnbextension        3.6.0           py310h5588dad_0    conda-forge
    win_inet_pton             1.1.0           py310h5588dad_4    conda-forge
    winpty                    0.4.3                         4    conda-forge
    xorg-libxau               1.0.9                hcd874cb_0    conda-forge
    xorg-libxdmcp             1.1.3                hcd874cb_0    conda-forge
    xz                        5.2.5                h62dcd97_1    conda-forge
    yaml                      0.2.5                h8ffe710_2    conda-forge
    zeromq                    4.3.4                h0e60522_1    conda-forge
    zict                      2.1.0              pyhd8ed1ab_0    conda-forge
    zipp                      3.8.0              pyhd8ed1ab_0    conda-forge
    zlib                      1.2.11            h8ffe710_1014    conda-forge
    zstd                      1.5.2                h6255e5f_0    conda-forge
    
    opened by anitagraser 1
  • How to carry around a feature column?

    How to carry around a feature column?

    Is your feature request related to a problem? Please describe. When building the MoveDataFrame, there is no clear way on how to carry around an extra feature column that might be useful. For instance, I am working with bus gps data, but I need to carry the trip_id associated to that bus. However, trip_id is not the traj_id. So, I couldn't figure out how to add this extra info to my MoveDataFrame

    Describe the solution you'd like Maybe something like:

        @staticmethod
        def __new__(
            self,
            data: Union[DataFrame, Dict, List],
            latitude: Optional[Text] = LATITUDE,
            longitude: Optional[Text] = LONGITUDE,
            datetime: Optional[Text] = DATETIME,
            traj_id: Optional[Text] = TRAJ_ID,
            feature_cols: Optional[List[str]] = [],
            type_: Optional[Text] = TYPE_PANDAS,
            n_partitions: Optional[int] = 1,
        ):
            """
            Creates the PyMove dataframe, which must contain latitude, longitude and datetime.
    
            The dataframe can be a pandas or dask dataframe.
    
            Parameters
            ----------
            data : DataFrame or PandasMoveDataFrame or dict or list
                Input trajectory data.
            latitude : str, optional
                Represents column name latitude, by default LATITUDE
            longitude : str, optional
                Represents column name longitude, by default LONGITUDE
            datetime : str, optional
                Represents column name datetime, by default DATETIME
            traj_id : str, optional
                Represents column name trajectory id, by default TRAJ_ID
            feature_cols: list, optional
                Extra columns that will be carried by the dataframe, by default []
            type_ : str, optional
                Number of partitions of the dask dataframe, by default TYPE_PANDAS
            n_partitions : Optional[int], optional
                Amount of partitions for dask dataframe, by default 1
    
            Raises
            ------
            KeyError
                If missing one of lat, lon, datetime columns
            ValueError, ParserError
                If the data types can't be converted.
            """
    
    opened by JoaoCarabetta 1
  • Turn off prints

    Turn off prints

    Is your feature request related to a problem? Please describe. There is too much printing. I rather have an API that does not print as much. For instance, if I want to use it on another project, I want it to run silently.

    I'd recommend setting the verbosity to False by default.

    Describe the solution you'd like To have a way to control the verbosity of the logging. Maybe a global parameter that I toggle, ex: pymove.params.verbose=True/False, which controls the printing.

    Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

    opened by JoaoCarabetta 1
  • Query Functions and new Distances functions

    Query Functions and new Distances functions

    Types of changes

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [x] New feature (non-breaking change which adds functionality)
    • [x] Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] I have read the CONTRIBUTING document.
    • [x] My code follows the code style of this project (see .code-style.md).
    • [x] All new and existing tests passed (see .testing.md).
    • [x] I have added tests to cover my changes.
    • [x] My change requires a change to the documentation.
    • [x] I have updated the documentation accordingly (see .documentation.md).

    Description

    • What is the new behavior (if this is a feature change)? Query Functions (Range and KNN) and new Distances functions (Mean Euclidean Distance Predictive and Mean Euclidean Distance Trajectory)
    opened by MCavalcante16 1
  • Script pra atualizar versão PyMove no pip

    Script pra atualizar versão PyMove no pip

    • https://dzone.com/articles/executable-package-pip-install

    • Esse parece ser mais completinho: https://medium.com/@joel.barmettler/how-to-upload-your-python-package-to-pypi-65edc5fe9c56

    • MAIS DO MAIS completo: https://realpython.com/pypi-publish-python-package/

    • https://github.com/bast/pypi-howto

    • https://stackoverflow.com/questions/32204769/pypi-is-it-possible-to-set-up-git-to-auto-update-my-package-on-pypi

    • https://sherif.io/2016/09/30/Python-package-with-GitHub-PyPI.html

    • https://pypi.org/project/auto-pypi/

    • PRA UPLOAD: https://stackoverflow.com/questions/52700692/a-guide-for-updating-packages-on-pypi

    • https://www.freecodecamp.org/news/how-to-use-github-as-a-pypi-server-1c3b0d07db2/

    Medium 
    opened by AndyFernandes 1
  • create_or_update_move_stop_by_dist_time - does not create stay point using distance

    create_or_update_move_stop_by_dist_time - does not create stay point using distance

    Describe the bug The function create_or_update_move_stop_by_dist_time claims to create a stay point based on both time and distance metrics. Because the documentation is sparse, I went looking in the source code for an explanation of how it works. I can clearly see where the data is aggregated and queried by the time to the previous point, but I see no where that the data is queried by the distance. The input dist_radius appears nowhere in the actual function.

    To Reproduce Go to: https://github.com/InsightLab/PyMove/blob/ee5b68282502bfcb9cf38b52dcdefed5bd927a90/pymove/preprocessing/stay_point_detection.py

    ctrl+F: dist_radius

    Appears only in the doc string of the function. No other distance parameter is apparent.

    opened by ddileonardo 0
  • Units - no units on stay points inputs; is it possible to use arbitrary x,y units

    Units - no units on stay points inputs; is it possible to use arbitrary x,y units

    Discussed in https://github.com/InsightLab/PyMove/discussions/213

    Originally posted by ddileonardo March 11, 2022 Hello,

    I am investigating pymove for use in a project I am working on. Specifically I need to find stay points. I have questions about the units that I can use with pymove.

    MoveDataFrame: The function inputs specify latitude and longitude. But could I use an arbitrary coordinate system. For example could I use UTM northing and easting instead? Or really any arbitrary x and y coordinate system?

    stay_point_detection.create_or_update_move_stop_by_dist_time: the function does not specify the units of time and distance that should be used. What is the unit of time that you are using? Should the units for distance match whatever the coordinate system unit is? Is the unit of distance degrees to match a lat/lon coordinate system or something else? The example from the documentation just says 40, but 40 degrees doesn't seem to make sense as a distance value.

    I couldn't find any documentation about the appropriate units.

    Thanks.

    opened by ddileonardo 0
  • Folium throwing a bunch of errors

    Folium throwing a bunch of errors

    Hi,

    I'm just trying out PyMove because it seems like it could bring a lot to my current project. But I can't get any folium functionality to work, though.

    Here's an extract of what I'm doing:

    df.head()
    

    absolute_time | lat | lng | id -- | -- | -- | -- 2021-09-09 10:32:27.000 | 45.818459 | 3.139887 | 54 2021-09-09 10:32:28.000 | 45.818459 | 3.139887 | 54 2021-09-09 10:32:29.044 | 45.818459 | 3.139887 | 54 2021-09-09 10:32:30.000 | 45.818459 | 3.139887 | 54 2021-09-09 10:32:31.000 | 45.818459 | 3.139887 | 54

    move_df = MoveDataFrame(data=df, latitude='lat', longitude='lng', datetime='absolute_time')
    
    from pymove import folium as f
    f.plot_trajectories(move_df)
    
    ---------------------------------------------------------------------------
    TypeError                                 Traceback (most recent call last)
    <ipython-input-159-487305dba7d4> in <module>()
          1 from pymove import folium as f
    ----> 2 f.plot_trajectories(move_df)
    
    2 frames
    /usr/local/lib/python3.7/dist-packages/pymove/visualization/folium.py in plot_trajectories(move_data, n_rows, lat_origin, lon_origin, zoom_start, legend, base_map, tile, save_as_html, color, color_by_id, filename)
        993 
        994     _add_trajectories_to_map(
    --> 995         mv_df, items, base_map, legend, save_as_html, filename
        996     )
        997 
    
    /usr/local/lib/python3.7/dist-packages/pymove/visualization/folium.py in _add_trajectories_to_map(move_data, items, base_map, legend, save_as_html, filename)
        896         mv = move_data[move_data[TRAJ_ID] == _id]
        897 
    --> 898         _add_begin_end_markers_to_map(mv, base_map, color, _id)
        899 
        900         folium.PolyLine(
    
    /usr/local/lib/python3.7/dist-packages/pymove/visualization/folium.py in _add_begin_end_markers_to_map(move_data, base_map, color, _id)
        837         popup='Início',
        838         icon=plugins.BeautifyIcon(
    --> 839             icon='play', icon_shape='marker', background_color=color or 'green'
        840         )
        841     ).add_to(points)
    
    TypeError: __init__() got an unexpected keyword argument 'color'
    

    Or if I just try to plot the bounding box, I get a different error.

    f.plot_bbox(move_df.get_bbox(), color='blue')
    
    ---------------------------------------------------------------------------
    TypeError                                 Traceback (most recent call last)
    <ipython-input-161-03377951b622> in <module>()
    ----> 1 f.plot_bbox(move_df.get_bbox(), color='blue')
    
    6 frames
    /usr/local/lib/python3.7/dist-packages/pymove/visualization/folium.py in plot_bbox(bbox_tuple, base_map, tiles, color, save_as_html, filename)
       1688         base_map = folium.Map(tiles=tiles)
       1689     base_map.fit_bounds(
    -> 1690         [[bbox_tuple[0], bbox_tuple[1]], [bbox_tuple[2], bbox_tuple[3]]]
       1691     )
       1692     points_ = [
    
    /usr/local/lib/python3.7/dist-packages/folium/folium.py in fit_bounds(self, bounds, padding_top_left, padding_bottom_right, padding, max_zoom)
        411             'Choropleth class, which has the same arguments. See the example '
        412             'notebook \'GeoJSON_and_choropleth\' for how to do this.',
    --> 413             FutureWarning
        414         )
        415         from folium.features import Choropleth
    
    /usr/local/lib/python3.7/dist-packages/folium/map.py in __init__(self, bounds, padding_top_left, padding_bottom_right, padding, max_zoom)
        456         Bounding box specified as two points [southwest, northeast]
        457     padding_top_left: (x, y) point, default None
    --> 458         Padding in the top left corner. Useful if some elements in
        459         the corner, such as controls, might obscure objects you're zooming
        460         to.
    
    /usr/lib/python3.7/json/__init__.py in dumps(obj, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, default, sort_keys, **kw)
        229         cls is None and indent is None and separators is None and
        230         default is None and not sort_keys and not kw):
    --> 231         return _default_encoder.encode(obj)
        232     if cls is None:
        233         cls = JSONEncoder
    
    /usr/lib/python3.7/json/encoder.py in encode(self, o)
        197         # exceptions aren't as detailed.  The list call should be roughly
        198         # equivalent to the PySequence_Fast that ''.join() would do.
    --> 199         chunks = self.iterencode(o, _one_shot=True)
        200         if not isinstance(chunks, (list, tuple)):
        201             chunks = list(chunks)
    
    /usr/lib/python3.7/json/encoder.py in iterencode(self, o, _one_shot)
        255                 self.key_separator, self.item_separator, self.sort_keys,
        256                 self.skipkeys, _one_shot)
    --> 257         return _iterencode(o, 0)
        258 
        259 def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
    
    /usr/lib/python3.7/json/encoder.py in default(self, o)
        177 
        178         """
    --> 179         raise TypeError(f'Object of type {o.__class__.__name__} '
        180                         f'is not JSON serializable')
        181 
    
    TypeError: Object of type float16 is not JSON serializable
    

    I'm using python version 3.7, PyMove version 3.0.0, and folium version 0.8.3

    opened by LaurentBerder 1
  • [docs] filters.clean_gps_nearby_points_by_distances radius lacking unit of measure

    [docs] filters.clean_gps_nearby_points_by_distances radius lacking unit of measure

    Describe the bug There is no unit on the radius of filters.clean_gps_nearby_points_by_distances

    I suppose that it is meters, but it should be explicit.

    Current docstring

    Removes points from the trajectories when the distance between them and the
    point before is smaller than the value set by the user.
    
    Parameters
    ----------
    move_data : dataframe
        The input trajectory data
    label_id : str, optional
         Indicates the label of the id column in the user dataframe, by default TRAJ_ID
    radius_area : float, optional
        Species the minimum distance a point must have to it"srs previous point
        in order not to be dropped, by default 10
    label_dtype : type, optional
        Represents column id type, ,y default np.float64.
    inplace : boolean, optional
        if set to true the operation is done in place, the original
        dataframe will be altered and None is returned, be default False
    

    Proposed Docstring

    Removes points from the trajectories when the distance in meters between them and the
    point before is smaller than the value set by the user.
    
    Parameters
    ----------
    move_data : dataframe
        The input trajectory data
    label_id : str, optional
         Indicates the label of the id column in the user dataframe, by default TRAJ_ID
    radius_area : float, optional
        Species the minimum distance in meters a point must have to it's previous point
        in order not to be dropped, by default 10
    label_dtype : type, optional
        Represents column id type, ,y default np.float64.
    inplace : boolean, optional
        if set to true the operation is done in place, the original
        dataframe will be altered and None is returned, be default False
    
    opened by JoaoCarabetta 1
Releases(3.0.1)
Owner
Insight Data Science Lab
Research group at Federal University of Ceará (UFC)
Insight Data Science Lab
Selective Wavelet Attention Learning for Single Image Deraining

SWAL Code for Paper "Selective Wavelet Attention Learning for Single Image Deraining" Prerequisites Python 3 PyTorch Models We provide the models trai

Bobo 9 Jun 17, 2022
Implementation of H-Transformer-1D, Hierarchical Attention for Sequence Learning

H-Transformer-1D Implementation of H-Transformer-1D, Transformer using hierarchical Attention for sequence learning with subquadratic costs. For now,

Phil Wang 123 Nov 17, 2022
[CVPR-2021] UnrealPerson: An adaptive pipeline for costless person re-identification

UnrealPerson: An Adaptive Pipeline for Costless Person Re-identification In our paper (arxiv), we propose a novel pipeline, UnrealPerson, that decreas

ZhangTianyu 70 Oct 10, 2022
Offical code for the paper: "Growing 3D Artefacts and Functional Machines with Neural Cellular Automata" https://arxiv.org/abs/2103.08737

Growing 3D Artefacts and Functional Machines with Neural Cellular Automata Video of more results: https://www.youtube.com/watch?v=-EzztzKoPeo Requirem

Robotics Evolution and Art Lab 51 Jan 01, 2023
AFLFast (extends AFL with Power Schedules)

AFLFast Power schedules implemented by Marcel Böhme [email protected]

Marcel Böhme 380 Jan 03, 2023
PyTorch implementations of the paper: "DR.VIC: Decomposition and Reasoning for Video Individual Counting, CVPR, 2022"

DRNet for Video Indvidual Counting (CVPR 2022) Introduction This is the official PyTorch implementation of paper: DR.VIC: Decomposition and Reasoning

tao han 35 Nov 22, 2022
Solver for Large-Scale Rank-One Semidefinite Relaxations

STRIDE: spectrahedral proximal gradient descent along vertices A Solver for Large-Scale Rank-One Semidefinite Relaxations About STRIDE is designed for

48 Dec 20, 2022
Multi-Stage Spatial-Temporal Convolutional Neural Network (MS-GCN)

Multi-Stage Spatial-Temporal Convolutional Neural Network (MS-GCN) This code implements the skeleton-based action segmentation MS-GCN model from Autom

Benjamin Filtjens 8 Nov 29, 2022
Self-supervised learning algorithms provide a way to train Deep Neural Networks in an unsupervised way using contrastive losses

Self-supervised learning Self-supervised learning algorithms provide a way to train Deep Neural Networks in an unsupervised way using contrastive loss

Arijit Das 2 Mar 26, 2022
Code for "FGR: Frustum-Aware Geometric Reasoning for Weakly Supervised 3D Vehicle Detection", ICRA 2021

FGR This repository contains the python implementation for paper "FGR: Frustum-Aware Geometric Reasoning for Weakly Supervised 3D Vehicle Detection"(I

Yi Wei 31 Dec 08, 2022
TransMVSNet: Global Context-aware Multi-view Stereo Network with Transformers.

TransMVSNet This repository contains the official implementation of the paper: "TransMVSNet: Global Context-aware Multi-view Stereo Network with Trans

旷视研究院 3D 组 155 Dec 29, 2022
SuperSDR: multiplatform KiwiSDR + CAT transceiver integrator

SuperSDR SuperSDR integrates a realtime spectrum waterfall and audio receive from any KiwiSDR around the world, together with a local (or remote) cont

Marco Cogoni 30 Nov 29, 2022
CoSMA: Convolutional Semi-Regular Mesh Autoencoder. From Paper "Mesh Convolutional Autoencoder for Semi-Regular Meshes of Different Sizes"

Mesh Convolutional Autoencoder for Semi-Regular Meshes of Different Sizes Implementation of CoSMA: Convolutional Semi-Regular Mesh Autoencoder arXiv p

Fraunhofer SCAI 10 Oct 11, 2022
A neuroanatomy-based augmented reality experience powered by computer vision. Features 3D visuals of the Atlas Brain Map slices.

Brain Augmented Reality (AR) A neuroanatomy-based augmented reality experience powered by computer vision that features 3D visuals of the Atlas Brain

Yasmeen Brain 10 Oct 06, 2022
DC3: A Learning Method for Optimization with Hard Constraints

DC3: A learning method for optimization with hard constraints This repository is by Priya L. Donti, David Rolnick, and J. Zico Kolter and contains the

CMU Locus Lab 57 Dec 26, 2022
Repo for 2021 SDD assessment task 2, by Felix, Anna, and James.

SoftwareTask2 Repo for 2021 SDD assessment task 2, by Felix, Anna, and James. File/folder structure: helloworld.py - demonstrates various map backgrou

3 Dec 13, 2022
Speech recognition tool to convert audio to text transcripts, for Linux and Raspberry Pi.

Spchcat Speech recognition tool to convert audio to text transcripts, for Linux and Raspberry Pi. Description spchcat is a command-line tool that read

Pete Warden 279 Jan 03, 2023
Using Clinical Drug Representations for Improving Mortality and Length of Stay Predictions

Using Clinical Drug Representations for Improving Mortality and Length of Stay Predictions Usage Clone the code to local. https://github.com/tanlab/MI

Computational Biology and Machine Learning lab @ TOBB ETU 3 Oct 18, 2022
A free, multiplatform SDK for real-time facial motion capture using blendshapes, and rigid head pose in 3D space from any RGB camera, photo, or video.

mocap4face by Facemoji mocap4face by Facemoji is a free, multiplatform SDK for real-time facial motion capture based on Facial Action Coding System or

Facemoji 591 Dec 27, 2022
Tracing Versus Freehand for Evaluating Computer-Generated Drawings (SIGGRAPH 2021)

Tracing Versus Freehand for Evaluating Computer-Generated Drawings (SIGGRAPH 2021) Zeyu Wang, Sherry Qiu, Nicole Feng, Holly Rushmeier, Leonard McMill

Zach Zeyu Wang 23 Dec 09, 2022