1 / 24

Treemaps and Table Calculations: An Exploration of Colors, Sorting and Partitioning in Tableau

Treemaps and Table Calculations: An Exploration of Colors, Sorting and Partitioning in Tableau. Jonathan Drummey Quality Management Data Analyst Southern Maine Medical Center jonathan.drummey@gmail.com. What You Will Learn. Making Sense of Non-Cartesian Layouts

maire
Download Presentation

Treemaps and Table Calculations: An Exploration of Colors, Sorting and Partitioning in Tableau

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Treemaps and Table Calculations:An Exploration of Colors, Sorting and Partitioning in Tableau Jonathan Drummey Quality Management Data Analyst Southern Maine Medical Center jonathan.drummey@gmail.com

  2. What You Will Learn • Making Sense of Non-Cartesian Layouts • Putting Multiple Pills on the Color Shelf • How Tableau Builds Treemaps • A Lot About Sorting • And how to answer a Tableau brain teaser • Basic Addressing and Partitioning • Using Restarting Every and At the Level

  3. Non-Cartesian Layout • Mark stacking is on by default for most Mark Types • Triggered by more in overall level of detail than displayed in the view • Requires no continuous (green) pills on Rows or Columns • Explicitly used by Treemaps, Packed Bubbles, and Word Clouds • Signs that Mark Stacking is on: • Left aligned numbers and/or text with odd layout • Ellipses (…) indicate that there is more data in the cell than Tableau can display • Big view area – fills the screen and potentially more than necessary for the marks you can see

  4. Multiple Discrete (blue) Pillson the Color Shelf • Top pill assigns categorical colors from the Tableau 20 palette • Least saturated color in each color range is always the same • All other pills create a “set” of the combined members within the color ranges defined by the top pill • Colors are evenly distributed from darkest to lightest based on the # of members of the “set” • Once created can be edited • If that is done, new color values will also need to be manually set • Lose color highlighting if a discrete measure is part of the set of colors • Three ways to turn this on: • Shift+Click and/or Ctrl+Click to select multiple pills from Data window and drag them onto Color Shelf • Shift+Drag a pill to add it to the Color Shelf • Use the shelf type icon menu that is located next to the pill on the Marks Card to change to Color

  5. Color Assignment Issue #1: Dark to Light • Dimension pills on color – no problem, use pill sort. • When a discrete measure is used on color, color ranges are assigned by either the alphanumeric or manual sort of the measure, with the first item getting order the darkest (most saturated) to the last getting the lightest (least saturated) • Workaround is to use calculated fields that have the desired alphanumeric sort and use those on Color instead • If a less messy Color Legend is desired, use a separate worksheet Color Legend w/hidden data or BYO Color Legend worksheet

  6. Color Assignment Issue #2: Sorting • Dimension pills on color – need to set up sort before applying Color, or reassign palette following sort. • Discrete measure colors are assigned based on the alphanumeric sort of the “set” of discrete values • Marks are positioned by the sort on the pills • setting a pill sort changes the order marks are displayed, not color assignment • Workaround is to use calculated fields that have the proper sort • Combined Fields, Build Your Own Combined Fields • String manipulations • Table calcs

  7. Color Assignment Issue #3:Distribution • Colors are evenly distributed based on the cardinality of the “set” • Notthe value of the item • Workarounds are: • Do some sort of binning (if data is dense enough) • Manually set colors • Not use categorical colors and instead use continuous pill on Color

  8. Treemap Layout • Non-Cartesian chart • Tableau totally determines layout • A grouping level per dimension on Level of Detail • In each grouping level, largest mark or subgroup in upper left, smallest mark or subgroup in lower right • Sized and ordered by the pill on the Size Shelf • Won’t overlap labels

  9. What Kinds of Sorts are Usedin Tableau and Where Top N Filters PillTypes and Arrangements Top N Sort Advanced Compute Using • Dimension • Pill Sorts • Alphanumeric • Manual • by Measure • Measure • Pill Sorts • Alphanumeric • Manual Hierarchical Sort Advanced… Field Sort Table Calc Computation Treemap Layout Color & Size Assignment Legend Ordering Mark Layout

  10. Hierarchical Sorting Column 1 Column 2 Value A Sort And so on for each additional Column… Sort Value B Sort …Value N Sort

  11. Tableau’s Sorting Data Column 1 Column 2 Column 3 Sort Sort Sort View

  12. Hierarchical Sorting in Tableau Data Column 1 Column 2 Column 3 Column 1+2+3 Column 1+2 Sort Sort Sort View

  13. Addressing (Compute Using) and Partitioning: Choosing 1 Dimension Partitioning Addressing All Other Dimensions in the View* Chosen Dimension Restart the computation for any new value of the remaining Dimensions Compute a result for each distinct address, i.e. each value of the chosen dimension *Discrete (blue pill) regular aggregate Measures that have unchecked Ignore in Table Calculations automatically become part of partitioning.

  14. Addressing and Partitioning:Advanced Compute Using & Sort Partitioning Addressing Dimension 1 Dimension 2 Dimension 3 Dimension 4 Dimension 5 Dimension 6 • Two sort options: • Automatic: Use the pill sort from the view (e.g. get a hierarchical sort) • Field: Sort the “set” of addressing dimensions by the chosen field

  15. Addressing and Partitioning:Restarting Every Partitioning Addressing Dimension 1 Dimension 2 Dimension 3 Dimension 4 Dimension 5 Dimension 6 Restarting Every keeps the sort defined by the table calc, and adds the chosen dimension and all dimensions above it to the partitioning.

  16. Addressing and Partitioning:At the Level Partitioning Addressing Dimension 1 Dimension 2 Dimension 3 Dimension 4 Dimension 5 Dimension 6 At the Level keeps the sort defined by the table calc, and increments the chosen dimension on it’s position within the partition, while dimensions below that don’t cause incrementing of ordinal table calcs like INDEX()

  17. Know your data Know your goal Figure out how what shape the data needs to be in (given your knowledge of Tableau) Set up the data and computations Build the view

  18. Review • Covered a lot of ground but… • 3 minutes to build the entire view from connecting to data to done (on a bumpy bus ride) • Treemaps and Non-Cartesian Layouts • Putting Multiple Pills on the Color Shelf • A Lot About Sorting • Intro to Table Calculations • YMMV (Your Mileage May Vary) disclaimer about factors affecting table calculation results

  19. Thanks! Jonathan Drummey Quality Management Data Analyst Southern Maine Medical Center jonathan.drummey@gmail.com http://drawingwithnumbers.artisart.org

More Related