When creating graphs for the Zepp data, I identified that the [Stress proportions graphs)(https://www.bentasker.co.uk/posts/blog/software-development/extracting-data-from-zepp-app-for-local-storage-in-influxdb.html#stress_proportions) are really not that informative when based on the raw data.
They include sleeping hours, which (normally) will drag the average down. So, you can have an average score despite having hugely stressful days as long as it's not disturbing your sleep.
Whilst the overall average is a useful measure to have, it's also useful to have a measure of the value outside of sleeping hours.
Activity
26-Aug-23 10:48
assigned to @btasker
26-Aug-23 10:50
With the Zepp data, I used a Flux query:
I'd quite like, though, not to need that complexity at query time - it'd be better if the script could write a second field which excludes normal sleeping hours (although it'd be ideal to do this dynamically, I don't think that there's currently a way for us to tell that the wearer is asleep).
26-Aug-23 11:01
mentioned in commit 680f5c665e1eaecedef628cb84beced9fc6e730d
Message
Add new field
stress_exc_sleep
utilities/gadgetbridge_to_influxdb#6This adds a new calculated field containing reported stress scores, but only for hours not considered sleeping hours (defined in env var
SLEEPING_HOURS
).This allows a daily average stress score to be calculated which excludes sleeping hours.
26-Aug-23 11:02
We can now calculate a daily mean with
26-Aug-23 11:09
mentioned in issue #2