3.10. cpforager.processing.add_trip

cpforager.processing.add_trip(df, params)

Add to the dataframe an additional trip column that gives the trip identifier number.

Parameters:
  • df (pandas.DataFrame) – dataframe with datetime, dist_to_nest, step_speed and step_length columns.

  • params (dict) – parameters dictionary.

Returns:

the dataframe with an additional trip column that gives the trip id number.

Return type:

pandas.DataFrame

The idea is to segment the full recording of positions in foraging trips by labelling every positions with a trip id.

Note

The required fields in the parameters dictionary are dist_threshold, speed_threshold, trip_min_duration, trip_min_length and trip_min_steps.