Statistics Reloaded.

Willem Ferguson willemferguson at zoology.up.ac.za
Mon Jul 31 09:59:30 PDT 2017


Tomaz,

I attach below the mail I sent to the Subsurface group on July 18th as 
well as a follow-up mail that I sent at the time.

Here are the rules:

One would normally not use a bar graph (like your QML graph) to show 
minimum/mean/maximum. One would normally use a graph like in 
Trip_stats.jpg, attached. It is a box plot, not a bar graph. Here, it is 
several groups of dives that are analysed. It may be a number of trips 
(each trip forming a group of dives that is summarised in a single box), 
or, alternatively, a number of years where the dives for each year forms 
a group. In this case there is a box for each trip or for each year.

One uses a bar graph or histogram for summarising in more detail a 
specific measurement e.g. dive depth for only one selected group of 
dives. So the graphs in Dive-stats.jpg, attached, summarise dive depth 
for one single group of dives selected on the dive list. It is only one 
group of dives that is analysed.

I hope my explanation is understandable??

Kind regards,

willem

-------- Forwarded Message -------

Subject: 	Re: Statistics Reloaded.
Date: 	Tue, 18 Jul 2017 15:28:49 +0200
From: 	Willem Ferguson <willemferguson at zoology.up.ac.za>
Reply-To: 	willemferguson at zoology.up.ac.za
Organization: 	University of Pretoria
To: 	Davide DB <dbdavide at gmail.com>, Subsurface Mailing List 
<subsurface at subsurface-divelog.org>



On 18/07/2017 11:40, Davide DB wrote:
> They wouldn't be scattered.
> It's a simple approach:
>
> #1 you (eventually) filter your data via the multi-filter on the top
> #2 you choose the type of statistic to apply, or how to represent them
> via one of the "stats tab" you have available.
>
> Once you come out with a new graph/stat you simply add a new tab.
>
> Regarding UI layout, just look at the attachment: it's my Subsurface
> on a popular 1280x720 crappy monitor.
> You can see that the current multi-filter seems cut on the lower
> border and all items aren't properly spaced/distributed. For a proper
> design we should increase vertical space a bit to display correctly a
> certain number of items at least. We have few space remaining for dive
> list. Now imagine to draw statistics in the dive detail box...
> Regardless of the way you will choose to implement stats, it doesn't
> seem to me a good graphical design. Too much things in one screen.
>
> BTW you are the programmers so you have the power :)
>
> Bye
>
Attached two mockups of screen layout. The filter tool only has one
button "Statistics". If this button is selected, the Statistics screen
shows up as in Dive_stats.jpg, attached. This is the default statistics
view for the "Statistics" button in the filter tool and shows a
histogram for each of the four variables currently calculated in the
code. In addition, it shows the minimum, mean and maximum (in text) for
each variable. If the statistics for "Trip" are selected in the tabs at
the top of the statistics panel, then the view changes to that shown in
"Trip_stats.jpg", attached. In this case there are nine trips that
result from using the filter tool, shown along the X-axis of each graph.
For each trip, the vertical bar represents minimum, mean and maximum.

Tabs could in future be added to the top of the Statistics panel to
perform new or additional calculations, so there is expandability in the
system.

Commentary, please...?

Kind regards,

willem

On 19/07/2017 18:45, Tomaz Canabrava wrote:

> Hey people,
>
> I'll have one week to work on subsurface because of Akademy, without 
> work or wife interference
> So I really think I'll be able to do something good there.
>
> About the mockups - they are good for desktop but they don't take into 
> account mobile.
> but I'll try to do that.
>
> Tomaz
Tomaz,
That would be great. There is one issue we discussed that was not 
finalised, the number of bars in each of the histograms. You could 
initially use a fixed scheme and I or someone else could adapt it 
afterwards to be more flexible without UI intervention. Alternatively, 
here is a (sort of) algorithm that is likely to work to calculate the 
number of bars. Maybe you have your own ideas, then please ignore all of 
this.

# For each histogram:
# -------------------
binvalue = {1.0, 2.0, 2.5, 5.0, 10.0, 20.0}
Find minimum and maximum values of data to be graphed
range = maximum-minimum
BinSize = binvalue with size just > (range/10)
# e.g. if (range/10 == 3) then BinSize = 5;
# with our testdata (range/10=5.6969) then BinSize=10
Startvalue = largest multiple of BinSize just < minimum

In case that my help you, I attach a LibreOffice spreadsheet that uses 
this algorithm on a dataset of 54 values (the blue column).
Ignore the multiplier value. A histogram (red bars) representing these 
values is also shown. Unfortunately LibreOffice does not place the 
numbers below the graph in the correct places.
Basically this uses part of the calculations one would do anyway to draw 
a histogram. Only difference is that we dynamically determine BinSize 
and Startvalue based on the chracteristics of the data.
I attach an image if what that histogram should look like if all labels 
were written correctly. The bars can be wider and touching or narrower 
like in the attached jpg file. I personally prefer wider bars.

I hope this is understandable.

Kind regards,
willem




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20170731/dffeeaab/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Dive_stats.jpg
Type: image/jpeg
Size: 68617 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20170731/dffeeaab/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Trip_stats.jpg
Type: image/jpeg
Size: 70114 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20170731/dffeeaab/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Histogram.ods
Type: application/vnd.oasis.opendocument.spreadsheet
Size: 20923 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20170731/dffeeaab/attachment-0001.ods>


More information about the subsurface mailing list