Skip to content

Instantly share code, notes, and snippets.

@lmeulen
Created August 23, 2021 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lmeulen/e6b4b70c6b2dabb74dd375288471c952 to your computer and use it in GitHub Desktop.
Save lmeulen/e6b4b70c6b2dabb74dd375288471c952 to your computer and use it in GitHub Desktop.
gpx_speed_ma
rows = int(30/int(df.dt.mean()))
df['speed_ma'] = df['speed'].rolling(window=rows, min_periods=1).mean()
df[['speed_ma']].plot(figsize=(15,8))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment