4.10. cpforager.processing.add_trip
- cpforager.processing.add_trip(df, params)
Add to the dataframe an additional
tripcolumn that gives the trip identifier number.- Parameters:
df (pandas.DataFrame) – dataframe with
datetime,dist_to_nest,step_speedandstep_lengthcolumns.params (dict) – parameters dictionary.
- Returns:
the dataframe with an additional
tripcolumn 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_lengthandtrip_min_steps.