Trend of one metric
metric_trendDetermine the slope and fit quality of a WHOOP metric like recovery, HRV, sleep, or strain across a date range, with rolling means for trend analysis.
Instructions
Compute the direction and rate of change of one metric over a range.
Args: metric: One of "recovery_score", "hrv", "resting_heart_rate", "sleep_performance", "sleep_efficiency", "strain". start: ISO 8601 start of the range. end: ISO 8601 end of the range.
Returns the least-squares slope in metric units per day. A slope is a description of the window requested, not a forecast. Also returns an r² fit-quality figure for that slope -- both as the number and as a word ("strong"/"moderate"/"weak"/"negligible") -- and 7/30/90-day rolling means of the metric over calendar days.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | ||
| start | Yes | ||
| metric | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||