1. Video tutorial shows a new way to prepare the data using self Union.

    A few days ago, one of our #MakeoverMonday Data Camp mates Jocelyn Ji created a viz based on radial bar chart. It looks interesting. So I dug into it and found the original approach is published by Toan Hoang. Tableau's product guru Bora Beran also created a similar chart a while ago.

    I found that the calculation of the chart can be made a bit easier:
    - all (nested) table calculations only need to compute along a single dimension.
    - shorter bars need fewer data marks. Total data marks are reduced.

    Here is my approach, based on the same data set as Hoang's, with an extra column Type. This table can be generated using Union or Cross Join from the original data.
     
    Path is created from Type. The largest value will have 271 data marks. The smaller values will have less marks, in proportion to the Values. The previous solutions need a uniform number of data marks for each bar, no matter what the bar size is.

    Path is defined as such where each bar has a different number of data marks. The largest has 271 marks. 271 is an artificial number. We may give a different one if we wish. The bigger the number, the smoother the curve.
    • CASE  [Type]
    • WHEN 1 THEN 0
    • WHEN 2 THEN [Value]*270/{MAX([Value])}
    • END
    Format Path as Integer. Then Create a bin on Path with step size 1.

    To trigger data densification by Path bin:
    - Drag it to the Rows, right click it and select Show Missing Values
    - Then drag it to the Path shelf of line chart data mark.
    - Note in our example, at the bottom-left corner, the number of data marks is showing 731 from initial 10.

    The calculated fields are created as follows:
    - Pi = Window_Max(Max(Pi()))   //Pi for every data point.
    - Rank = Rank_Unique(-Sum(Value))  //Reverse rank as radius.
    - Rank Max = Window_Max(Rank)  //Rank available at every data point.

    Coordinates are calculated as follows, the same as those of a circle:
    - XCOS((Index()-1)*[Pi]/180)*[Rank Max]
    - Y = SIN((Index()-1)*[Pi]/180)*[Rank Max]

    The first 3 calculated fields are nested within X and Y. We need to edit the table calculations of X and Y to set up those for each of the nested fields.
    Among the 5 calculated fields, 4 are computed along Path bin. The exception is, Rank is computed along Name. Select each of the nested dimensions and set it properly.

    The labels are placed at the start of the lines using the appropriate option, with matching colors.

    Voila, we got the viz as follows. You can view/download the interactive viz by clicking the picture below.
    https://public.tableau.com/views/RadialBarChart_1/Dashboard1?:embed=y&:display_count=yes
    Filtering the Chart
    If you have extra data columns in your original data and need to add filters, set the filters to be context ones. This way, they act before the LOD calculations in Path.
    14

    View comments

  2. Last week's #MakeoverMonday data set is about top job skills. Two of the vizzes caught my attention. They both used arrows to show the ranking changes in top skills.

    One was selected as the Viz of the Day on 4/27/2017. Simple, crisp and elegant design!
    The other is by Georgia Chen, selected by Andy Kriebel in his comments of the week.
    Between the two, I would say, highlighting changes with color does make a difference in providing values to viewers. With just a little coloring, we show the trend in top skills. Otherwise, it's a little hard to see. Changes are something we are attracted to. Like Andy Kriebel said in his comments, changes give us context.

    The author David Krupp did think the changes are important because he included them. Highlighting them would make the viz even more powerful.

    Below is my slightly tweaked version based on David's viz, while preserving the original color scheme.
    The technique of showing arrows is based on custom number formatting. Check this post out for details.

    That's my tweak of the day. Click pictures to see the vizzes.
    0

    Add a comment

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