Give a chestnut! Tableau Tips (35): Learn to do Nightdingale Rose Chart Nightingale rose diagram

published: 2021-05-31

In the work, if you encounter the situation where you need to calculate the total cost or the proportion of each part of the amount, we can use the pie chart to directly display the various components and the proportion.

However, if the pie chart partition is large and dense due to the large number of components, the chart becomes difficult to observe.

Can it be equiangularly distributed (small items are not ignored), and can reflect the size of each item (higher proportion of items)? Can you also compare the differences between different types (multi-angle analysis)?

There is a chart that meets these needs, and it is the Nightingale Rose.

“Nightingale rose diagramInvented by Florence Nightingale, also known as the polar map, is a circular histogram. Out of concern that the results of the statistics will be unappreciated, she created this colorful chart format to make the data even more impressive.”

As shown in the following figure, the sales of three types of products (electronics, furniture, office) are summarized and analyzed in one year and twelve months: 

That is to say, the proportion of sales of each type of product in one year and 12 months, the sales will be highlighted;

You can also see the difference in sales of the three products per month;

At the same time, it can also reflect the overall situation of the whole year, that is, the area of red is larger than the area of blue, indicating that the sales of electronic products are higher than that of furniture products in one year.

So how do you make Nightingale Roses in Tableau? 

In this issue of "Give a Chestnut", Ada's Tableau technique to share with you is: Learn to do Nightingale Rose.

Specific steps are as follows:

Step 1:prepare the data structure of the following figure type

Step 2: create a data bucket of the Path field

Import the data source into Tableau Desktop, first create a bucket of Path fields.

Step 3: create eight calculated fields

Create a calculated field INDEX(), named Edges, which is used to calculate the angle.

Create a calculated field ([Edges]-1)*(2*PI()/WINDOW_MAX([Edges])) and name it Angle.

Create a calculated field INDEX(), named Count, to calculate the number of slices.

Create the calculated field WINDOW_MAX([Count]) and name it Number of Slices.

Create a calculated field SQRT (AVG([Sales])/PI()), named Radius, where AVG is actually modified.

Create the calculated field INDEX(), named Index, which is used to calculate the X and Y axes.

Create a calculated field

IIF([Index]=1 OR[Index]=WINDOW_MAX([Index]),0,WINDOW_MAX([Radius])

*COS([Angle]+((([Index]-2)*WINDOW_MAX(2*PI())/([Number of Slices]*99)))))

Named X

 

Create a calculated field

IIF([Index]=1 OR[Index]=WINDOW_MAX([Index]),0,WINDOW_MAX([Radius])

*SIN([Angle]+((([Index]-2)*WINDOW_MAX(2*PI())/([Number of Slices]*99)))))

Named Y

At this point, you should complete the creation of 8 calculated fields, as shown below:

Step 4: start drawing

Drag Data into the color and display it as a month, drag the Product Category into the detail and convert it to a color, and select the shape as: Polygon, then load the Path into the row.

Right-click on the Path to display the missing values.

Then drag the Path (data bucket) into the path of the tag card, then drag X into the column and Y into the row.

Step 5:Modify XY calculation basis

Why not have anything? Here, you need to modify the calculation basis of X and Y. For example, the calculation basis of X is as follows:

The same calculation basis is configured for Y, and after completion, the rose diagram comes out.

Step 6:Adjust the Product Category field sort

Why is there only two colors in the picture above? In fact, it is because the big picture covers the small picture. At this point, you only need to adjust the sorting of the Product Category field.

 Step 7:Adjust format and color

Finally, the format and color adjustment can be adjusted, and the order can be adjusted in multiple months. The rose map is made.

You can also add more text information (such as the percentage) and adjust more formatting (such as lace) to make your chart more readable.

Today's Tableau tips, are you getting it? Open your Tableau and try it out!