Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

COMP5048 Week 2 Tutorial

1.    Tableau Installation

Tableau is a software that produces interactive data visualization for Business Intelligence and        Analytics. For this course, a student license lasting for the duration of the course can be activated as follows:

1.    Go to the Tableau download page:https://www.tableau.com/products/desktop/download

2.    Enter your University e-mail address and click the download button.

3.    After Tableau is downloaded, activate using the following key: TCTG-F9A2-BD80-1026-63EB

Alternatively, as a student, you can get a 1-year license that extends beyond the duration of the course by following these instructions:

1.    Go to the Tableau academic website at https://www.tableau.com/academic/students

2.     Select “Get Tableau for Free” and fill out the form (you will need to provide a form of student ID, e.g. student card, confirmation of enrolment)

3.   You will receive an e-mail containing installer download links and a product key for Tableau.

Note: the license is renewable as long as you are still enrolled.

2. Basics run-through

2.1. Connect to a data source

1.    Open Tableau and create a new workbook.

2.   To connect to a data source, go to the Data Source tab, then select the More …” option under the “To a file” section.

3.    Navigate to SmallTowns.csv and select it.

4.    Once loaded, a tabular view will appear. The table will show four columns: Country, State, City and Rank.

Note: Tableau provides different data connectors so that you can connect to an Excel file, a text file, Json file.

2.2. Create simple charts

1.    Connect to SmallTowns.csv file.

2.    Click Sheet1 tab to create a Worksheet.

3.   Type ‘SUM(Rank)’ into Columns field.

4.   Select Country, State, City for Rows field.

5.   Then Select Bar (‘horizontal bars’) chart type from the Show Me” button on the right. A bar chart is displayed.

6.    Experiment with other chart types such as Pie chart, stacked bars chart, and tree maps.

 

Figure 1. Horizontal bars view of the Small Towns data set

2.3. Put your data on a map

1.  In another workbook, connect to CountryLocations.csv. This file contains the geographical coordinates of a few locations.

2. Create a new sheet.

3.  Drag 'Longitude’ into the Columns field and ‘Latitude’ into the Rows fields; or you can type directly into the fields.

4. Select Map (‘symbol maps’) chart type andthen a map is shown.

5.  Drag ‘Country’ and ‘Division’ labels into Marks section. Now all eight divisions are shown.

 

Figure 2. Putting the cities in Country Locations.csv on the map

3.  Further examples

3.1.  Marks and filters for multivariate data visualisation

1.  Open a new Tableau workbook.

2.  Connect to avocado.csv as data source.

3. Add a new sheet.

4.  Select scatter plot as the chart type from Show Me”, then add Large Bags to columns and Small Bags to rows. Currently, there would be only one glyph on the chart.

5.  Under Marks just to the left of the chart, double-click the area under the icons until a textbox appears and type in Region. You should now have multiple glyphs on the scatter plot, one for each region.

6. You can add another category under marks, e.g. Year or Type. Click the icon next to the category name and select Color – the glyphs will now be coloured based on the selected category.

 

Figure 3. Adding marks for regions

 

Figure 4. Scatter plot example

3.2.  Filters

1.  In the same workbook connected to avocado.csv, add a new sheet.

2. Add  Date  to  Columns.   Once  it  appears  on  Columns,  click the  drop-down  arrow,  and  select “Quarter (Q2 2015)” .

 

Figure 5. Selecting the date resolution

3. Add Small Bags and Large Bags to Rows. There should be two line charts.

4.  Under Marks, make sure that All is selected. Add Region to Marks, click the icon next to Region, and select Color to obtain different coloured lines per region.

5. You may notice that one line is significantly higher than the others this is the total for every region.

To better compare the regions, we will filter this one out. From Marks, click thedrop-down on Region and click Show Filter” . You should see a side bar with check boxes on the right

6.  In the side bar, uncheck TotalUS from the selection. Wait for the filter to be applied.

 

Figure 6. Filter dialog

3.2   Pivoting

1.  Go to Data Source tab.

2.  Select (shift-click) the columns titled 4046, 4225, and 4770 – these represent different avocado types. Right click and select Pivot.

3.  Add a new worksheet. You will see new entries on the left side bar based on the pivoted columns.

4.  Add Date to Columns and select a desired date resolution.

5.  Add Pivot Field Values to sheet and select Area Chart (Continuous) for the chart type(under Show Me).

 

Figure 7. Pivoting columns

6.  Under Marks, add a New Calculation for Pivot Field Names, click the icon next to the label,and select Color. You will obtain a stacked area chart with different colours for each type.

7.  Experiment with other chart types under Show Me.

4.  Create a Dashboard

You can create a dashboard that combines multiple visualisations in one.

1.   Create two worksheets  you can use any two sheets created from the previous steps.

2.   Click the Add Dashboard button (next to the Add Worksheet button on the bottom bar).

3.   Choose Tiled or Floating layout.

4.   Drag both worksheets into the empty dashboard.

You can also link multiple visualisations together, such as using shared filters:

1.  Create two sheets using the same source, displaying different sets of data columns. As an       example, you can use the map from Section 2.3 as one sheet, and you can create a new sheet with a scatter plot of count vs rank (don’t forget to add Country and Division under Marks).

2.  Create a new Dashboard and add the two sheets from step 1.

3.  On the menu bar, click Analysis, go to Filters, and select a filter of your choice (e.g. Country).

4.  Once the filter shows up on the dashboard, click on the tile of the filter. Click the down arrow, select Apply to Worksheets, and select All Using This Data Source.

5.  Try selecting and de-selecting options from the filters. You should see that both visualisations will be changed when the filters are edited.

 

Figure 8. Editing filters in a dashboard

5.    Further exercise

1.  Display the rank value of the CountryLocation data on the map visualization from Exercise 2.3 (you can add more data columns under Marks). Try displaying the count value on the same    visualization as well using a different visual variable (buttons selectable under Marks).

2. Create more charts showing the average sales of different bag sizes (small, large, x-large) per avocado type (4046, 4225, and 4770) for the Avocado data. You can select any charts that are appropriate for displaying the multiple variables.