Compare two periods
compare_metric_periodsCompare two periods of a health metric series—newest days vs earlier days or custom windows—to see mean, median, min, max, and differences.
Instructions
Compare two periods of one series: the newest days vs the days before, or two named windows.
To compare CALENDAR periods — "this semester vs the summer", "before and
after I started training" — pass period and baseline, each
"YYYY-MM-DD..YYYY-MM-DD" (an open end is allowed: "2026-09-01.."). days
is then ignored. Without them, the rule below applies.
"Before" means the next-oldest days WITH DATA, so a gap makes the earlier
window older rather than emptier — read previous.first_day / previous.last_day
to see which period you actually got, and quote them.
Returns both windows' mean/median/min/max and the differences. It does not say which window is better; that depends on the metric and on the person.
Carries a coverage block over the days the arithmetic used: quote
coverage.days_covered and coverage.span_days beside any number here.
coverage.window_satisfied: false alone does NOT mean a short history — it is
also false when older days exist beyond the window; coverage.more_available
tells the two apart.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | ||
| fresh | No | ||
| period | No | ||
| series | Yes | ||
| partner | No | ||
| baseline | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||