Mmmm doughnuts…


Hi there,

Recently I saw this cool viz from the awesome @jeweloree.

dashSo I thought I’d have a go at my own food related dashboard. They say that in London you’re never more than 10 feet from a rat. Well in the investment banking arena that also applies to doughnuts. They’re everywhere. A trip to the coffee point can end up adding an inch to your waistline. Luckily I’m quite fussy when it comes to doughnuts so unless there’s an apple cinnamon one there I can easily walk on by.

So exactly what goes into one of those bad boys? Well Krispy Kreme have a pretty cool website where they declare a lot of this information. That’s good of them I think. No-one pretends doughnuts are good for you but at least they’re not hiding what goes into their products. I like that approach. Allows the consumer to make, and take responsibility for their own actions, rather than the people who trough loads of fatty food and then complain that they “didn’t know it was bad for them”.

So I grabbed the nutritional info for their Xmas menu from the link at the foot of this page. I had to chuck it into a spreadsheet and reformat it a little, but the resulting data was easy to read with Tableau. They also had nice thumbnail pics of each doughnut that instantly gave me the idea of a lollypop chart using a custom shapes palette. I also added a reference line to indicate the value of the secondary element of a nutrient component. Shame that only applies to carbs and fats though.

So in a little more detail…

I grabbed the data from the Krispy Kreme website here. I had to transfer the pdf to a local spreadsheet but given the limited data set it didn’t take long.

parameterOnce the xls was connected I decided what measures to plot. I wanted the user to be able to change the chart focus to whatever nutrient they wanted so to do that I used a parameter. It looked like this (left).

calcfieldThat parameter had a corresponding calculated field to allow the selection to be plotted on the Columns shelf. I typically use a case statement to allow the selection. Not sure if this is the best way to do it but it seems to work well. And of course I had to “Show Parameter Control@ to allow it to be effective.

That all allowed me to easily plot a simple bar chart for the nutrient in question, selectable using a parameter.

ScreenShot

In order to represent the secondary nutrient for Carbs and Fat I created another calc field and plotted that using a reference line.

Shame that the other main measures didn’t have a corresponding secondary nutrient. I would have liked this to be consistent for all the selectable measures but hey ho.

shapesNext step was to give the lolly its pop. First off I grabbed all the thumbnail images of the doughnuts and chucked them in a shapes folder. Then it was a case of assigning the correct image to each value for the “Donut” measure. Once that was done I duplicated the measure on Columns and made the chart dual axis, and the shape to be the doughnut image. To add extra effect I made the width of the original bar thinner.

The doughnut selector was achieved by a simple chart showing only the images.

doughnuts

And the rankings by using the nifty Rank table calculation feature in 8.1. This is ace and saves so much time over earlier versions.

Then I pulled the whole lot into a dashboard and used the main doughnut selector as a filter. I’m pleased with the result, especially the use of the images which give the whole dash an element of visual appeal.

I was gonna do a timeline of when each product was released but I couldn’t find that data anywhere. Boo.

And here’s the result. Hope you like it. That White Chocolate & Almond one is a total bad-ass. Cookie Crunch also packs a carbohydrate punch but at least you get a bit of fibre in there.

dash

Cheers, Paul

Advertisements
This entry was posted in How to... and tagged , , , , , , , , , , . Bookmark the permalink.

4 Responses to Mmmm doughnuts…

  1. Harley says:

    Great concept! And I love donuts!

    I was a bit confused on the usability of your Nutrition Selection parameter. For example, when you select Protein (not much in donuts anyway), there is no secondary measure. Also, the y-axis label is somewhat confusing.

    Anyway, I posted a new .twbx that provides a Primary & Secondary Nutrient parameter. The secondary nutrient parameter uses a ‘per cell’ reference line to plot the value. I think it works well and gives the user more control over selecting unique dimensions to plot. One additional step I’d take is to build another sheet that creates a dynamic title based on your Primary Nutrient selection and then use a floating container to label the y-axis on the dashboard.

    Here’s a link to my version (see Sheet 10 in the .twbx)….

    https://dl.dropboxusercontent.com/u/24555502/Donut%20Dashboard.twbx

    Harley

  2. This is cool. I will never eat a white chocolate and almond donut. I think you could have left out secondary nutrient and it would have been easier to understand. It took me a few minutes to understand what you meant by secondary. Anyway, awesome visualization!

  3. Dustin Smith says:

    Despite the compelling story of your visualization,I suddenly really want a chocolate dreamcake. Great stuff!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s