3.4. cpforager.processing.add_step_length

cpforager.processing.add_step_length(df)

Add to the dataframe an additional step_length column that gives the step length in kilometers.

Parameters:

df (pandas.DataFrame) – dataframe with longitude and latitude columns.

Returns:

the dataframe with an additional step_length column that gives the step length in kilometers.

Return type:

pandas.DataFrame

Step length is computed as the length in kilometers between consecutive measures of position.

Warning

First step length value is NaN.