Building Treemaps

Treemaps let you display data in nested rectangles. You use dimensions to define the structure of the treemap, and measures to define the size and/or color of the individual rectangles.Treemaps are a relatively simple data visualization that can provide insight in a visually attractive format.
In Tableau, you create a treemap by first placing one or more dimensions on the Columns shelf and one or two measures on the Rows shelf. Then choose treemap from Show Me.
The treemap you will create in this exercise shows aggregated sales totals across a range of product categories. You then have two options for enhancing this basic treemap.
  1. Connect to the Sample - Superstore - English (Extract) data source, which is included with Tableau Desktop.
  2. Drag the Category dimension to Columns.
    A horizontal axis is created showing product categories.
  3. Drag the Sales measure to Rows.
    The measure is automatically aggregated as a sum and a vertical axis is created.
    Tableau displays a bar chart—the default chart type when there is a dimension on the Columns shelf and a measure on the Rows shelf.
  4. Choose the treemap chart type from Show Me:

    Tableau displays the following treemap:

    In this treemap, both the size of the rectangles and their color are determined by the value of Sales—the greater the sum of sales for each category, the darker and larger its box.
  5. Drag the Ship Mode dimension to Color on the Marks. In the resulting view, Ship Mode determines the color of the rectangles—and sorts them into three separate areas accordingly—and Sales determines the size of the rectangles:

  6. To examine another option to modify the treemap, click the Undo button to remove Ship Mode from view. For more information, see Undo and Redo.
  7. Drag the Profit measure to Color on the Marks card. Now Profit determines the color of the rectangles, and Sales is determining their size:

Treemaps cannot accommodate more than two measures—one to control size, the other to control color. Treemaps can accommodate any number of dimensions, but you can only use one dimension to diversify the view, by dragging it to color. Other dimensions can be used only to multiply the number of rectangles in the view. Dimensions cannot be displayed in a hierarchy.

No comments:

Post a Comment