Proportional Brushing with Tableau

I have a confession to make. I’m in love with another software package other than Tableau. It’s called JMP. I’ve used JMP for about the last 7 years or so, and I fell in love pretty quickly with its Graph Builder and Distribution capabilities.

One of their core principles is that every stat has a graph and every graph has a stat. Building complex models, such as neural nets or forest models, is also quick and easy. As of JMP 14, they also added a way to export your models to SQL, which is pretty awesome. Anyway, I digress.

In JMP, the main example data source is called Big Class. In the Tableau world, Big Class is the Superstore dataset. It’s pretty much what everyone starts out with. So instead of using Superstore, I’m going to bring JMP and Big Class into Tableau. Here’s an export of Big Class for you to look at. Big Class

Like I said, in JMP you can do distributions pretty quickly, and even export them out to interactive HTML, (pretty cool stuff.)

ezgif.com-crop

So how do you do this in Tableau? It was pretty much impossible. Now with set actions, it is very possible. Here’s a walkthrough of how to create a similar viz.

1.) Create 4 sheets, one for each. For age, create a bar chart, and for age, height, and weight, create a histogram from the Show Me Pane. For each of the histograms, they should create bins as dimensions.

2.) Drag them all onto a dashboard, and distribute evenly.

You should end up with something like this.

screenshot

3.) Go back to your Gender sheet (or any other sheet). Create a set on gender (sex). Then add it to the color mark on each of your sheets.

4.) On your Dashboard, add a set action under Dashboard, Actions, change set values. Click on Select under (“Run action on”), choose Gender Set, and click on Add all values to set. (Screenshot below).

screenshot4

5.) Now going back to your dashboard you see the following behavior.

ezgif.com-gif-maker (3)

That’s it!

Here’s the link to workbook on Tableau Public

Thanks!

Paul

 

Advertisements

Creating a Drill-Down Map Using Set Actions

Hey guys, welcome to the first blog post! I’ve been looking forward to Tableau 2018.3 since the beta testing, knowing that density marks were going to be included. However, Set Actions are a game changer.

In this post, I’m going to go through how to create a drill-down map, from state to counties using set actions.

First, I have a dataset I’ve compiled of State, County and Zip Code relationships. You can download it here. state_fips_zip

Like Superstore, lets create a few sets and dynamic names:

1.) Create a set of States. Call it State Set

2.) Create a set of Counties (FIPS). Call is County Set

3.) Create a Calculated Field Called Dynamic County:

IF [State Set] then [FIPS] ELSE [State] END

4.) Create a Calculated Field Called Dynamic Zip:

  • If both sets are true, return the zip code otherwise return NULL.
  • If the result is NULL return the first calculated field, otherwise return the result from step one.

IFNULL(if [State Set] and [County Set] THEN [Zip Code] END,[Dynamic County])

5.) Now create a worksheet with State, Dynamic County and Dynamic Zip in the details.

Capture14

6.) Create a new Dashboard and create 2 set actions:

7.) By clicking on a state, you see that it works…kind of. You need to go back to your sheet, and change some geographic roles.

Capture17

8.) Now, going back to your dashboard, you can drill-down from state to county with ease!

ezgif.com-gif-maker (1)

Here’s a link to the workbook on Tableau Public. There are still issues with Tableau public and set actions working, so you’ll have to download it to get the full effect.

Thanks!

Paul