Moving average
This Moving average step smooths out short-term fluctuations in your data by calculating averages over a specified window of time or number of rows. It's particularly helpful for identifying trends in time-series data.
Step parameters
Value column
column(string): the value column used as the basis for the moving average computationReference column to sort (usually dates)
column(string): the column used to sort rowsMoving window (in number of rows)
int*: the number of rows included in the moving windowGroup by
(optional): if you want perform the computation by group of rows (see example 2 below)New column name
(optional): if you want to specify a custom column name (by default, it will be your original value column name suffixed with_MOVING_AVG
)
Example
Input

Configuration
{
"value_col": "sales",
"column_to_sort": "date",
"moving_window": 3,
"group_by": [],
"new_column_name": "sales_moving_avg"
}
Output

Last updated
Was this helpful?