MovingPandas.TrajectoryCleaner#

movingpandas: Implementation of Trajectory classes and functions built on top of GeoPandas

class movingpandas.IqrCleaner(traj)#

Interquantile range (IQR) based outlier cleaner.

Parameters:

columns (dictionary) –

Information regarding the columns that will be used to clean the trajectory and the accompanying thresholds.

Key-value pairs of columns and alpha (IQR multiplier). Note: Setting alpha=3 is widely used.

Examples

>>> mpd.IqrCleaner(traj).clean(columns={'speed': 3})
__init__(traj)#

Create TrajectoryCleaner

Parameters:

traj (Trajectory or TrajectoryCollection)

class movingpandas.OutlierCleaner(traj)#

Speed-based outlier cleaner that cuts away spikes in the trajectory when the speed exceeds the provided speed threshold value

Parameters:
  • v_max (numeric) – Speed threshold

  • units (tuple) – Units in which to calculate speed For more info, check the list of supported units at https://movingpandas.org/units

Examples

>>> mpd.OutlierCleaner(traj).clean(alpha=2)
>>> mpd.OutlierCleaner(traj).clean(v_max=100, units=("km", "h"))
__init__(traj)#

Create TrajectoryCleaner

Parameters:

traj (Trajectory or TrajectoryCollection)