MovingAverage
Smooths a bumpy column of numbers by replacing each value with the average of it and the values immediately before it. One noisy month stops dominating the picture, and the underlying trend becomes visible. The output is the same length as the input, so it charts cleanly alongside the original.
Inputs
| Input | Accepts | Required |
|---|---|---|
Series | Series (a list of numbers) | Yes |
Window | Value (a single number) | Yes |
Outputs
| Output | Produces |
|---|---|
Result | Series (a list of numbers) |
Settings
Typed in on the node or set by the assistant, not wired.
| Setting | Default | Notes |
|---|---|---|
Window | 5 | How many rows each average covers: 3 for a 3-month trailing average on monthly data, 12 to smooth out a full year of seasonality. The first few rows average over however many rows exist so far, so the output starts at the first row with no gaps. |
Example
Your Monthly_Revenue column swings between $310K and $520K and it is hard to
tell whether the business is actually growing. A moving average with Window
set to 3 turns each month into its trailing three-month average. Chart the raw
revenue and the smoothed series on the same LineChart; the smoothed line makes
the steady climb (or the plateau) obvious.