class: center, middle, inverse, title-slide .title[ # BAA1030 - Data Analytics and Story Telling ] .subtitle[ ## Lecture 6: Advanced Features in Tableau ] .author[ ### Damien Dupré - Dublin City University ] --- # Previoulsy ... We have seen how to create clear and efficient figures: - Pie Chart - Bar Plot - Density Plot - Histogram Plot - Dynamite Plot - Scatterplot Based on basic statistical calculations: - Count - Proportion - Median/Quartiles - Mean/Standard Deviation - Correlation --- # Design Strategy Creating an prefect Tableau dashboard is easy if you follow these steps: #### Step 1: Basic Figures Create many figures that can be used to support your story but leave them with all default parameters #### Step 2: Basic Dashboard Use the most relevant figures in a basic dashboard without taking care of its design but including all the relevant elements (title, text, pictures) #### Step 3: Figure Improvement Go back to the worksheet each figure included in the dashboard and customise them: Colour, size, shapes, title, captions, axes, and interactions #### Step 4: Dashboard Improvement Go back to the dashboard and customise it: Background, colours, fonts, layout and actions --- # Going Forward In general, through the lecture we have seen variables: - Made of character strings (usually interpreted as categorical but not always) - Made of numbers (usually interpreted as continuous but not always) But variables can be made of many more values. In Business Analytics are particularly important: Locations and Dates. **How to manipulate Location and Date type variables in Tableau?** -- Tableau is particularly interesting because it creates interactive dashboards, **how to create smart Tableau dashboards by customising their interactivity?** -- Tableau is not limited to data visualisations, some data transformations can also be done, let's see **why doing your transformations in Tableau and how?** -- Finally, the export or publication of Tableau dashboard can be tricky, we will see **how to share your dashboard for the assignment and in general?** --- class: inverse, mline, center, middle # 1. Location and Date Types in Tableau --- # Space and Time Variables For the moment we were only interested in two variable types: - Categorical (made of characters) also called "Dimension" in Tableau - Continuous (made of numbers) also called "Measures" in Tableau However, we have seen that sometimes... - A Categorical variable needs to be converted to Continuous (e.g., Opinion scales) - A Continuous variable needs to be converted to Categorical (e.g., Survived 0/1 in titanic) > In Tableau change the type of a variable by drag-drop in the list of variables "Dimensions" or "Measures" -- .pull-left[ In addition to Categorical and Continuous variables, Tableau has special features to handle **Location** type and **Date** type variable. ] .pull-right[ <img src="https://yodalearning.com/wp-content/uploads/Tableau-Data-types.png" width="100%" style="display: block; margin: auto;" /> ] --- # Location Type Variables Is a list of geographical localisation by: - Continents (Europe, Asia, Africa, Oceania, North America, South America) - Country (Ireland, France, Spain, Germany, ...) - States, Regions, Counties, Cities ... By default, location variables should be properly encoded. A blue globe icon should appear before the variable. But if Locations are encoded as a Categorical (if made of characters) or Continuous variable (if made of numbers), you need to give this variable a **Geographic Role** <img src="https://help.tableau.com/current/pro/desktop/en-us/Img/maps_getstarted6.gif" width="40%" style="display: block; margin: auto;" /> --- # Mapping with Tableau To create a data visualisation map: 1. Drag and drop the **location variable in the row/column** of the main worksheet 2. Use **Show Me** and select one of the Map type figure (Longitude/Latitude variables are automatically generated) - Symbol map (data reduced to a point - good for cities) - Maps (data fill the full shape of the location) 3. Drag and drop in the **Color box of Marks** another variable to display changes in values according to location for this variable <img src="https://i0.wp.com/datadent.org/wp-content/uploads/2020/03/Map-change-colors.gif" width="60%" style="display: block; margin: auto;" /> --- # Mapping with Tableau More details about Tableau and maps with the following contents among others found online: - [Get Started Mapping with Tableau by Tableau](https://help.tableau.com/current/pro/desktop/en-us/buildexamples_maps.htm) - [Build a Simple Map by Tableau](https://help.tableau.com/current/pro/desktop/en-us/maps_howto_simple.htm) - [Tableau Map by Vizual Intelligence](https://www.youtube.com/watch?v=MT-HlqUHLFU) - [Maps in Tableau by Tutorial Gateway](https://www.tutorialgateway.org/maps-in-tableau/) - [Create A Map with Multiple Layers in Tableau by Anthony B. Smoak](https://www.youtube.com/watch?v=bwUj2NZHTC4) <img src="https://www.edureka.co/community/?qa=blob&qa_blobid=15134316276860426432" width="50%" /><img src="https://static.packt-cdn.com/products/9781786465634/graphics/B05527_05_01.jpg" width="50%" /> --- # Date Type Variables Is a variable referring to a specific time, it can be any combination and format including year, month, day, minute, second, ... For example, "March 23, 1984", "03/23/84", "23/03/1984", "1984-03-23" have **different formats but refer to the date**. In data science we use the ISO 8601 international standard format (%Y-%m-%d) which corresponds to "1984-03-23" (format allow to sort date easily) By default, date variables should be properly encoded. A **blue calendar icon** should appear before the variable. But if Dates are encoded as a Categorical (if made of characters) or Continuous variable (if made of numbers), you need to convert this variable as **Date** or as **Date & Time** --- # Line and Area Charts Date variables are usually used as **X axis** (Column Field in Tableau) to display the evolution of another variable according the time. The resolution of the chart can be adjusted by clicking on the **+ symbol** before the Date variable <img src="https://help.tableau.com/current/pro/desktop/en-us/Img/datefunctions3.png" width="80%" style="display: block; margin: auto;" /> --- # Line and Area Charts While the Date variable is in one field, drag and drop the other variable in the other field. It uses a **statistical aggregation** for this second variable. By default it is the Sum (see SUM) but it can be changed to Count, Proportion, Median, Mean, ... To add a **second line in the same plot** using the original Date variable: 1. Drag and drop this second variable in the row or column field next to the first one 2. Then, select `Dual Axis` to merge them <img src="https://raw.githubusercontent.com/damien-dupre/img/main/tableau_dual_axis.gif" width="60%" style="display: block; margin: auto;" /> --- # Line and Area Charts More details about Tableau and timeseries figures with the following contents among others found online: .pull-left[ - [Using Tableau to Build a Time Series Model by Data Column | Institute for Advanced Analytics](https://datacolumn.iaa.ncsu.edu/blog/2020/12/18/using-tableau-to-build-a-time-series-model/) - [Date Functions by Tableau](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_date.htm) - [Building Line Charts by Tableau](https://help.tableau.com/current/pro/desktop/en-us/buildexamples_line.htm) - [Tableau Playbook - Line Chart by Pluralsight](https://www.pluralsight.com/guides/tableau-playbook-line-chart) ] .pull-right[ <img src="https://raw.githubusercontent.com/damien-dupre/img/main/tableau_linecharts.png" width="100%" style="display: block; margin: auto;" /> ] --- class: title-slide, middle ## Live Example: Covid-19 Data Sample --- class: inverse, mline, center, middle # 2. Interactive Customisations in Tableau --- class: title-slide, middle ## Variable Alias --- # Variable Alias Aliasing a Variable is not an interactive feature per se but it is a simple tip that can be very useful. Creating an Alias means renaming the categories displayed by a variable (but the original names are kept for the calculations). <img src="https://raw.githubusercontent.com/damien-dupre/img/main/tableau_alias_1.png" width="90%" style="display: block; margin: auto;" /> <img src="https://raw.githubusercontent.com/damien-dupre/img/main/tableau_alias_2.png" width="90%" style="display: block; margin: auto;" /> .center[Figure without Alias (Top) versus figure with Alias (Bottom)] --- class: title-slide, middle ## Hover Tooltip --- # Marks Card The design of the **default visualisation is created automatically** according to what Tableau consider as the most relevant, but this choice **can be modified**: .pull-left[ 1. By manually selecting the type of Mark displayed 2. By manually selecting the design of Mark displayed (i.e., Color, Size, Label, Detail, and Tooltip)
<i class="fas fa-arrow-circle-right faa-horizontal animated faa-slow " style=" color:blue;"></i>
Note: Each can be customised globally but they can also be customised according to the values of variables (already used or additional) ] .pull-right[ <img src="https://help.tableau.com/current/pro/desktop/en-us/Img/build_manual_shelves_marks1.png" width="80%" style="display: block; margin: auto;" /> ] --- # Tooltip Principle .pull-left[ The tooltip is a series of information (numeric or graphic) that are displayed in a temporary box when the user's cursor goes over or clicks on a visualisation element. ] .pull-right[ <img src="https://interworks.com/wp-content/uploads/sites/default/files/wp-content/uploads/2010/08/TTDefault.png" width="80%" style="display: block; margin: auto;" /> ] It is used to precise actual numbers behind the figures and to tell a short story about what is currently seen. .pull-left[ <img src="https://interworks.com/wp-content/uploads/sites/default/files/wp-content/uploads/2010/08/CondFormatMore.png" width="100%" style="display: block; margin: auto;" /> ] .pull-right[ <img src="https://cdns.tblsft.com/sites/default/files/blog/vit-gif-for-blog_leave-for-work.gif" width="100%" style="display: block; margin: auto;" /> ] --- # Tooltip Principle By default, the tooltip display all the **variables included in Rows and Columns** of the figure. By clicking on the tooltip option from the marks cards, it is possible to **modify how the information is displayed**. **Variables between `<>` symbols** are changing values according to the cursor position. .pull-left[ For example: ``` Sex: <Sex> Survived: <Survived> Count of titanic.csv: <CNT(titanic.csv)> ``` ] .pull-right[ Will show: ``` Sex: female Survived: survived Count of titanic.csv: 734 ``` ] However, we can reorganise how the information is displayed, which helps to tell a story. For example: ``` After the catastrophe, <CNT(titanic.csv)> <Sex> passengers <Survived>! ``` Will show: ``` After the catastrophe, 734 female passengers survived! ``` --- # Tooltip Advanced It is possible to **add more variables** in the tooltip with drag-and-drop to the marks card. However, instead of adding another value, you can also **add a full visualisation** in the tooltip. When configuring the tooltip, click `Insert` and select `Sheets` with the name of the visualisation to add. <img src="https://raw.githubusercontent.com/damien-dupre/img/main/tableau_sheet_tooltip.gif" width="100%" style="display: block; margin: auto;" /> --- class: title-slide, middle ## Filters and Highlighters --- # Local Filter Menu You can display **only specific data** by using the "Filters Card" and selecting how to filter the data that are displayed (i.e., which categories for categorical variables and which values for continuous variables). <img src="https://help.tableau.com/current/pro/desktop/en-us/Img/filtering-drag.gif" width="100%" style="display: block; margin: auto;" /> --- # Local Filter Menu Filters also refers to addition of a **filtering menu** for the users to perform their own selection. .pull-left[ To add a Filter menu to a visualisation: 1. Click `Analysis` from the top toolbar and click `Filters` 2. Select the variable that the user can choose values from 3. From the drop down arrow of the new filter menu, customise its design
<i class="fas fa-arrow-circle-right faa-horizontal animated faa-slow " style=" color:blue;"></i>
Note: The same result can be achieved with the `Filters` card by selecting `Show Filter`. ] .pull-right[ <img src="https://help.tableau.com/current/pro/desktop/en-us/Img/show_filter2.gif" width="100%" style="display: block; margin: auto;" /> ] --- # Local Highlighter Menu Highlighters also add a **highlighters menu** for the users to focus the visualisations on some categories of data. When added to a dashboard, the highlighters menu will apply to all visualisations involving the variable highlighted. .pull-left[ To add a Filter menu to a visualisation: 1. Click `Analysis` from the top toolbar and click `Highlighters` 2. Select the variable that the user can highlight values from 3. From the drop down arrow of the new highlighter menu, customise its design but it is much more limited that the customisation of the filter menu ] .pull-right[ <img src="https://cdnl.tblsft.com/sites/default/files/blog/third_highlighter.gif" width="100%" style="display: block; margin: auto;" /> ] --- class: title-slide, middle ## Time Animation Player --- # Time Animation Player To visualise change according to time in a figure, a time variable can be added to the "Page Card". The possibility to play the changes will be offered to the user from additional controls. <img src="https://miro.medium.com/max/1400/1*9wAYT7RHcaZOCNs0suDcmg.gif" width="80%" style="display: block; margin: auto;" /> --- class: title-slide, middle ## Actions --- # Basic Actions While Filters and Highlighters are set-up at each figure level, Actions are **set-up at the dashboard** level and affects all figures included in the dashboard. .pull-left[ <img src="https://help.tableau.com/current/pro/desktop/en-us/Img/Actions_dialog.png" width="100%" style="display: block; margin: auto;" /> ] .pull-right[ Click `Dashboard` from the top toolbar and click `Actions`. Then you have to choose: 1. How to trigger the action (when the cursor moves on a figure, when it clicks on a figure, from an added menu) 2. From which figure it comes from 3. Which figures it impacts ] **Filter and Highlight actions are the easiest** to implement as they are behaving like Filters and Highlighters but for the full dashboard. Some other actions can be trick to implement but could be essential when adding buttons for instance. --- # Global Filter and Highlight Actions If all the set-up fields are left as with default values, all the figure will be modified if a user hovers, clicks, or select a variable from a menu .pull-left[ - Adding Highlight Actions to a dashboard is **the easiest way to make it smart**. By choosing "hover" as interaction mode, the figures will react to the users simultaneously. - Filter Actions are interesting too but they can be **confusing when hover or click are chosen** to trigger. Prefer triggering Filter Actions from menus instead. ] .pull-right[ <img src="https://interworks.com/wp-content/uploads/2019/02/GIF1.gif" width="100%" style="display: block; margin: auto;" /> ] --- class: inverse, mline, center, middle # 3. Data Transformation in Tableau --- # Data Transformation in Tableau If your data is a Stand Alone File, prefer transformations with MS Excel... ... Except for **pivoting your table** (long vs wide table) or **joining two or more tables** If your data is an Auto Update document (type cloud hosted spreadsheet or database) then transforming in Tableau is required Tableau has created a specific tool for data transformation called **Tableau Prep** but a lot can already be done with **Tableau Desktop** <img src="https://community.tableau.com/sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB720BY480&versionId=0684T000009fe8u&operationContext=CHATTER&contentId=05T4T00000ZYYh2&page=0" width="35%" style="display: block; margin: auto;" /> --- # Pivot in Tableau Pivot is the action to transform a table from wide (multiple variables) to long (one variable contains names and the second the values) <img src="https://help.tableau.com/current/pro/desktop/en-us/Img/qs_pivot_example.png" width="80%" style="display: block; margin: auto;" /> .pull-left[ In Data Source page: 1. Select the variables to pivot 2. Click left/double and use "Pivot" ] .pull-right[ <img src="https://help.tableau.com/current/pro/desktop/en-us/Img/qs_pivot_command.png" width="80%" style="display: block; margin: auto;" /> ] --- # Relationships vs Joins The default method in Tableau is to use relationships. Relationships preserve the original tables’ level of detail when combining information. Relationships are the recommended method of combining data in most instances. However, there may be times when you want to directly establish a join, either for control or for desired aspects of a join compared to a relationship, such as deliberate filtering or duplication. .pull-left[ Join is the action of **merging two tables** based on a common key variable 1. Open a second table in Tableau's home page 2. In Data Source page, drag and drop this second table next to the first table ] .pull-right[ <img src="https://help.tableau.com/current/pro/desktop/en-gb/Img/data_model_single_tablewjoin2.gif" width="90%" style="display: block; margin: auto;" /><img src="https://help.tableau.com/current/pro/desktop/en-gb/Img/data_model_single_tablewjoin3.gif" width="90%" style="display: block; margin: auto;" /> ] --- # Link to Data Transformation in Tableau .pull-left[ ### Pivot Tutorials - [Pivot Data from Columns to Rows by Tableau](https://help.tableau.com/current/pro/desktop/en-us/pivot.htm) - [How to Create Tableau Pivot by Data Flair](https://data-flair.training/blogs/pivot-in-tableau/) - [Pivot in Tableau by EDUCBA](https://www.educba.com/pivot-in-tableau/) ### Join Tutorials - [Join Your Data - Part 1 by Tableau](https://help.tableau.com/current/pro/desktop/en-gb/joining_tables.htm) - [Join Your Data - Part 2 by Tableau](https://help.tableau.com/current/pro/desktop/en-us/joining_tables.htm) - [Learn the rules to join tables in Tableau by Data Flair](https://data-flair.training/blogs/tableau-joins/) - [Tableau - Data Joining by Tutorialspoint](https://www.tutorialspoint.com/tableau/tableau_data_joining.htm) ] .pull-right[ <img src="http://www.quickmeme.com/img/c7/c702826a3aa55ac8a6f8cf52763a6205eec186242077b184bf162a1ccf3b30ce.jpg" width="100%" style="display: block; margin: auto;" /> ] --- class: title-slide, middle ## Live Examples --- class: inverse, mline, center, middle # 4. Publish your Tableau Dashboard --- # Publish #### Publishing is the process of saving a dashboard online. It can then be accessed by everyone.
<i class="fas fa-exclamation-triangle faa-flash animated faa-slow " style=" color:red;"></i>
Warning: For your assignment, publish your dashboard online and submit the dashboard URL on loop. <img src="https://raw.githubusercontent.com/damien-dupre/img/main/tableau_published.png" width="70%" style="display: block; margin: auto;" /> --- # Export vs. Share with Desktop More details about how to save and share Tableau Desktop with the following contents among others found online: - [Tableau File Types and Folders](https://help.tableau.com/current/pro/desktop/en-us/environ_filesandfolders.htm) - [Learn all kinds of file extensions used in Tableau](https://data-flair.training/blogs/tableau-file-types/) - [TWB vs TWBX in Tableau](https://analyticscanvas.com/twb-vs-twbx-in-tableau/) - [Understanding Tableau File Extensions](https://interworks.com/blog/rcurtis/2016/04/14/alphabet-soup-understanding-tableau-file-extensions/) <img src="https://interworks.com/wp-content/uploads/sites/default/files/blog-content/TableauFileExtensions.png" width="60%" style="display: block; margin: auto;" /> .center[Different types of Tableau export files. TWBX has to be used for the assignment because it includes the dashboard and the data (contrary to TWB files which only include dashboards)] --- class: title-slide, middle ## Live Examples --- class: inverse, mline, center, middle # 5. Assignment 1 Brief --- # Assignment Instructions ### Context You are Data Analyst for the UNICEF organisation, an you have been asked to design a Tableau Dashboard to raise awareness of the public on a specific world issue. ### Task Two data files will be emailed to you, focus your dashboard on the files called **unicef_indicator_1.csv** and **unicef_indicator_2.csv**. Use the file **unicef_metadata.csv** to help developing your story if you need to. Then, **tell a "story" (i.e., narrative) behind the data in ONE Tableau Dashboard.** .pull-left[ ### Assessment Criteria - Creativity (25%) - Analytical Depth (25%) - Beauty/Design (25%) - Overall Story (25%) ] .pull-right[ ### Assessment Submission Submit the URL of your dashboard on the Assignment Upload module of the BAA1030 Loop page **Deadline 23/03/2025** ] --- # Tableau Challenge
<i class="fas fa-exclamation-triangle faa-flash animated faa-slow " style=" color:red;"></i>
Warning: This is not mandatory for your assignment, only submitting the URL of your dashboard before 23/03/2025 on Loop is. Tableau is much more than basic visualisations, very professional output can be obtained easily, see some examples online: https://public.tableau.com/gallery/ - Use these existing dashboards as inspirations for your own dashboards. Don't reinvent the wheel, reproducing with your own data is challenging enough. - Follow the steps of Mehmet, Domitille, Khaman, Choleshwar, Shane, Alankrit, Leonardo, Cormac, and Federica in 2020, 2022, 2023 and 2024. 9 DCU students selected among the top 10 of [EDHEC DataViz Challenge](https://www.edhec.edu/en/edhec-dataviz-challenge) ### EDHEC DataViz Challenge (2025) - Step 1: Publish your dashboard entry to your Tableau Public Profile with the tag **#StudentdataViz2025**. - Setp 2: Submit your dashboard URL in a form (TBC). ### The Challenge is opening dates are TBC. --- # Tableau Challenge Past challenges are an excellent way to have an idea of outstanding dashboards: - [Google Data Viz Challenge (2012)]( https://public.tableau.com/en-us/s/big-data-viz-challenge-entries) - [Do Good Data Viz Challenge (2016)](https://www.tableau.com/tableau-foundation-challenge) - [Women in Analytics Data Viz Competition (2020 - Now)](https://www.dataconnectconf.com/previous-competitions) - [Data Visualization Society (2021 - 2023)](https://www.datavisualizationsociety.org/soti-challenge) - [Iron Viz](https://www.tableau.com/community/iron-viz) <img src="https://media.makeameme.org/created/use-tableau-you.jpg" width="30%" style="display: block; margin: auto;" /> --- class: inverse, mline, left, middle <img class="circle" src="https://github.com/damien-dupre.png" width="250px"/> # Thanks for your attention and don't hesitate to ask if you have any question! [
@damien_dupre](http://twitter.com/damien_dupre) [
@damien-dupre](http://github.com/damien-dupre) [
damien-dupre.github.io](https://damien-dupre.github.io) [
damien.dupre@dcu.ie](mailto:damien.dupre@dcu.ie)