derdilla / blood-pressure-monitor-fl

A cross platform app to save blood pressure values with export function
MIT License
68 stars 12 forks source link

[FEATURE] - Improve statistics #179

Open derdilla opened 1 year ago

derdilla commented 1 year ago

What you want:

Why you want it:

Currently, the statistics page is only a small thought and doesn't live up to its potential. It's neither fast nor something I like to look at.

In its current form it isn't really useful to anyone and people export the measurements to different apps for further analysis.

xandro0777 commented 6 months ago

Blood pressure values are often very different at different times of the day so it should be possible to break down the statistics to consider measurements at similar times of day.. eg morning, noon, evening separately.

lutzarno commented 2 months ago

I would like to be able to select whether the average value or the median value is used for a distribution graph on the statistics page. With the average as separating line values tend to accumulate on the left side of that line.

derdilla commented 2 months ago

@lutzarno I'm not quite sure I fully understood your idea. The average text is always displayed at the horizontal center of the distribution. If you're talking about the dotted line, it is also positioned independent from the values and the graph should be symmetric to it.

If this is more about seeing the median value, I could display it bellow the average without needing an option 🙂.

lutzarno commented 2 months ago

So the average displayed at the horizontal center is actually a mean value? Looks like I mistook the average as just (MAX+MIN)/2.

I guess the distribution of the values was misleading me. I exported the measurements and calculated their mean and median. The differences are actually minimal (Mean: 120,6/72,8/69,0 Median: 120/73/69).

I still can't understand why the graph looks wrong to me then.

derdilla commented 2 months ago

@lutzarno

Here is how I understand the terms (for reference): ### Average / Mean: - `sum of values / number of values` ### Median: 1. sort all values 2. take the value in the center (`values[values.count / 2]`)

The graph

I still can't understand why the graph looks wrong to me then.

If you are using an app version before v1.7.1 there was a calculation error in the graph.

To clarify what behavior I expect (this should probably be explained in the app): The graph in the value distribution counts how often you saved the corresponding value.

For example: take the list of sys measurements 123, 122, 120, 123 will result in the following bars and relative heights 120(1), 121(0), 122(1), 123(2).

pimlie commented 1 month ago

It would also be great if there was an overview with all/total statistics, not just for the current selected time frame. While testing bluetooth input I'm often confused as my bluetooth device has a broken clock and always reports a time in 2021, and as both the home as statistics screen show information for the current selected time frame (by default) those stats reported as 2021 seem missing.

Maybe the measurements could differentiate between the time of the measurement and the time the measurement was added? Then we could also show a screen with latest added measurements. Could also be helpful if we want to add an 'import' mode that downloads & imports all recorded measurements from a bt device

derdilla commented 1 month ago

@pimlie I would prefer your other solutions like allowing to ignore the time submitted by the device or automatically updating the clock. Two timestamps would be a little unexpected and would need some explanation.

Does the lifetime interval miss any measurements for you?