Tableau Data Visualisation

[Scrap #1] This tutorial will take you through the process of visualising data in Tableau. It will first take you through the basic set up of Tableau, which is a great tool for data visualisation. We will use a slightly modified data from German statistics showing the trading volumes of Germany around the world. I've adpoted the original data from the website and trasnformed it into a dataset to make our visualisation easier. You can download the modified version here to follow this practicle example of the Tableau visualisation. Inspecing the data file. The csv data file has three columns: Activity, Country, and Eur(000). The Activity reperesents of the values such as import, export, turnover or foreign trade balance. Country is the country to which the rest of that data is related to. Eur(000) column amount that corresponds to the particular row expressed in thousand of Euros. You can see that Activity has four categories: import - the total amount of good imported into Germany, exports - the total exported outside of the country. The Turnover is the combined value of the two. FTB Our aim will be do visiualise those activities and present the amounts in easy to grasp map.
199 words created on 07 Apr 2021 by dreamers1982
[Scrap #2] Let's start with importing data into Tableau. Tableau has an excellent interfece for uplaoding all kind of files, including connecting it to database, and combining different sources. Our data come in a csv format so I will simply use the "text" option and select name of the file. Afer you have clicked on the file you will be able to see and inspect the files. You should see the three columns we have mentioned before. Here you can also make a simple transformation. For instance, in our instance the Euro(000) was imported as nummerical value, but if that was not the case, you could right click on the data and simply transform it to numerical value. After inspecting the data file, we can now build our first Tableau visualisation. Let's go to the Sheet 1. If you inspected the data, you will notice that it contains the list of all the world's countires and we want to find a way to easily present that big data and easily analyse the results. Since we're dealing with geographical locations, countries, I will want to use map. To do it, drag the Country Field and drop it into the sheet.
197 words created on 07 Apr 2021 by dreamers1982
[Scrap #3] When you enter the sheet, you will notice that Tablau divides the screen into [four] distinct sections. The part to the left of the screen contains name of the fields that correspond to the header names of our files. You will notice that the field values are divides into two sections. Dimensions (bluefields) - those are descritive fields related to labels (such as country) and numerical (blue fields) - related to quantative measures such as the total amount in Euros (Eur(000)) To the right on the top and columns. Those are the fields where you can drop your [dimensions or values] into and we will deal with them later. You will also notice some new fields that are related to the geographical coordinates. The advantage of Tableau is that when it sees a geographical location, it automatically coverts it into coorditnates such as longitute and lattitutde. That will enable Tableau to quickly set the map in the later step. You will see the field in the middle is a blank screen with empty header and row. If you drag and drop the country field into the middle of it, you will see that Tableau automatically generated map.
197 words created on 07 Apr 2021 by dreamers1982
[Scrap #4] You will see that the map contains multiple number of dots related to each place represented in the Country column. While it's a good start, we want to make sure that our visualisation has more meaningful information. Look to the right of the Tables and you will see a set of icons such as Color, Size, Label, etc... Tableau allows you to quickly choose the method of how you want to visualise your data by simplying dragging and dropping the relevant field into one of the icons. Click on the Eur(000) field and drop into onto the Color icon. You will see that the map has now change so each country is filled with different shade of colour. The shade of the colour corresponsd to the sum of the total amount for each territory. Now, if you look closely at the map you will see there are some blank countries with no values or colour attach to them. You will also see "21 unknown" text in the bottom right corner of the map. The likely reason for that is that some of the data was missing or was milabled so Tableau could not assign it to the right area. [Fix]
200 words created on 07 Apr 2021 by dreamers1982
[Scrap #5] Now, when we have eddited the locations, let's start looking into data itself. If you scroll on one of the couuntirs you will see a tooltip with its name and the total amount. The issue is that we don't actually know what this amount relates to. It can be certainly confusing as the data is now combining all the activities together and we want to show them as seperate categories. To do this we will use filters. Adding a filter to your Tableau visualisation is simple, and all you need to do is to drag the relevant field (in our case we want to filter Activity) into the Filters section on the right of the screen. Now, double click on the filters and click "Show Filters". If you look at the right side of the Tableau sheet, you will see a list of activities. Now, we want to only visualise one activity at the time, so go to the [Filters settings], choose [...] and then [single option]. You will now see the drop-down of relevant filters. Select one of the activity and you will see that the map now shows only relevant data. Flip through values and look for surprises?
200 words created on 07 Apr 2021 by dreamers1982
[Scrap #6] In the next steps, we will want to visualise the data in the form of a Tableau table and then add combine the two sheets together into a dashboard so they can present a comprehensible story about Germany's Trade Balance and see if we can spot any surprises. Creating a table in Tableau is quite similar to building a Pivot Table in Excel [link]. Create a new sheet using a + icon just next to the tab with the name of the existing sheet. Then, drag and drop the "country" field into the rows section. Then, place the Activity in the Rows. Lastly, drag and drop Eur(000) field into the middle part of the table. You will see a Tableau table with list of countries and values corresponding to their trading activities. You can change the order of the columns by clicking one of the headers and dragging it to the desired place. You will see that reordered the columns so the headers are in the order of: Turnover, Export, Imports and Foregin trade. Although the table doesn't have any graphs, it will help us complement the visualisation. Click on the sort icon to header's right to rearrange the values.
200 words created on 08 Apr 2021 by dreamers1982
[Scrap #7] Now, we want to make our Tableau visualisation more interactive, and display only the trading partners with the highest turnover. First, let's add another value to the filter. Click on the "Country" filed and drag it to the filter section underneath the "Activity" field. Now, we want to change the setting in our map so it only displays the top number of countries by a selected activity. For instance, we want to see what are the 10 top trading partners of Germany by the total turnover. To do that, we will first create a parameter that will allow us to set the number of countries that we want to show. Click on an arrow in the upper part of the Table pane and then select "Create Parameter...". Type in "Top N" as the name, then select "Integer" as the data type. Set the Current Value to 0 and pick Range as the Allowable values. In the Range of values section, check minimum and set it to 1, then maximum to 250 and step size to 5. Right-click on the name of the parameter at the lower-left corner and select Show Parameter. You should see a slider under the Activity filter.
200 words created on 08 Apr 2021 by dreamers1982
[Scrap #8] We now have to link the parameter with our Country filter. Go to the Filters Pane and right-click on the Country Field. Then, select Edit Fitler... In the window, select "Top" tab and click on by Field. Select "Top" value and then instead of a number, click on the arrow to the right and select "Top N" value. This will link the value the value from the parameter we have just created to the number of countries that we want to visualise. Below, choose Eur(000), as this will be the value we are analysing, and then make sure you selected the SUM. Click ok. Now, you will see that as the result, with Turnover selected as filter, value in the parameter Top N sets the number of countries displayed. Let's now bring two of the sheets in a dashboard. Dashboards allow us to combine different sheets from Tableau and visualise them in one view. Our aim is to display a map of countries on the top and a corresponding information for the countries displayed below the map with details about their trading turnover, exports and imports.
186 words created on 08 Apr 2021 by dreamers1982
[Scrap #9] To create a Tableau dashboard, click on the New Dashboard icon at the bottom of the window. Now, drag and drop the map sheet to the top of the new tab and then place the sheet with the countries table beneath it. Rick click on the Sheet name and hide the title. Repeat the same step for the other sheet. You can adjust the dimensions of the Tableau dashboard by clicking on the Size values in the left pane. To show the dashboard's title, go to Dashboard and select Show Title. You will notice that the Activity filters and Top N parameter to the right of the window. Notice that changing the value in the Top N parameter only applies to the Map sheet, while the country list stays the same. We want to change and apply the parameter to both sheets. To do it, go back to the Filter's pane of the Map sheet. Click on the arrow next to the Country field, select Apply to Worksheets... and then Selected Worksheets option. Tick the box next to the Map sheet and click OK. If you now go to the Dashboard you should see that the number of countries changes. 
201 words created on 09 Apr 2021 by dreamers1982
[Scrap #10] One really nice feature of having a table with names is that you can see all the building blocks of the numbers on the map, such as Exports and Imports. Another advantage is that you can use the table as a filter and only select a country (or group of countries) that you want to display on the map. To turn the Tableau dashboard's sheet into a filter, click on the sheet and then select Use as Filter icon in the right upper corner of the table. Then, click on one of the countries in the table and you should see that the map only displays the values selected. This tutorial has shown how to quickly turn a raw set of data such as a csv file and turn it into a Tableau visualisation. We used the data from the German Statistical Office to convert their data into an interactive map. You can think of other examples such as sales by territory or other data such as pollution. You can find sources of data here. This tutorial meant to show you just the basics of visualisation. There are still some tweaks we need to do which I will cover here.
200 words created on 09 Apr 2021 by dreamers1982