Setup
Overview
Time: minObjectives
Install and authenticate Tableau subscription
Install and setup Zoom if needed
Download data files for this workshop
Software setup
Tableau
There are three steps to take for installing Tableau Desktop Version. First, you must request a free student license (access lasts one year) and then install Tableau software and activate it for use using the student license.
Getting a Student License for Tableau
For activating the tableau with Free student key, you will need to register on the below link using university ID:
https://www.tableau.com/university-students
Click on Get Student License for free.
Instructions to Download Tableau Software
We can install the Tableau Desktop version from the link below: https://www.tableau.com/support/releases
- Open the Product Downloads and Release Notes(Link opens in a new window) page and select Tableau Desktop or Tableau Prep Builder from the list on the left side of the page.
- Click on the version you want to install.
- In the Download Files section of the page, click on the installer for your operating system to download it. Select Windows or mac according to your requirements.
Activating Tableau
After installation is complete, you will need to activate and register the product to begin using it.
Fill out the fields on the registration form and then click Activate Tableau.
Or, activate with a product key: Use this option if you are activating using the user interface and have a product key from Free student version product key.
All set you should be set to use Tableau Desktop version.
Run the installer and follow the prompts.
Open the Disk image file (.DMG) and double-click the installer package (.PKG) to start the installation.
Install the videoconferencing client
If you haven't used Zoom before, go to the official website to download and install the Zoom client for your computer.
Set up your workspace
Like other Carpentries workshops, you will be learning by "coding along" with the Instructors. To do this, you will need to have both the window for the tool you will be learning about (a terminal, RStudio, your web browser, etc..) and the window for the Zoom video conference client open. In order to see both at once, we recommend using one of the following set up options:
- Two monitors: If you have two monitors, plan to have the tool you are learning up on one monitor and the video conferencing software on the other.
- Two devices: If you don't have two monitors, do you have another device (tablet, smartphone) with a medium to large sized screen? If so, try using the smaller device as your video conference connection and your larger device (laptop or desktop) to follow along with the tool you will be learning about.
- Divide your screen: If you only have one device and one screen, practice having two windows (the video conference program and one of the tools you will be using at the workshop) open together. How can you best fit both on your screen? Will it work better for you to toggle between them using a keyboard shortcut? Try it out in advance to decide what will work best for you.
Data files:
Please download the following file(s) to particpate in the workshop:
Link to Data Set: https://uofi.box.com/s/6q4p6u601z28b5iacmmydbuw3p6r0ezm
Link to Tableau File: https://uofi.box.com/s/jsddz1iz8fqe0adkpcfjzhuwv7r30jhr
About the Data Used in this Workshop:
The dataset used is a sample dataset from Tabelau. It is a basic data collection of US supermarkets.
Let us understand the attributes of this data set:
- ‘Row ID’ - This is nothing but Serial No.
- ‘Order ID’ - ID created when a product order is placed.
- ‘Order Date’ - Date on which a customer places his/her order.
- ‘Ship Date’ - Date on which the order is shipped.
- ‘Ship Mode’ - Mode of shipment of each order.
- ‘Customer ID’ - ID assigned to each customer who places an order.
- ‘Customer Name’ - Name of Customer.
- ‘Segment’ - Section from where the order is placed.
- ‘Country’ - Country details of this data set. We are looking only for US store data.
- ‘City’ - Cities of US are listed here.
- ‘State’ - States of US are listed here.
- ‘Postal Code’ - pin code
- ‘Region’ - grouped into region wise
- ‘Product ID’ - Product ID of each product
- ‘Category’ - Category to which each product belongs to.
- ‘Sub-Category’ - Sub-Category of each Category
- ‘Product Name’ - Name of products.
- ‘Sales’ - Selling Price of each product.
- ‘Quantity’ - number of quantity available for a particular product.
- ‘Discount’ - Discount available on each product.
- ‘Profit’ - Profit gained on each product.
Key Points
Introduction
Overview
Time: 0 minObjectives
Creating Charts
Creating Dashboard
Creating Story
FIXME
Key Points
Creation of charts, story and dashboard explained in subsequent lessons.
Creating Charts
Overview
Time: minObjectives
How to create Charts in Tableau
For this session, we will be using the Superstore dataset. We created 2 charts in the previous session using the same dataset. We will create some more visualizations in this session.
- Sales by Category – To visualize sales by category, we add sales from measures to column shelf and category from dimensions list.We get a horizontal bar chart. To make the visualization better, we add mark labels and change the view to fit the entire screen(highlighted in the figure below). This is the simplest graph which shows sales across all the categories in the data.
Sales by Sub-Category–To plot the sales by sub-category, add sales to column shelf and add sub-category to the row shelf.Now, click on the ‘show me’ icon on the right side of the sheet. The ‘show me’ icon is like a cheat sheet, it gives us all the typesof graphs we can plot. It also gives the number of dimensions and measures required to plot a particular graph.We select tree map from the options. We can see the visualization is created using our data but the rows and column shelf is now empty. All the fields are moved to the mark cards.We can see from the visualization, phones and chairs have the highest sales.
Sales Trend–Trend charts shows the behavior of a variable in data over time. To create a sales trend chart, we add order date to columns shelf and sales to row shelf.
But the visualization does not give us so much information about the trend. We want to see month wise trend. To do that, we click on the plus sign on the order date in the columns shelf.That gives us quarterly trend. Again, repeating the process, we get monthly trend. But we only need monthly order dates. So, we remove the year and quarter from the columns shelf.We get the graph as below.
Now, to see yearly sales trend we add order date to color mark card.It gives us the month wise trend of all years.
Looking at this visualization, we can see month wise sales activities of all the years. From the graph we can see a peak around March, September and November.Any guesses why?
- Sales by State– In tableau, we can create maps using the longitude and latitude fields generated by tableau.
- To visualize the sales across the states, we add longitude to columns shelf and latitude to rows shelf.
- To see the map of the US add states from the dimensions list to the ‘Detail’ marks card.
Next to see sales acrossstates, we add sales to colors mark card.The following visualization gives state wise sales. We can see that California has the maximum sales.
- Sales by City – We follow the same steps from the previous visualization.Just a few changes in the visualization include adding city from dimensions panel to details marks card and adding sales to size marks card(instead of color marks card).
Key Points
Creating Dashboard
Overview
Time: minObjectives
How to create Dashboard in Tableau
-
A dashboard is a collection of sheets or views. The benefit of dashboards is that we can compare variety of data at one glace.
-
The things that we focus on while creating a dashboard are –ContentandLayout. Let us take an example of a dashboard which has sales, profits and discount sheetsall together.
How do you imagine the dashboard to look?
- Quite chaotic because we will have so many factors to focus on. Dashboards should have homogeneity with respect to content.
- Sticking to one measure while creating a dashboard gives us the proper content.The resultant dashboard will be more relevant.
- To start with dashboards, we first need 4 or 5 visualizations ready (which we have already done in the previous section).
- Now, to open a dashboard either click on the below highlighted icon from the panelon the bottom of the page or on the toolbar where it says dashboard.
- This is how the dashboard looks like. On the left side, we can see the size option. We select ‘automatic’ from the drop down. Now the dashboard will fit any screen its displayed on (laptop/desktop/tablet/phone).
- We can see all the sheets that we created earlier listed in the sheets column.
- Next, we focus on the layout. We need to plan how we are going to arrange the sheetsto make the most sense out of them. Generally,most english speaking countries have a habit of reading from left to right.
- We can either glance the dashboard in a ‘Z’ pattern or a ‘N’ pattern.Deciding a layout for dashboard should have a logical approach.
- For example, in our case we are designing a sales dashboard. Our first chart, sales by category, gives a high-level view of sales. So,we would want to have that in the first quadrant (considering we have 4 sheets).
- To start with dashboard, first drag the Sales by Category sheet on the dashboard. It will take up the whole screen.
- Drag the second sheet, Sales by Sub-categoryand place it in the second quadrant. Repeat the process for the rest of the sheetsand place them in the third and fourth quadrants.
- To avoid visual clutter, we only retain ink that is absolutely necessary.So,we retain ‘Year of Order Date’legendand remove all the other legends.
- We can adjust the year of order date legend by expanding the more options and selecting the floating option. By doing so it is not fixed anymore and can be moved anywhere across the dashboard.
- We then arrange the years in a single row by navigating to more options, arrange items and selecting the single rowoption.Also, click on the filter icon of every sheet in the dashboard.
Key Points
Creating Story
Overview
Time: minObjectives
How to create a story in Tableau
- A story in tableau is a sequence of visualizations (either worksheets or dashboards) that help convey information. Before we start creating a story, lets create some more visualizations and dashboard.
- In the earlier section, we focused mostly on sales. In this section, we will create visualizations focused on profits.
Regional Sales and Profits Chart – To visualize the sales and profits of all the sub-categories across the regionswe create a horizontal bar chart.
- First, we add Region from the dimensions list to the columns shelf and then sub-category to rows shelf. To observe the sales, we add sales from the measures list to column shelf.
- The visualization created gives us the sales of all the sub-categories of product across all the regions in the US. Sort the bar chart in descending order for a better view.Now to observe profits of all the sub-categories across all the regions, we make use of colors mark card. When we add profits from measures list to colors mark card, it depicts the profits. There is a default color palette(orange to blue diverging). To change the color palette, click on the colors mark card and select ‘edit color’. From the drop down select the color palette which is the most appropriate for the chart.
- For this chart, we select ‘Red-Green Diverging’ color palette. The reason for selecting this palette is that culturally we associate green color to prosperity or progress and red to danger.
Not all viewers have the same visual acuity.Some of them might suffer from colorblindness. So, selecting such color palette which is colorblind-friendly is important.Blue-Orange is a common colorblind-friendly palette.
- Profit and Sales–To create this graph, we first need to drag the sub-category field from dimensions and drop it in the columns shelf.
- Next drag the sales from measures and drop it in the rows shelf. This chart shows the sales across sub-category.
- To add profits, you drag the profits from measures and drop it on the color marks card.
- Profit Trends–To visualize profit trends, add order datemonthto columns shelfand profit to rows shelf.We will then add profits to colors mark card.
- We also changed the month from discrete to continuousand add trend line by right clicking on the white space in the chart and selecting trend line option.
- Profit in Dollars–To visualize profits in value we duplicate the sheet and make necessary changes in them.
- Right click on the sheet name andselect duplicate from the options to duplicate a sheet. Next, select bar chart from the drop down in from the mark cards on the left.
- State-wise Profits–Similar to sales by state (Page 6).We change the color palette to red-green diverging
-
City-wise Profits–Similar to city by sales (Page 7). We change the color palette to red-green diverging.
- Profits and Discounts–To visualize profits and discounts drag and drop discounts to column shelf and profits to row shelf.
- Add profits to color marks card and change the palette to red-green diverging.Right click on the chart and add trend line by clicking on ‘show trend line’.
- Dashboard 1 –Profits Overview–Open a dashboard. Adjust the size option on the left to Automatic.
- Drag and drop sheets –Profit and sales, Profit trends, Profit in dollars.Arrange the charts in the following way –
- From the graph we can see that tables sub-category is the one with high sales and high loss.
- Let us add a filter to the first graph. By adding filter, we can filter out profit trends and profit in dollars for tables. Click on the filter on the first chart and click on tables.The dashboard will be show profits related to tables.
- Dashboard 2 –Profit across country–To create this dashboard, drag and drop profit and sales chart, state-wise profitand city-wise profits.
- Add filter to the profit and sales chart (just like we did in the previous dashboard).
- Dashboard 3 –Profit and Discount–Add profit and sales chart and profit and discount chart. Add filter as added in the previous steps.
- Creating a story–
- Arranging the charts /dashboards and adding meaningful captions is creating story. Start with a high-level approach of the problem.
- In our case, the issue is that tables are high in sales but provide the most loss in terms of profit. We then observe the sales trend for the same.
- We take a look at the geographical distribution and observe that state of Washington and Virginia are doing good. We come to a conclusion by looking at the discounts and profits chart that discounting is not a good option for tables.
Key Points