GMI trend: daily scatter + rolling average + linear trend/CI (#19) #26

Merged
willemjan merged 1 commits from dev into main 2026-08-01 20:58:12 +00:00
Owner

Replaces the monthly GMI bar chart with a daily scatter plot, a 7-day rolling average line, and a linear regression trend line with a 95% confidence band (normal approximation, no scipy dependency added, consistent with the existing preference for a lean container image). Recomputed from already-fetched period data on each load; the existing 1-hour cache on load_range_data() already avoids repeated Nightscout calls, so no separate storage layer was added at the current max 90-day window. Verified against real 90-day production data, chart rendered to PNG and visually inspected. Closes #19.

Replaces the monthly GMI bar chart with a daily scatter plot, a 7-day rolling average line, and a linear regression trend line with a 95% confidence band (normal approximation, no scipy dependency added, consistent with the existing preference for a lean container image). Recomputed from already-fetched period data on each load; the existing 1-hour cache on load_range_data() already avoids repeated Nightscout calls, so no separate storage layer was added at the current max 90-day window. Verified against real 90-day production data, chart rendered to PNG and visually inspected. Closes #19.
willemjan added 1 commit 2026-08-01 20:58:04 +00:00
Adds daily_gmi() and gmi_trend(): per-day GMI as scatter points, a 7-day
rolling average line, and a linear regression trend line with a 95%
confidence band (normal approximation, no scipy dependency, consistent
with the existing preference for a lean container image).

Recomputed from the already-fetched period data on each page load; the
existing 1-hour Streamlit cache on load_range_data() already avoids
repeated Nightscout calls for the same period, so no separate storage
layer is needed at the current max. 90-day report window.

Closes gitea #19.
willemjan merged commit 25c3fe6730 into main 2026-08-01 20:58:12 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: willemjan/glucose-dashboard#26