[bisq-network/bisq] [Feature] Improvements to BSQ supply charts and figures (#3753)

dmos62 notifications at github.com
Sat Dec 14 15:44:08 UTC 2019


Update:

I've implemented automatic re-ranging of the Y axis to the inliers (preventing chart distortion due to outliers). Screenshot [0]. The implementation took much longer than expected, largely because I'm new to the codebase and I'm new to Java development.

[0] BSQ burned chart ranged to inliers, notice the 3 outliers that are outside the chart's Y axis.
![BSQ burned chart ranged to inliers](https://user-images.githubusercontent.com/2715476/70848767-897f0a80-1e76-11ea-8e90-b1a69d732f16.png)

#### Outliers are significant

While finishing up this feature, it became apparent, as pointed out by @chimp1984. that what I've labeled as outliers are significant as well. While, these outliers, are on a different scale than the rest of the data points, thus difficult to compare, they are still interesting to compare among themselves. They are "valid events" as @chimp1984 put it.

Since this feature "pushes" outliers off-screen, as seen in the screenshot [0], it makes comparing the magnitudes of outliers impossible. Only their frequency can be comfortably assessed. A tooltip would allow to see the exact values, but the objective is to be able to make visual comparisons.

There is an immediate solution, which is to implement a UI switch, to switch between inlier-only mode (what I've implemented so far) and the normal all-data mode. That would effectively be  switching between being able to examine the inliers and being able to examine the outliers. It could be a checkbox labeled "Set range to inliers".

#### Another look at the use cases

Currently, based on feedback from @ripcurlx and @chimp1984, I assume that there are 2 major use cases for these charts:

1) compare the rate of BSQ issue to the rate of BSQ burn, because it's an indicator of the project's ability to sustain its contributors (correct me if this could be phrased better); and,
2) independently examine the trends in BSQ issued and BSQ burnt, because BSQ issue and burn are distinct processes, and thus their understanding requires independent analysis.

#### Another look at the current state of charts

Currently, using charts (and not figures), we can examine the outliers in the BSQ burnt chart [1] (because the inliers are distorted to flatness), and we can examine the trends in BSQ issue [2]. That's the realm of use case 2). As far as 1) is concerned, rate comparison of BSQ issue and burn can't be effectively compared in the charts at this time.

[1] Current (two week old to be more accurate) BSQ burnt chart: only outliers can be examined.
![BSQ burned chart](https://user-images.githubusercontent.com/2715476/70849520-bd126280-1e7f-11ea-80ec-4bbfc9593b40.png)

[2] Current BSQ issued chart: apart from 0 not being on the Y axis, good chart; note that 1 month interval is used, because BSQ is issued in approximately 1 month intervals.
![BSQ issued chart](https://user-images.githubusercontent.com/2715476/70849532-e632f300-1e7f-11ea-8b3b-ba89410a33c3.png)

In this context, the feature I've implemented, automatic re-ranging to inliers [0], allows examining the BSQ burnt inliers, but not outliers. So on it's own it's not enough to solve use case 2).

#### BSQ burnt noise and log scale

Looking at the new screenshot [0], the inliers have trends, there are following problems:

- the daily BSQ burnt series is logarithmicly distributed, but linear scale is used (because JavaFX doesn't support logarithimic axis);
- the daily BSQ burnt series is noisy, which makes trend analysis difficult;
- as mentioned, outlier magnitudes are unknown.

Implementing logarithmic charts without new dependencies is a big project, so we're stuck with linear at least for a while.

There might be an elegant solution to fixing the other two problems, however. A moving average would help with the noise, and, maybe more importantly, would visualise the influence of the outliers (which could be considered as extreme noise) on the rest of the trend.

#### Time-frames and intervals

Observations pertaining to time-frames and intervals:
- BSQ is issued once a month, approximately, so finer intervals aren't interesting for this series;
- BSQ is burnt often, and daily interval seems like the fastest interesting interval;
- To compare BSQ issued and burnt, both series should be in the same (monthly) interval;
- Since we're displaying all the data we have, with time it will get more and more horizontally squeezed;
- Current effective time-frame is around 9 months;
- On the daily BSQ burnt chart the points are already a bit squeezed, but being able to switch to a 6 or 3 month time-frame, in my opinion, would not give a substantial increase in analytical capability (it will later, however).

Citing the last observation, I think implementing different time-frames is less needed at this time than some other changes.

Also, since the independent analysis of BSQ issue and burn and the comparison of BSQ issue and burn have different time interval requirements, we probably need a third chart, dedicated to comparing BSQ issue and burn in the monthly interval. That would be the start of accomodating use case 1).

#### Conclusions and next steps

We discussed the following use-cases: 1) compare BSQ issue and burn, and 2) do independent analysis on both BSQ issue and burn. To accomodate them, the charts need a lot of reworking: currently the charts do not allow comparison of BSQ issue and burn, and the analysis of BSQ burnt is also severely lacking.

The automatic re-range to inliers feature I'm introducing now is only one of the steps towards effective charting of the BSQ burnt series. If it were merged, what would be lacking is outlier magnitude information, and a moving average or something similar to gauge the influence of outliers to the trend and for dealing with noise in general.

Proposals:
- to fix BSQ burnt chart, a UI switch to switch between inlier range and full-range, so as to be able to examine both inliers and outliers, even if not at the same time;
- to fix BSQ burnt chart, a moving average, so as to extract trend information from the noisy series;
- to accomodate for use-case 1), I propose a third chart with two lines visualizing monthly BSQ burn and issue, one on top of the other;
- implement time-frame/interval controls after that.

Note: I plan to now implement the UI switch before submitting a PR. Without the UI switch, the ability to examine outliers' magnitudes is lost, so it would feel like 1 step forward, 1 step back.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/issues/3753#issuecomment-565728480
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191214/ed98ffe6/attachment-0001.html>


More information about the bisq-github mailing list