Miss Universe is one of the beauty pageants organized by the Miss Universe Organization every year. This beauty contest was initially organized in 1926, but due to the World War and the great depression, it did not take place until 1952 (Wikipedia, n.d.). In 1952, the current Miss Universe Organization was founded and organizes this beauty pageant every year.
I wanted to create a motion chart showing me the winner's country and how many pageants it has won every year. I have made a datasheet of Miss Universe competition winners year-wise. So, let's see step by step guide to creating this chart.
Step 1. Import the data file and Create a Calculated Field
I have already made this data sheet in Excel which I have uploaded in Tableau.
At the start, I am creating a 'Rank' field using a calculated field. Why? Rank is very important in this motion bar chart as it gives the impression of which year and which country won the beauty pageant title and moves bars accordingly. I have created a Calculated Field using the formula RANK_UNIQUE(COUNT([Year]), 'desc'). Click on apply and ok. Since I wanted to see each year-wise winner I used the count of years in descending order.
Step 3: Create a Bar Chart
Drag and Drop ‘Year (count)’ in the Column and ‘Country’ in the Row. Also, add ‘Country’ in colour and ‘Year’ in size under the marks tab. Click on ‘Entire View’ on the top toolbar.
Add ‘Rank’ in the column bar and right-click and compute using year.
Click on 'Rank' and check the dual Axis Right-click on the ‘Count of Year axis’ and hit the ‘Synchronise the axis’ mark.
Change the type of chart to ‘Bar’ for both the count of year and Rank columns under the Mark tab. It should look like a horizontal bar chart.
Step 4: Add Labels
Add ‘Country’ and ‘Rank’ under the label tab. Right-click on ‘Rank’ under the label mark and compute using ‘year’. Since I don’t want to see the country names and years, I hide those cards. I also don’t want to see the ‘Rank’ and ‘Count of Year’ axes, I right-click on those and unclick the ‘Show Header’ title.
Click on the ‘Lable’ tab under the marks, and allow the overlaps of labels. I also edited the ‘Title’ with alignment on the right and font size to 14 and bold. Drag and Drop ‘Rank’ in filters and ‘Year’ in the pages tab. The screen should look like this.
Step 5: Add Animation
Click on the 'Format' tab in the toolbar and change the animation's speed since I wanted to see faster bar movement; I customized the speed to 0.1 seconds.
Then click on ‘Show History’ on the right-hand side card select ‘All’ fields and unclick the ‘Fade’ option.
I also want to see the ‘Year’ on the main chart. For that, right-click on the blank area on the chart and click on ‘Annotate’ and select ‘Area’. Then add <Page Name> under the label and change the font size to 14, Bold.
I also sorted out the countries as per the highest number of winners. So, I clicked on ‘Country’ under row and ‘Sort’ as per ‘Field’ and I used count of years so I sorted it in ‘Descending’ order. I also added the ‘Rank’ (computing using year) in the 'CNT (Year)' Chart. Also, edit the Country axis font as well or if you want to hide the header and reference lines, you can do so.
This shows in 1997, ‘Ms Universe’ was from the USA and the USA had won the title ‘7’ times in the history of the Miss Universe beauty pageant.
Step 6: Create a Dashboard
Since I will be using it in presentation mode; I have put the dashboard size to the max size of 1850 x 1050 and added the dashboard name as well. Add the sheet to the dashboard by double-clicking on it.
I also wanted to move the ‘Year’ container (the upper right corner). So, I 'check' marked on ‘Loop playback’, and ‘Floating’ to move it inside the chart and remove the container.
Finally, the Screen looks like this:
I hope you like this motion chart tutorial. It will be helpful to create a race bar chart using different data. Let me know your thoughts on it.
Comments