<jupyter_start><jupyter_text>MovingPandas Minimum Viable Example[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/anitagraser/movingpandas-examples/main?filepath=1-tutorials/99-mini-example.ipynb)MovingPandas provides a trajectory datatype based on GeoPandas.The project home is at https://github.com/anitagraser/movingpandasThe documentation is available at https://movingpandas.readthedocs.io/en/master/<jupyter_code>import warnings
warnings.filterwarnings('ignore')
import pandas as pd
from geopandas import gpd
import movingpandas as mpd
from datetime import datetime, timedelta<jupyter_output><empty_output><jupyter_text>Loading trajectory data from a GeoPackageThe MovingPandas repository contains a demo GeoPackage file that can be loaded as follows:<jupyter_code>gdf = gpd.read_file('../data/geolife_small.gpkg')
gdf.plot(figsize=(9,5))<jupyter_output><empty_output><jupyter_text>After reading the trajectory point data from file, we want to construct the trajectories.  Creating a TrajectoryCollection<jupyter_code>traj_collection = mpd.TrajectoryCollection(gdf, 'trajectory_id', t='t')
traj_collection
traj_collection.plot(column='trajectory_id', legend=True, figsize=(9,5))<jupyter_output><empty_output><jupyter_text>Exploring movement speed<jupyter_code>traj_collection.plot(column='speed', linewidth=5, capstyle='round', legend=True, vmax=20, figsize=(9,5))<jupyter_output><empty_output><jupyter_text>Detecting stops<jupyter_code>detector = mpd.TrajectoryStopDetector(traj_collection)
stop_points = detector.get_stop_points(min_duration=timedelta(seconds=120), max_diameter=100)
ax = traj_collection.plot(figsize=(9,5))
stop_points.plot(ax=ax, color='red', markersize=100)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11085582998276852, 'fraction_numerical': 0.013785180930499713, 'mean_word_length': 10.311688311688311, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '274043', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 630, 'n_tokens_neox': 594, 'n_words': 100, 'path': '1-tutorials/99-mini-example.ipynb', 'repo_name': 'raybellwaves/movingpandas-examples', 'size': '1741'}