Arguments
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| ts | TIMESTAMPTZ | - | ✔ | Timestamps for each data point |
| value | DOUBLE PRECISION | - | ✔ | The value at each timestamp |
| resolution | INT | - | ✔ | The approximate number of points to return. Determines the horizontal resolution of the resulting graph. |
Returns
| Column | Type | Description |
|---|---|---|
| asap_smooth | Timevector | An object representing a series of values occurring at set intervals from a starting time. It can be unpacked with unnest. For more information, see the documentation on timevectors. |
Samples
This example uses a table calledmetrics, with columns for date and reading. The columns contain measurements that
have been accumulated over a large interval of time. This example takes that data and provides a smoothed representation
of approximately 10 points, but that still shows any anomalous readings: