Skip to Main Content
It looks like you're using Internet Explorer 11 or older. This website works best with modern browsers such as the latest versions of Chrome, Firefox, Safari, and Edge. If you continue with this browser, you may see unexpected results.

Data Visualization - Tableau

Interface

Tableau interface showing different parts of the interface. Including toolbar across the top with a presentation mode button, data window on the left, in the centre of the window are a number of cards and shelves as well as a view pane.  Along the bottom is a status bar that includes a number of tabs to switch between  worksheets and dashboards.On the right is a show me toolbar which describes the potential types of visualizations.

Preparing Data

Data Types

  • In Tableau, a Dimension (listed at the top of the Data window) is a categorical variable, including text variables, date variables, geographic location names, and discrete numerical variables. 
  • A Measure is a continuous numerical variable, which includes geographic coordinates.

Data Structure

  • Tableau expects a very particular structure for the data you import.
  • In some programs this is called a "tall" or "narrow" format, rather than a "wide" format that is occasionally distributed by data producers.
  • There are a variety of tools that can be used to reshape (or unpivot) data in this fashion, including the Tableau Excel Add-in.
    • The plug-in is only available for Windows; Mac users can use a PivotTable feature to replicate this.
  • Tableau also allows you to join multiple tables together to merge and blend data.

data in the wide formatdata in the tall or narrow format

Loading Data

Selecting the file

  1. Open Tableau
  2. Click the “Open Data” button
  3. Select “Microsoft Excel”
  4. Select the “hurricane_tracts.xlsx” file
  5. Drag “hurricane_tracts” over Drag sheets here

Screenshot of data import interface. Interface lists  the available interfaces on the left side.  In this example one data set has been selected and Tableau shows a preview of the data set along the bottom.

Fix variable type errors

  1. For “Season”, change variable type to String*
  2. For “ISO time”, change variable type to Date & time

*In Tableau, dates need a month and day, so a year is not a date. If your data are annual, you can add a fake month and day that you later ignore.

Finalize import

  1. Click “Go to Worksheet”
  2. Move “Season (Count)” from Measures to Dimensions

 screenshot shows the data window in Tableau. Attributes from the data set are sorted into two categories - dimensions and measures

Create a Chart or Graph Type

Sample Charts: Line Chart

Option A: Building a line chart manually, with drag-and-drop

  • Drag “ISO time” to Columns or top of view area
    • The default aggregation when you do this should be "Year(ISO time)" in blue, as shown below. 
    • If you get something else, just use the arrow on the right of the ISO time bubble and find the first "Year" in the drop down.
  • Drag “Number of Records” to Rows or left of view area

Example of a line chart created in Tableau with  a x axis showing years, and y axis showing number of record.  A line connects the data points within the series.

Limit to last 20 years

  • Drag “ISO time” to Filters
  • Click “Relative dates”
  • Select “Years”
  • Click the button for “Last”
  • Adjust to 20 years

Same example showing data trimmed down to 20  years.

Option B: Create a line chart with Show Me

  • Click “ISO time”
    • The default aggregation when you do this should be "Year(ISO time)" in green, as shown below. 
    • If you get something else, just use the arrow on the right of the ISO time bubble and find the second "Year" in the drop down.
  • Ctrl-click “Number of Records”
  • Open Show Me
  • Select line chart

Example of a line chart created in Tableau using  the Show Me panel.  The show me panel displays various types of charts that can be used.  Chart types not appropriate for your data are greyed out.

Why are the two charts so different?

  • One has “Year(ISO time)” in green, while the other has it in blue. 
  • In the data window, “ISO time” is blue, which means “discrete.”
  • A discrete variable is like a category; values may have an order, but there isn’t anything in between them.
  • Line charts normally use a “continuous” date, though, so Show Me converted “ISO time” to green.
  • A continuous variable is like the full number range; you may only have a few values, but there are more possible numbers in between them.
  • If you click the "+" sign to expand the Year variables in each chart, they will both disaggregate down to the Quarter level.  The "discrete" chart, however, will treat quarters as categories, whereas the "continuous" chart will just add more points to the line.

An example of a line chart where year / time  has been interpreted as a discrete value.  This example shows the line as multiple disconnected segments.

An example of a line chart where year / time  has been interpreted as a continuous value.  This example shows the line as a continuous line.

Sample Charts: Box Plot

New in Tableau 8.2: Building a Box-and-whisker Plot

  • Drag “ISO time” to Columns
  • Drag “Wind in knots” to Rows
  • Change “Wind in knots” to use Average instead of Sum
  • Drag “Name” to Detail
  • On Show Me, click on " Box-and-whisker plot"
  • Limit to last 20 years (see Line chart demo)

This is a screenshot showing a box and whisker plot.  The  x axis shows years and the y axis shows average wind speed in knots.  Each year presents a box and whisker plot for the average wind speed value of that year.

Sample Charts: Path Map

Mapping Hurricane Tracts

  • Double-click “Latitude” and “Longitude”
  • Change both to Dimension
  • Drag “Serial Num” to Detail
  • Change mark type to Line
  • Drag “ISO time” to Path
  • Change “ISO time” to Continuous, Hour
  • Optional: Drag “Wind in knots” to Size

This is a screenshot of a path map tracking hurricanes  on a map of the world.  Each path shows the trajectory of an individual hurricane.

More information available on Tableau's Path Shelf

Sample Charts: Animated Map

Animating the tracts

  • Double-click “Latitude” and “Longitude”
  • Change both to Dimension
  • Drag “ISO time” to Filters
  • Click on Years (discrete) and select 2005 only
  • Drag “ISO time” to Pages
  • Click “Add all members”
  • Change the Pages version of “ISO time” to Continuous, Hour
  • Drag “Name” to Label
  • Under Pages, click “Show History” and change settings to pick “All” marks
  • Click the play button and speed up the animation

This is a screenshot of an animated path map showing the  trajectory of hurricanes in 2005.

Building Dashboards

Create a New Dashboard

  1. Click the new dashboard button at the bottom
  2. Drag the unfiltered map to canvas
  3. Drag the box and whisker plot to the bottom of the canvas
  4. Click the arrow at the upper right of the box and whisker to select “Use as Filter”
  5. Click a year name or range to change the map

This is a screenshot of a dashboard in Tableau.  In this  example we have two charts.  The chart on the top represents the path map displaying the hurricane trajectories. The bottom chart presents a box and whisker chart showing average wind speeds for each year.

Publishing/saving

Saving to the Web

  1. Hide any sheets you don’t want visible
  2. Click the “save” icon
  3. Log into your Tableau Public account (or create one)
  4. Choose a name for your workbook
  5. Decide if you want to show visible sheets as tabs
  6. Click Save
  7. Click “Open in Browser Window”
  8. Use Export button at bottom to get Image or PDF

Attribution

This guide has been adapted using "Tableau Public: Tutorial" by Duke University Libraries.

Suggest an edit to this guide

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.