feat: enhance recovery dashboard with vital signs analytics and visualization improvements
- Updated the `build_vital_signs_matrix_chart_payload` function to accept optional keys for omitting specific snapshot data, improving flexibility in data presentation. - Enhanced the `build_recovery_dashboard_kpi_tiles` function to conditionally merge heart and autonomic tiles based on new parameters, refining the dashboard's insights. - Integrated new analytics features in the `RecoveryDashboardOverview` component, including consolidated paragraphs for better narrative context and visual representation of trends. - Improved the handling of vital signs data in the frontend, ensuring clearer messaging and enhanced user experience when displaying vital metrics.
This commit is contained in:
1 parent
e7bcdc3228
commit
8cb5ad992f
7 files changed
+299
-166
No files matched your search
@@ -83,13 +83,22 @@ def get_recovery_dashboard_viz_bundle(profile_id: str, days: int) -> Dict[str, A
|
||||
float(hrv_dev) if hrv_dev is not None else None,
|
||||
)
|
||||
|
||||
hrv_f = float(hrv_dev) if hrv_dev is not None else None
|
||||
rhr_f = float(rhr_dev) if rhr_dev is not None else None
|
||||
|
||||
charts = {
|
||||
"recovery_score": build_recovery_score_chart_payload(profile_id, chart_days),
|
||||
"hrv_rhr": build_hrv_rhr_baseline_chart_payload(profile_id, chart_days),
|
||||
"sleep_duration_quality": build_sleep_duration_quality_chart_payload(profile_id, chart_days),
|
||||
"sleep_debt": build_sleep_debt_chart_payload(profile_id, chart_days),
|
||||
"vital_signs_matrix": build_vital_signs_matrix_chart_payload(profile_id, vital_days),
|
||||
"vitals_history": build_vitals_history_and_analytics(profile_id, vital_days),
|
||||
"vital_signs_matrix": build_vital_signs_matrix_chart_payload(
|
||||
profile_id,
|
||||
vital_days,
|
||||
omit_snapshot_keys={"resting_hr", "hrv"},
|
||||
),
|
||||
"vitals_history": build_vitals_history_and_analytics(
|
||||
profile_id, vital_days, hrv_vs_baseline_pct=hrv_f, rhr_vs_baseline_pct=rhr_f
|
||||
),
|
||||
}
|
||||
|
||||
conf = "medium"
|
||||
|
||||
Reference in new issue
Block a user