Skip to content

Commit 3192067

Browse files
authored
Merge pull request #192 from InsightLab/developer
Developer
2 parents c04f365 + 9491641 commit 3192067

File tree

71 files changed

+21310
-8300
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+21310
-8300
lines changed

.code-style.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ We are using some tools to keep a default coding style in the project.
1313

1414
We following the [Numpy](https://numpydoc.readthedocs.io/en/latest/format.html) docstring style with [PEP484](https://www.python.org/dev/peps/pep-0484/#abstract).
1515

16-
1716
## Links
1817
- <https://pre-commit.com/>
1918
- <https://www.codacy.com/>

.github/workflows/code_coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
- name: Install dependencies
1919
run: |
2020
python -m pip install --upgrade pip
21-
pip install pytest coverage geopandas .
21+
make dev
2222
- name: Coverage
2323
run: |
24-
coverage run -m pytest
24+
make coverage
2525
coverage xml -o "coverage.xml"
2626
- name: Codacy Coverage Reporter
2727
uses: codacy/codacy-coverage-reporter-action@master

.github/workflows/lint_and_test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
- name: Install dependencies
1515
run: |
1616
python -m pip install --upgrade pip
17-
pip install flake8 pep8-naming .
17+
make dev
1818
- name: Lint
1919
working-directory: ${{ github.workspace }}
2020
run: |
21-
flake8
21+
make lint
2222
test:
2323
name: Code Testing
2424
runs-on: ubuntu-latest
@@ -31,8 +31,8 @@ jobs:
3131
- name: Install dependencies
3232
run: |
3333
python -m pip install --upgrade pip
34-
pip install pytest geopandas .
34+
make dev
3535
- name: Test
3636
working-directory: ${{ github.workspace }}
3737
run: |
38-
pytest --verbose
38+
make test

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
- name: Install dependencies
1919
run: |
2020
python -m pip install --upgrade pip
21-
pip install flake8 pep8-naming pytest geopandas .
21+
make dev
2222
- name: Lint and Test
2323
run: |
24-
flake8
25-
pytest
24+
make lint
25+
make test
2626
- name: Build
2727
run: |
2828
pip install setuptools wheel twine

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@ $RECYCLE.BIN/
339339
# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)
340340

341341
developing/
342-
examples/*
343-
!examples/geolife_sample.csv
344-
!examples/atlantic.csv
345-
!examples/README.md
346-
!examples/[0-9]*.ipynb
347-
!examples/extracao_geolife.ipynb
342+
notebooks/*
343+
!notebooks/geolife_sample.csv
344+
!notebooks/atlantic.csv
345+
!notebooks/README.md
346+
!notebooks/[0-9]*.ipynb
347+
!notebooks/extracao_geolife.ipynb

.mapping.png

145 KB
Loading

.readthedocs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ version: 2
77

88
# Build documentation in the docs/ directory with Sphinx
99
sphinx:
10-
configuration: docs/conf.py
10+
configuration: ./docs/conf.py
1111

1212
# Optionally build your docs in additional formats such as PDF
1313
formats:
@@ -17,4 +17,6 @@ formats:
1717
python:
1818
version: 3.7
1919
install:
20-
- requirements: requirements-dev.txt
20+
- requirements: ./docs/requirements.txt
21+
- method: pip
22+
path: .

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
include requirements.txt
22
include LICENSE
33
include README.md
4+
include .mapping.png
45
include pymove/tests/baseline/*.png

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ help:
88

99
dev:
1010
pip install -r requirements-dev.txt
11+
pip install -e .
1112
pre-commit install
1213

1314
clean:
@@ -18,14 +19,19 @@ clean:
1819
rm -f .coverage
1920

2021
test: clean
22+
pytest
23+
24+
coverage: clean
2125
coverage run -m pytest
2226
coverage report
2327

2428
lint: clean
2529
flake8
2630

2731
docs: clean
32+
cp docs/examples/notebooks.rst docs
2833
rm -rf docs/api docs/examples
2934
sphinx-apidoc -f -o docs/api pymove pymove/tests/
30-
jupyter nbconvert --to rst --output-dir docs/examples examples/[0-9]*.ipynb
35+
jupyter nbconvert --to rst --output-dir docs/examples notebooks/[0-9]*.ipynb
36+
mv docs/notebooks.rst docs/examples
3137
make -C docs html

README.md

Lines changed: 114 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,6 @@
2929
</a>
3030
</td>
3131
</tr>
32-
<tr>
33-
<td>Build Status</td>
34-
<td>
35-
<a href="https://travis-ci.org/InsightLab/PyMove/">
36-
<img src="https://img.shields.io/travis/InsightLab/pymove/master?style=for-the-badge" alt="Travis build status" />
37-
</a>
38-
</td>
39-
</tr>
4032
<tr>
4133
<td>Platforms</td>
4234
<td>
@@ -169,15 +161,15 @@ Requirements: Anaconda Python distribution installed and accessible
169161
you want to call your environment, and replace `x.x` with the Python version
170162
you wish to use. (To see a list of available python versions first,
171163
type conda search "^python$" and press enter.)
172-
- `conda create -n <env_name> python=x.x`
164+
- ``conda create -n <env_name> python=x.x``
173165

174-
- Press y to proceed. This will install the Python version and all the
166+
- `Press y to proceed. This will install the Python version and all the`
175167
associated anaconda packaged libraries at `path_to_your_anaconda_location/anaconda/envs/env_name`
176168

177169
2. Activate your virtual environment. To activate or switch into your
178170
virtual environment, simply type the following where yourenvname is the
179171
name you gave to your environment at creation.
180-
- `conda activate <env_name>`
172+
- ``conda activate <env_name>``
181173

182174
3. Now install the package from either `conda`, `pip` or `github`
183175

@@ -196,19 +188,19 @@ Requirements: Anaconda Python distribution installed and accessible
196188
## [Github](https://github.com/InsightLab/PyMove) installation
197189

198190
1. Clone this repository
199-
- `git clone https://github.com/InsightLab/PyMove`
191+
- ``git clone https://github.com/InsightLab/PyMove``
200192

201193
2. Switch to folder PyMove
202-
- `cd PyMove`
194+
- ``cd PyMove``
203195

204196
3. Switch to a new branch
205-
- `git checkout -b developer`
197+
- ``git checkout -b developer``
206198

207199
4. Make a pull of branch
208-
- `git pull origin developer`
200+
- ``git pull origin developer``
209201

210202
5. Install pymove in developer mode
211-
- `make dev`
203+
- ``make dev``
212204

213205
### For windows users
214206

@@ -219,12 +211,115 @@ If you installed from `pip` or `github`, you may encounter an error related to
219211

220212
## Examples
221213

222-
You can access examples of how to use PyMove [here](https://github.com/InsightLab/PyMove/tree/master/examples)
214+
You can see examples of how to use PyMove [here](https://github.com/InsightLab/PyMove/tree/master/notebooks)
215+
216+
---
217+
218+
## Mapping PyMove methods with the Paradigms of Trajectory Data Mining
219+
220+
![](.mapping.png)
221+
[ZHENG 2015](https://www.microsoft.com/en-us/research/publication/trajectory-data-mining-an-overview/).
222+
223+
- 1: **Spatial Trajectories** &rarr; `pymove.core`
224+
- `MoveDataFrame`
225+
- `DiscreteMoveDataFrame`
226+
227+
- 2: **Stay Point Detection** &rarr; `pymove.preprocessing.stay_point_detection`
228+
- `create_or_update_move_stop_by_dist_time`
229+
- `create_or_update_move_and_stop_by_radius`
230+
231+
- 3: **Map-Matching** &rarr; `pymove-osmnx`
232+
233+
- 4: **Noise Filtering** &rarr; `pymove.preprocessing.filters`
234+
- `by_bbox`
235+
- `by_datetime`
236+
- `by_label`
237+
- `by_id`
238+
- `by_tid`
239+
- `clean_consecutive_duplicates`
240+
- `clean_gps_jumps_by_distance`
241+
- `clean_gps_nearby_points_by_distances`
242+
- `clean_gps_nearby_points_by_speed`
243+
- `clean_gps_speed_max_radius`
244+
- `clean_trajectories_with_few_points`
245+
- `clean_trajectories_short_and_few_points`
246+
- `clean_id_by_time_max`
247+
248+
- 5: **Compression** &rarr; `pymove.preprocessing.compression`
249+
- `compress_segment_stop_to_point`
250+
251+
- 6: **Segmentation** &rarr; `pymove.preprocessing.segmentation`
252+
- `bbox_split`
253+
- `by_dist_time_speed`
254+
- `by_max_dist`
255+
- `by_max_time`
256+
- `by_max_speed`
257+
258+
- 7: **Distance of Trajectory** &rarr; `pymove.query.query`
259+
- `range_query`
260+
- `knn_query`
261+
262+
- 8: **Query Historical Trajectories**
263+
264+
- 9: **Managing Recent Trajectories**
265+
266+
- 10: **Privacy Preserving**
267+
268+
- 11: **Reducing Uncertainty**
269+
270+
- 12: **Moving Together Patterns**
271+
272+
- 13: **Clustering** &rarr; `pymove.models.pattern_mining.clustering`
273+
- `elbow_method`
274+
- `gap_statistics`
275+
- `dbscan_clustering`
276+
277+
- 14: **Freq. Seq. Patterns**
278+
279+
- 15: **Periodic Patterns**
280+
281+
- 16: **Trajectory Classification**
282+
283+
- 17: **Trajectory Outlier / Anomaly Detection** &rarr; `pymove.semantic.semantic`
284+
- `outliers`
285+
- `create_or_update_out_of_the_bbox`
286+
- `create_or_update_gps_deactivated_signal`
287+
- `create_or_update_gps_jump`
288+
- `create_or_update_short_trajectory`
289+
- `create_or_update_gps_block_signal`
290+
- `filter_block_signal_by_repeated_amount_of_points`
291+
- `filter_block_signal_by_time`
292+
- `filter_longer_time_to_stop_segment_by_id`
293+
294+
---
295+
296+
## Cite
297+
298+
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.
299+
300+
```txt
301+
@mastersthesis{arina2019,
302+
title = {Uma Arquitetura E Implementação Do Módulo De Pré-processamento Para Biblioteca Pymove},
303+
author = {Arina De Jesus Amador Monteiro Sanches},
304+
year = 2019,
305+
school = {Universidade Federal Do Ceará},
306+
type = {Bachelor's thesis}
307+
}
308+
@mastersthesis{andreza2019,
309+
title = {Uma Arquitetura E Implementação Do Módulo De Visualizaçãopara Biblioteca Pymove},
310+
author = {Andreza Fernandes De Oliveira},
311+
year = 2019,
312+
school = {Universidade Federal Do Ceará},
313+
type = {Bachelor's thesis}
314+
}
315+
```
316+
223317
---
224318

225-
## Papers
319+
## Publications
226320

227-
(list of publications using/with Pymove)
321+
- [Uma Arquitetura E Implementação Do Módulo De Pré-processamento Para Biblioteca Pymove](http://repositorio.ufc.br/handle/riufc/58551)
322+
- [Uma Arquitetura E Implementação Do Módulo De Visualizaçãopara Biblioteca Pymove](http://repositorio.ufc.br/handle/riufc/58550)
228323

229324
---
230325

0 commit comments

Comments
 (0)