msupply-foundation / mobile

Open source mobile app for medical inventory control
http://msupply.org.nz/mobile
Other
43 stars 27 forks source link

Mobile Vaccines: Sensor Detail Graphs #3644

Open RowenaN opened 3 years ago

RowenaN commented 3 years ago

Describe the bug

In general bar graphs/histograms are often not a great choice for continuous (time series data) - they are generally used when we want to compare variable (discrete data). If using for time series data, need to be really careful with their design.

image

In the above graph:

The line graph of the data is better (right type of graph) but still has a number of issues:

image

It took me a while to work out that I was not looking at a graph of two sensors. I know that the user guide might have information but think that the graph needs some sort of explanation?

The graph needs an average for each time period in order to make sense (and also to provide perspective for the stats underneath the graph). Again if you look at the first time period, we don't know if the min/max values are outliers or common values. Having an average (or median) line would provide this information.

I am not sure of the meaning of the data points (small circles). I think that they are the max/min value during x time period. What is x? Does x change depending on the graph date range (if yes this would be misleading)? The circle seems to be at the beginning and end of the time period - error? Given that the min and max are at the same time is very misleading - this is not possible - would be better graphed against the exact time stamp or the time period needs to be illustrated on the graph.

Oooh, you know what would be really good - histogram with max and min for each time period with an average line graph.

To reproduce

Given that you can play around with the date range, it would actually be possible to either manipulate the data or misread the data. Neither would be good.

Expected behaviour

Good clear graphs and provide easier analysis for good decision making

Proposed Solution

I really would recommend removing the bar graph and sticking with a good line graphs. Much better suited to the data.

Version and device info

Sorry, don't know.

Additional context

Of course, clients also love pretty graphs and often aren't too concerned about accuracy. I would expect that the actual statistics on the card are always going to be of more practical use.

wlthomson commented 3 years ago

I think all of the above are good points! Unfortunately, I think at this point in time it's a bit of a moot point, as the work required to change the visualisation wouldn't be trivial (and would require retesting!). Since we are focused on getting a release out at the moment, this is probably something best revisited at a later time (at which point changing the visualisation might be harder to justify, but I think the points you raise are valid and worth revisiting!).

Another reason to revisit: as I wasn't involved in the current visualisations, I wouldn't want to make any moves on this before getting the thoughts of @joshxg and @mark-prins, who have more understanding of the thinking behind the existing visualisations (and are currently tied up working on other functionality).