Shape · Time series
Resample
Rolls a time series up into regular buckets, from minutes to years, with a total or other summary per bucket. Empty buckets can be left out, carried forward or set to zero.
Also known as: Time bucket, daily totals
How it works
Pick the Timestamp column and a Frequency (Day by default); each row is assigned to the bucket its timestamp is truncated to. Each aggregation row names a column and a function: Sum, Count, Average, Min, Max, Median, Std dev, First or Last, where First and Last take the value at the earliest and latest timestamp in the bucket. The alias defaults to the column name. Fill gaps decides what happens to periods between the first and last bucket that have no rows: None leaves them out, Zero adds them with 0, and Forward fill adds them with the last known value. The bucket column keeps the timestamp column's name unless you set Output timestamp name.
Inputs and outputs
Inputs
data— Table
Outputs
data— Table
Settings
The Attributes panel of Resample, as in the app: the controls work, but nothing runs — there is no data behind it.
The same settings, as the Assistant writes them
{
timestampColumn: string
frequency: "minute"|"hour"|"day"|"week"|"month"|"quarter"|"year"
aggregations: [{ column: string, func: "sum"|"mean"|"median"|"std"|"count"|"min"|"max"|"first"|"last", alias?: string }]
fillGaps: "none"|"ffill"|"zero"
outputTimestampName?: string
}
Example
Sensor readings every few minutes become one row per day: timestamp column read_at, frequency Day, aggregations Average of temp and Count of temp with alias readings, gaps set to Zero so a day with no readings still appears.
| read_at | temp | readings |
|---|---|---|
| 2024-03-01 | 12.4 | 288 |
| 2024-03-02 | 0 | 0 |
| 2024-03-03 | 11.9 | 271 |