RollingSum / Computation Layer

Calculate the rolling (cumulative) sum over a sliding window. Similar to pandas.rolling().sum() or R's roll_sum().

Mathematical form: where is the window size and are optional weights.

Common applications:

  • Running totals (revenue, costs)
  • Cumulative counts (events, transactions)
  • Resource usage tracking
  • Rainfall accumulation
  • Traffic volume analysis
  • Energy consumption monitoring
  • Inventory movement

Note: Useful for monitoring accumulations over fixed time windows.

Table
0
0
Table

Select

column

The numeric column to compute rolling sums for. Typical applications:

  • Sales volumes (daily totals)
  • Transaction counts (hourly sums)
  • Resource consumption (running totals)
  • Event frequencies (occurrence counts)
  • Cumulative measurements

Number of observations in sliding window. Common periods:

  • 24: Daily totals from hourly data
  • 7: Weekly accumulation
  • 30: Monthly totals
  • 365: Annual running sum

Choose based on reporting and analysis needs.

Weights

[f64, ...]

Optional weights for window values. Must match window size if provided. Uses:

  • Weighted accumulation
  • Time-weighted totals
  • Priority-based summation

Modifies contribution of each value to total.

AsWindow

Require complete windows for sum calculation. Ensures totals are based on full windows of data. Important for accurate accumulation tracking and complete period totals.

1

Minimum number of valid observations (Value) required for sum calculation. Examples:

  • 1: Sum any available values
  • window_size/2: Require majority of window
  • window_size: Require complete window

Controls trade-off between data availability and total accuracy.

Center

bool
false

Window label position. When true, aligns to window center; when false, to end. Effects:

  • true: Better for historical accumulation analysis
  • false: Better for real-time total monitoring

Name for the new column. If not provided, the system generates a unique name. If AsColumn matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.