mobilipy.mode_detection

Functions

mode_detection(df[, speed_th, ...])

Tags the DataFrame at 'trip' indexes with detected modes in the 'detected_mode' column.

mobilipy.mode_detection.mode_detection(df, speed_th=2.78, acceleration_th=0.5, minimal_walking_duration=100, minimal_trip_duration=120, use_multiprocessing=True)

Tags the DataFrame at ‘trip’ indexes with detected modes in the ‘detected_mode’ column.

Parameters
  • df (pandas.DataFrame) – DataFrame to be processed, coming from segmentation module

  • speed_th (float, optional) – The walk speed threshold. Defaults to 2.78.

  • acceleration_th (float, optional) – The walk acceleration threshold. Defaults to 0.5.

  • minimal_walking_duration (int, optional) – The walk duration threshold. Defaults to 100.

  • minimal_trip_duration (int, optional) – The minimal trip duration threshold. Defaults to 120.

  • use_multiprocessing (bool, optional) – Specifies whether the multiprocessing package should be used. Defaults to True.

Returns

pandas.DataFrame – Segments DataFrame with modes of transport tagged in the mode_detected column.