Skip to content

MetricTrendOutput ​

Type: Object

Regression-based trend analysis computed via TimescaleDB Toolkit stats_agg(y, x) with slope(), corr(), and determination_coeff()

Fields ​

NameTypeArgsDescriptionDeprecated
avgValueFloat!Mean daily value over the trend window
correlationFloat!Pearson correlation coefficient (-1 to 1). Values near ±1 indicate strong linear trend.
directionString!Derived trend direction: rising, falling, stable, or insufficient_data. Uses |correlation| >= 0.3 as significance threshold.
rSquaredFloat!R² coefficient of determination (0 to 1). Higher means the trend explains more variance.
sampleDaysInt!Number of days with data used in the regression
slopeFloat!Slope of daily averages over time (value change per second of epoch time)
stddevValueFloatStandard deviation of daily values. Null when insufficient data.

Connect machines, automate workflows, and build custom apps for print production.