# 06 Lab [en] - Data visalization
###### tags: `Data Visualization` `Parameters` `Groups` `Sets` `Ad hoc analyis`
[TOC]
# Introduction - objective of the exercise
The exercise is designed to demonstrate techniques
* obtaining data from new sources,
* linking data sources,
* use of presentation parameters,
* use of sets and groups.
# 1. Basic information
## 1.1 Data source - Eurostat
To carry out the exercise you will need a data file from Eurostat, which contains statistics on the volume of **rail transport** in EU countries, broken down by groups of goods.
The Eurostat portal can be accessed at https://ec.europa.eu/eurostat/home?
Name of target dataset: **Goods transported by group of goods - from 2008 onwards based on NST 2007**
Please, check the:
* data viewer
* data explorer (parametrisation of the data set)
## 1.2 ETL process
After downloading the data set from Eurostat, we have an Excel workbook in which the data for the different types of goods transported should bee listed on individual sheets.
However, the **GEO/TIME** column is on all sheets and can be used to join ([choose the right join type](https://help.tableau.com/current/pro/desktop/en-us/joining_tables.htm)!) the data into a single table suitable for visualisation in Tableau.

Please check:
* data types
* **[split](https://help.tableau.com/current/pro/desktop/en-us/split.htm)** and **[pivot](https://help.tableau.com/current/pro/desktop/en-us/pivot.htm)** functions

# 2 New tools in visualization
## 2.1 Parameters
Sometimes it is worth to equip the prepared visulisations with the possibility of interactive change of the displayed data series by the user. For example, in the example analysed here, it is possible to allow the user to select the series of data they want to see:
* the amount of transported goods of agricultural origin
* or from the mining industry
Such dynamic selection can be done using:
* parameters - which allow the choice of listed values for dashboard control (please define the GOODS parameter with list of values reflecting the data serices imported fform Eurostat).

* calculated fields - which will chenge the data series according to the parameter value (please define the GRAPH DATA calculated field).
In the definition of the calculated field the logical calculations are used for determining the values of the parameter and changing the data series - a Tableau help on this subject is available at help.tableau.com/current/pro/desktop/en-us/functions_functions_logical.htm.

## 2.2 Groups and sets
Tableau allows you to combine values of dimensions and measures into collections of values.
Such clustering can be used to, for example, change the colouring of the visualisation - highlighting the values of interest.
The table shows the characteristics of methods for combining specific values of data dimensions into **set** and **group** structures.
|Set |Group |
|---|---|
|They can be dynamic| They are static|
|Logically determined membership, 2 values (in/out)| Any number of groups|
|Processed before dimension filtering | Processed as a dimension filter|

### 2.2.1 Groups
Please prepare the map, which show different groups for different regions in Europe:
* North Europe
* South Europe
* West Europe
* East Europe

### 2.2.2 Sets 1/2
Create set for countries with top 5 values of the transport of metal ores in 2020. Show the sets as a colour on the bar chart.

### 2.2.2 Sets 2/2
Create chart:
* with line drawn on the level indicated by the parameter value (name of the param. LIMIT),
* with set defined by the formula which check if the amount of transported goods is bigger than the parameter value; use this set to colour the chart.

# 3 Dasboard project
Please desing and prepare your own dashboard which will show the transport structure and dynamics for selected types of goods.
# 3.1 Charts examples
# 3.1.1 Dynamics of the transport

# 3.2.2 Scatter plot
