Assignment 4 - Creating Animation in Tableau
Assignment 4 - Creating Animation in Tableau
Student Name:
Student ID:
Date:
Note:
Take all the screenshots uncropped i.e. date and time should be visible in your screenshots.
You need to submit your answers in a separate word document. No need to write the
questions in it. Put the question number and your solution. Do not provide the screenshots of
intermediate steps.
There will be deductions for providing more than what is asked.
The objective of this exercise is to use learn how to blend data and create animation in Tableau.
Step 1:
Download datasets from eLearning. There are four datasets. Each contains different information about
the countries of the world from 1960 to 2013. Country-Metadata contains the information of the region
of the country. Country-Population contains the population of these countries, Country-Fertility-Rate
contains number of children per family in a given year and Country-Life-Expectancy-At-Birth has the
number of years a child is expected to live at the time of his/her birth.
After importing the datasets, go to worksheet by clicking the tab named Sheet 1.
In the Data pane, you can see four data connections as shown in the below screenshot.
Also, look at the measures. You will find that each individual year is categorised as measure. If you look
at the dataset, you can find that the header of the column is the year in which the data is recorded. The
way data is stored in excel is human readable. But it is not good for creating visualization. (Try it
yourself: Try to create a line chart showing the growth of population of any country of your choice from
1960 to 2013. In the current format of data, it will not be possible.)
We need to convert the data in such a way that one column has year and the other column has
population/ life expectancy/fertility. For this we will use pivot option available in tableau.
Select all the columns from 1960 to 2013 and click on the small triangle. Click on Pivot.
You will find that two new columns are created.
Change Pivot Field Names to Year and Pivot Field Values to Population.
Step 2:
Now we will blend the data. (Note: Whatever we are doing in this exercise using blending, can be done
by joining these data sources. But as our aim here is to learn blending, we will not use joins.)
In the secondary data source window, click on Country-Fertility-Rate and select Custom.
Now, remove all the relationships, except Country Code and Year.
Repeat the same for Country-Life-Expectancy. For Country-Metadata, we will have only Country Code as
relationship.
Click OK.
You will see that as soon as you drag Population to Size, a blue tick mark will appear on the dataset
Country-Population.
This shows that the data source is considered as primary data source. Now click on data source Country-
Fertility-Rate. You will find two greyed out crossed links on dimensions Country code and Year. This
indicates that these two fields can be used to link this data source to Country-Population data source.
But we need to make them active.
To make the links active, just click on the link icon. It will turn orange. And the data source Country-
Fertility-Rate will have a orange tick mark. This indicates that it is secondary data source.
Let’s do this. Select on Edit sizes… as shown n the above screenshot and select Size vary: by Range.
Reduce the range from the left side as shown in the screenshot.
This card controls your animation. The three small buttons with bars show the speed of play of
animation.
When you put Year to Pages, a page is created for each year and when you play the animation, these
will be displayed one by one.
There are a few null values. We don’t need that indicator. Right click on it and hide it.
Now right-click on your sheet. In the drop down window, select Annotate and then Area.
In the Edit Annotation window, click on Insert and select Page Name.
Change the font to 48, click Bold and select Color as shown.
Click OK.
3. Record your animation using any screen-capturing software and submit is in mp4 format.
Step 3:
Now go to the animation play card and select show history check box.
When you click on the small triangle for Show History, you will have a number of options.
Deliverables: