Macaw.Data.Operations.Transforms.Cumulative (macaw_data v0.21.1)

View Source

cumulative (spec/04 §4.13): along the rows' order, or ascending order's, a running fn of field's readings (sum, count, min, max or mean) as the new column as, each row holding the statistic of every reading up to and including its own, nils dropped. It starts again at each change of by's value along that order. The running value is the statistic's own streaming form (spec/04 §5), so a sum is exact and the last row's value is the statistic of every reading. With before, a second column of that name holds the statistic of the readings strictly before the row, the statistic's empty value at a run's start: a waterfall bar's start, beside as's end.