get_trends
Compare a health metric across the current and previous N-day windows to reveal change, percent change, and direction, while validating that sufficient data exists.
Instructions
Compare the most recent N-day window against the prior N days for a metric: change, percent change and direction (up/down/flat). Also returns daysAvailable and windowSatisfied: if windowSatisfied is false the file does not hold enough history for the window you asked for, and the comparison is over less data than requested. Logged point events inside the compared span are listed as segmentBoundaries.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metric | Yes | ||
| window | No | days per window (default 7) | |
| excludeTravelDays | No | Drop days on which a timezone change landed (health-days.json): those days were not 24 hours long, so their totals are stretched or shortened by the clock. The answer reports how many days were excluded and why. |