airbornegeo.resample

Contents

airbornegeo.resample#

resample(data, *, spacing, resample_by, maxdist, groupby_column=None, progressbar=True)[source]#

Resample all numeric columns in a dataframe at a supplied spacing of the supplied resample_by column. For example, if resample_by is time in seconds, and spacing is 0.5, this will return a new dataframe with all numeric columns resampled at a resolution of 0.5 seconds.

Parameters:
  • data (DataFrame) – DataFrame containing the data to be reduced.

  • spacing (float) – The new resolution to resample the data onto

  • resample_by (str) – Column name to use for the resampling, for example time or distance.

  • maxdist (float | None) – Only return resampled points which are within this distance of the nearest data point provided in resample_by, by default None,

  • groupby_column (str | None) – Column name to group by before resampling, by default None.

  • progressbar (bool) – Show progress bar for each group, by default True

Returns:

DataFrame with reduced data.

Return type:

DataFrame