<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">---------- Forwarded message ----------<br>From: Willem Ferguson <<a href="mailto:willemferguson@zoology.up.ac.za" target="_blank">willemferguson@zoology.up.ac.za</a>><br>To: Dirk Hohndel <<a href="mailto:dirk@hohndel.org" target="_blank">dirk@hohndel.org</a>><br>Cc: Subsurface Mailing List <<a href="mailto:subsurface@subsurface-divelog.org" target="_blank">subsurface@subsurface-divelog.org</a>><br>Bcc: <br>Date: Sat, 16 May 2020 16:13:52 +0200<br>Subject: Re: RFC: Statistics in Subsurface<br>
<div>
<p>This is just an attempt to enumerate how many types of graphs one
is likely to need, given the discussion until now. As a basis I
use Dirk's Proposal for selecting a appropriate graph.</p></div></blockquote><div>Very good to try to organize things, so thanks for initiating this... </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div>
<p><img width="521" height="361" alt="" src="cid:1721e65e4cadd29c5e41"></p>
<p>In the above diagram, the different types of variables have
different colours.</p>
<p>1) The yellow ones are just totals (Total # dives, Total no.
minutes/hours) that are unlikely to have any associated minimum or
maximum.</p>
<p>2) The blue ones are variables defined in terms of categories.
Date : day, week, month, etc; Trip : trip locality; suit: type of
dive suit; tags : tag text. There is no dive suite value inbetween
wetsuit and semidry suit because they are two distinct categories.
<br>
</p>
<p>3) The white ones are continuous numeric variables. Duration can
potentially have any arbitrary number of minutes or hours. The
same goes for Max_depth, Min_temp, SAC, and all the other white
ones. Inbetween any two arbitrary depths there are innumerable
intermediate depths and depth only becomes a value along a
continuous scale.<br></p></div></blockquote><div>I would categorize "Dive Type" in blue. It isn't a continuous variable, and choices are distinct: free, OC, CCR, etc.</div><div><br></div><div>One thing to think about that applies to tag and suit -- those fields allow the user to provide a comma-separated list. Suit may be something like: 5mm, 5/3mm hoodie, gloves. Tags could be: "wreck, night, deco"</div><div><br></div><div>how will filtering handle this? I hope it will separate the comma-separated list to allow filtering. For example I may want to look only at night dives but it is rare that this is the only tag used.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div><p>
</p>
<p>The type of graph that best depicts a relationship between two
types of variables depends on the colour that each of the
variables above has. I need to emphasize that the graphs below are
totally open to discussion. The purpose here is to assess how many
types of graphical elements one would need for a basic statistics
tab in Subsurface.<br>
</p>
<p>Plotting a yellow variable against a blue variable is probably
best represented by a simplistic bar graph like:</p>
<p><img width="248" height="395" alt="" src="cid:1721e65e4ca2cca5a202"></p></div></blockquote><div>Agree that bar graph makes the most sense here. Does this become a graphics/UI issue if there are many distinct items in the X axis? </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div><p></p>
<p>There are no min and max values to indicate. The different suit
categories are indicated along the horizontal axis. There is no
need to specify a degree of "granularity" or increment along the
horizontal axis and no min or max values are involved.<br>
</p>
<p>If one plots a yellow variable against a white (continuous)
variable, then a granularity/increment needs to be specified. In
the image below, an increment of 20m was used.</p></div></blockquote><div><br></div><div>Based on some earlier discussions on this topic, the user may want to choose the granularity, but that complicates the user interface. Depending on the choice of white (continuous) variable, will there be fixed granularity? I don't have a good answer for this question. For the recreational diver it is easy to choose fixed increments in metric and imperial units that make sense. For tech divers that go really deep, the increments would need adjusting. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div>
<p><img width="267" height="425" alt="" src="cid:1721e65e4ca523808fe3"></p>
<p>.....snip.......</p></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div><p>The above graphs deal with yellow variables in Dirk's proposal.
Now about the other categories. Plotting a White variable against
a Blue variable has several options, including box and whisker
plots that are not popular in this discussion. My proposal two
days ago was something like this and there was some discussion
around it:</p>
<p><br>
</p>
<p><img width="331" height="306" alt="" src="cid:1721e65e4ca9e4885e15"></p>
<p>Here SAC is a white (continuous) variable and Suit is a blue
(catagorical) variable. A graphical element that is likely to
differ sharply from the bar graphs used above. Here again, because
the horizontal axis comprises categories, there is no need to
specify a granularity/increment. For lack of a better name (there
is actually a esoteric statistical name for this graph) I call
this a dot graph.</p></div></blockquote><div>I don't use QML/QT. I either get stats packaged up in an expensive stats/database tool (TIBCO Spotfire) or I use Python for lab stuff. In python, the simple dot graphs repeated points are over-written. Bee swarm style plots preserve the data collection and I have those choices in Spotfire and python, but unfortunately a quick google search doesn't show a QML package that supports swarm plots. Hopefully I'm wrong because it seems that there's general support from 3-4 of us on this style of plot. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div>
<p>What about plotting a Blue (categorical) variable against a White
(continuous) variable? For our case the order in which the blue
and white variables are selected probably does not matter and the
dot graph shown above (or some derivative of it) should suffice. <br></p></div></blockquote><div>Is that planned? Based on the user interface at the top of this discussion I don't think a user can plot a categorical variable against a continuous. I must be misunderstanding what you mean. For example we CAN plot duration by date, but plotting date by duration makes no sense. Plotting duration by date and by depth is possible. I'm not sure how we'd deal with the X axis. Obviously in advanced stats tools we can add a 3rd dimension for surface plots, or use colors and other visualization aids. I don't want to complicate this for subsurface so I'd suggest this is not supported.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div><p>
</p>
<p>What if a white (continuous) variable is plotted against another
white variable (e.g. dive duration against dive depth). The most
appropriate type of graph is probably as scatter diagram:</p>
<p><img width="287" height="251" alt="" src="cid:1721e65e4caef6b8eec6"></p>
<p>The raw data are indicated on the graph. There is no need for
specifying a granularity value because there in no grouping of
values along the horizontal or vertical axes. If a clear
relationship between the two variables exists, it is clearly
visible on the graph as in this case.</p></div></blockquote><div>I think most graphing packages support scatter plots and I believe they are easily understood. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div>
<p>We have now dealt with <br>
</p>
<p>Yellow/white</p>
<p>Yellow/Blue</p>
<p>White/Blue and Blue/White<br></p></div></blockquote><div>See comment above about Blue/White </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div><p>
</p>
<p>White/White</p>
<p>What about Blue/Blue?<br></p></div></blockquote><div>I'd suggest that this is another example of a feature that will take time to write and support with limited appeal. Just an unsubstantiated opinion so take it for what its worth.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div><p>
</p>
<p>There is another type of graph that is potentially extremely
useful : introduce a *third* variable to the graph. For instance,
in the case of the second blue bargraph towards the start of this
message (No.dives vs depth) one could ask what the distribution of
a third category is. For instance, how long did I use various dive
suits at different depths? Or how many dives did I use different
dive suits at different depths? This is the above barchart,
divided into the values for different dive suits. This is also
useful to analyse variables used as tags, e.g. the use of
air/nitrox/trimix during dives, the number of boat/shore dives,
the number of training dives compared to fun dives, the number of
dives using different dive modes as a function of depth, dive
duration, temperature, or whatever white variable has been
selected.<br></p></div></blockquote><div>I showed an example of this earlier, but has a continuous connection between the bars. I think most people did not like it. This is clearly with individual bars. If the developers think this is reasonably easy to implement, then great. If not, then again I'd say it is nice to have but probably a seldom used feature. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div><p>
</p>
<p><img width="226" height="366" alt="" src="cid:1721e65e4ca1d29ca987"></p>
<p>Since the horizontal axis corresponds to a white (continuous)
variable, one would need to specify a granularity/increment. The
UI cost for this would be an additional dropdown list/comboox to
select the appropriate categorical variable to appropriately
subdivide each bar of the graph (Dirk's Granularity??). This
diagram handles cases of graphs with a blue(categorical) variable
plotted against another blue (categorical) variable, although a
third variable needs to be specified to form the unit of
measurement (e.g. dive duration in the above graph). This can
probably be selected using Dirk's Granularity Combobox in his
proposal.<br>
</p>
<p>This handles basically all the possibilities of the different
combinations of Yellow, White and Blue variables in Dirk's
proposal. There are fundamentally FOUR types of graphs that would
be required, forming the basis of visual presentation of the
Statistics tab.<br>
</p>
<p>I hope this appears somewhat useful in the present discussion.</p>
<p>Kind regards,</p>
<p>willem<br></p></div></blockquote><div><br></div><div><br></div><div>Thanks again for the details you've provided.</div><div><br></div><div>...Hartley </div></div></div>