Data House of Horrors Followup!
Thanks to the lovely folks at import.io for showing a super fun time last Thursday at our Halloween special webinar! If you logged on, you probably caught some of our “fancy dress” but in case you weren’t, this happened:
Getting ready to get spooky with data on our @importio webinar!
If you didn’t make it, never fear! It was recorded and you can watch the whole thing here:
I wanted to go a little more into detail about how to build this dashboard, so I’ll break it down piece by piece so that you can recreate it!
Building the first bar chart is pretty easy. To start, put [Costume Category] on rows. Since there are duplicate rows (due to having one row for every word in a title), instead of using [Number of Records] we are going to do a CountDistinct([Prod ID]). You can do this by right-click dragging [Prod ID] to the columns shelf and then selecting Count Distinct, or by clicking the drop down menu on the Prod ID pill and then going to Measure>Count(Distinct). This means Tableau is now only counting each costume once.
If the bins that your histogram selects are too big or small you can edit them by finding [Price(Bin)] in the Dimensions pane, clicking the drop down and clicking “Edit”. This will allow you to change your bins to whatever size you’d like.
Lastly, instead of doing a count on price, which will make for duplicate rows because of the join with the words, switch out [CNT(Price)] on the Rows shelf with [CNTD(Prod Id)].
To create the word cloud, drag the [Words] on to text and [Number of Records] on size. At first, you’ll get a treemap. This is a good point to filter out some of the words to keep them mucking out the word cloud. I filtered out words like costume, adult, the, of, etc. You can just over over a square and click “Exclude”. Once you do that, you can switch the marks card from “Automatic” to “Text” to get a word cloud.
Another thing I wanted to do was filter to only the top 30 words; that way nothing is too small. Since we already filtered on [Words] when we excluded “adult” and “costume” and the like, we can create a duplicate field for words and filter on that. If you click the drop down menu on [Words] you will find the Duplicate option. Click on this and drag it to the Filters shelf. Once you are there, click the tab that says “Top” and choose “By field:” and set it to the Top 30 by [Number of Records].
The table is pretty simple. Drag [Item] to rows and [Price] to label. Easy peasy. I also put [Prod Id] on Detail in the Marks card (you’ll see why later) and [Description] in the tooltip.
Hover Help Ghost
This is a trick I use all the time as it’s a great way to add context to your dashboard without taking up too much space. It’s been well documented before so I won’t go into too much detail. The only real thing I did differently was change the shape to a custom shape that looks like a little ghost. Read more about utilizing custom shapes here.
The “Sexy” button
To create this, I first went through all the words and created groups so that words like “Babe” and “Flirty” fell into the “Sexy” group and all other words counted as “Everything else”
With the groups created and renamed to [Sexy Words] I created the “Sexy” button by dragging out [Sexy Words] to the text on the marks card and then editing the label by clicking on the Text button and editing it to say “Click here to bring
Tableau Public is great for rapidly creating a lot of different charts types like we did above, but the real power comes in making these charts interact with each other. This is done through “Dashboard Actions.” Now that all of our sheets are created, we can create a new dashboard and drag everything onto it. Then we can create a series of dashboard actions by going to Dashboard>Actions in the menu. Here’s all the actions I created:
- Category filters everything: This action makes it so that click on a costume category in the bar chart filters the price histogram, frequent words, and costume list. Set “Categories” as the source sheet and “Price Histogram” “Table” and “Word Cloud” as the targets, with the action set to run on Select and clearing it will Show all values. I also set the target filter to only filter on [Costume Category].
- Histogram filters everything: This action makes it so that click a price bin will filter the table, bar chart, and word cloud to only show costumes that fall in that price point. This is set up by having the histogram as the Source Sheet and the bar chart, table, and word cloud.
- Word cloud filters everything: Just like the two actions above, this means that clicking on a word in the word cloud filters the prices, categories, and costume list to only show costumes that contain that word. In this case, the word cloud is the Source and the Targets are everything else.
- The “Sexy” button: Clicking on this button will filter everything to only show costumes that contain words that are in the “Sexy” group we made earlier. The source sheet is the sexy button and the target sheets are the categories, histogram, table, and word cloud.
- View the image: Dashboard actions do more than just filter things. They can also be used to display images. Buycostumes.com has images for every costume based on the [Prod ID] so we can easily pull in these photos using a URL action. When clicking the “Add Action” button, choose URL. The source of this action will be the table (this is why we put [Prod ID] on detail!) and set the URL to say “http://images.buycostumes.com/mgen/merchandiser/
.jpg?zm=170,170,1,0,0″. Set the action to run on Select. Now, clicking on a costume in the table will open up the image. If we add a Web Page to the dashboard using the Web Page object, we can view the image right on the dashboard.
I wanted the theme to be really obvious, so I did a bit of design work to make everything match the Halloween theme. First, I set the background color to all of my sheets and the dashboard to black and set the other colors to fit a theme. I based everything off of this color scheme:
Color by COLOURlovers
I even created custom color palettes in Tableau so that I could use those colors as a gradient in the data.
I also added a little tombstone image to the dashboard for the costume picture to load on top of.
So, that’s basically it! Our finished product looks pretty neat:
So, that’s it! I hope you enjoyed the webinar and the dashboard!