The other day, Rajeev Pandey asked me a question regarding the calculation in his dashboard privately. I didn't have time to look into it. Fortunately the gracious Simon Runc found that the issue was in data densification.

Rajeev is trying to replicate a viz by Zen Master Rody Zachovich, which seems to be inspired by a viz of Cody Crouch.

I spent some time looking into both the vizzies. I found a few computational solutions which may be interesting to share.

1.Data set reduced to 2 rows
Only two initial rows per curve are needed in Bézier curve calculation, even when the curve is a concatenation of multiple piece-wise Bézier curves.

In Rody Zachovick's NFL viz, we found that only Path={0,2} are necessary per curve instead of 4 rows. Rody used two pieces of Bézier curve and hid part of it.
In Cody Crouch's Golf viz, we found that only Path={0,3} are necessary per curve instead of 4 rows. It consists of 3 pieces of Bézier curve, although the last piece is actually a straight line.
All the rest of data marks can be generated by data densification from the two rows.

2.One Bézier curve instead of two
Rody made use of two pieces of Bézier curve in his viz. I found that, given it's a single concave curve, we need only one Bézier curve to approximate it. So, I made changes to the formula and the resulting viz looks like the same. The total number of data marks is cut by half. The curve still looks very smooth. The formula is a bit simpler too.

By the same token, Cody's viz can be designed with one Bézier curve plus a straight line. I will leave it to whoever wants to give it a try.

3.Simplify calculation
Bézier gave his famous quadratic equations as follows:
This is the general form. In special cases, these function can be simplified.

For example, when Y0=Y2=0, we have Y's calculation simplified as follows:
Then we replaced part of the calculation in X by Y. Note that 0.6 is a control coefficient on the horizontal position of the highest point.
That's the tweak of the day. The purpose here is to simplify the application of Bézier curve.

Have fun with Tableau! Feel free to view and download the modified viz.
0

Add a comment

(Refresh the page if you want to view the gif image multiple times. Or go to Tableau Public and click the button at the top-right corner.)

Jake and I collaborated on a dashboard. He told me that he learnt a way to create an in-place help page in Tableau. He first saw it at a conference somewhere and couldn't recall who the speaker was. So I am blogging here about it but the credit goes to somebody else. If anyone knows who the original creator is, leave a comment below.

The key idea is to float a semi transparent worksheet on top of the dashboard, where a help text box is strategically placed on top of each chart. This way, we can explain how to view each chart and what data points are important, etc. This worksheet is collapsible by a show/hide button. 

Below I would like to show how this worksheet can be constructed.

1. Sheet with a single data mark.

  • Double click the empty space in Marks panel and add two single quotes. Make the null pill a text label. This creates a single null mark.
  • Set the view as "Entire View"

2. Create an show/hide button

  • Go to the target dashboard
  • Drag a floating vertical container to the dashboard, making it cover all the area of interest.
  • Drag the Single Null Mark sheet and drop it into the above container. Hide the sheet title.
  • Create an open/close button for the container and place the button at the top-right corner.

3. Add annotations

  • Format the sheet background opacity as 70% in the layout manager             
  • Select area annotations and place them anywhere of interest. 
  • Write help text and format it to highlight important messages.  
  • The text can serve as functional guide and/or insight guide.

Here is an example. Feel free to download the workbook and explore. Click the "i" button at the top-right corner to view the in-place help. 

0

Add a comment

Blog Archive
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.