Ads Top

A Sweet Take on Iron Viz (Guest Post by Kevin Flerlage)


Well, what can I say…I’m a sucker for a challenge. When I was a kid, I would do just about anything on a dare. In elementary school, kids would dare me to combine foods (which should not be combined) and eat them. I was always the kid who threw something at a car and ran (though I’m not proud of it). About 10 years back while on the golf course, I ate a live cicada for a dollar. And at any given time, I will put 4 quarters up a single nostril as long as you provide the quarters (make sure to bring your quarters to TC18!)  I’m a sucker for a challenge. That’s why, when Andy Cotgreave challenged the Twitter community to visualize Recaman’s Sequence in Tableau, well I couldn’t resist (nor could my brother – read about both of our experiences here:  Two Approaches to Building the Recamán Sequence in Tableau). And now Andy Cotgreave has presented another challenge—write about your IronViz experience. This is a bit different than eating a live cicada or pudding tacos, but challenge accepted!  Please note that despite the recent Twitter rumors, I will not be challenging Andy to a magic showdown. He is far too good, I am far too bad (and completely out of practice) and I am fearful that he will make the rest of my hair disappear #BaldiesDoData. Okay, on with the IronViz experience.

As many of you know, this is ALL new to me. My first time touching Tableau was on Feb 26, 2018 when my twin brother and Zen Master, Ken Flerlage, gave me a three hour lesson and I was hooked!  At that point, it was incomprehensible that I would get third place and Best New Entrant for The Lorax in my first IronViz feeder just two months later. When the second feeder of 2018 was announced, I knew that I had been there before, I was no longer eligible for Best New Entrant and it was time to step up my game.

I am in Healthcare and when the Health and Well-Being topic was announced, a lot of ideas came to mind, but none of them excited me. I shared the feeder topic with a colleague (a pharmacist who isn’t excited about data, but is certainly interested in Tableau). We talked through a couple of concepts and landed on the idea of Candy Land. It would allow for some cool navigation and provide the flexibility of smaller dashboards. The original idea was to focus on various aspects of health and well-being, but later I decided that since it was Candy Land, it should focus solely on sugar and the dangers of eating too much of it. (Besides, I LOVE candy!!!!)

However, I had one problem—I had absolutely no clue how to allow my game piece to navigate around the board. I had to have the proof of concept before even beginning to look for data. I thought that I could use a scatter plot and with some trial and error, plot the points related to the squares I wanted the game piece to land on (yeah, stinkin’ newbie). But then I realized that transparent sheets were not yet available which would make this very difficult.

I started digging and found an article from Ryan Sleeper (How to Map Any Background Image in Tableau) which talks about how you can map a background image with other images overlaid without the need for transparent sheets. It was EXACTLY what I needed; I LOVE you, Ryan Sleeper!  I tried it and it worked perfectly. I then used his annotate trick (in the same article) to find the coordinates of where I wanted my game piece to land, added those points to my spreadsheet, uploaded it. I then used a filter to make that same game piece shape seemingly move across the board. (In reality, I just used the same custom shape at each point and allowed the user to filter between those points).

From there, I wanted the user to be able to click on the spot on the path to jump to a dashboard that presented data on sugar intake. So how would I set it up so that a user could click on something and jump to something else?  Again, this newbie didn’t have a clue, although I was certain it was possible. With a bit of research, I found the following article from Nicco Cirone on The Data School website: Creating Dashboard Navigator Buttons. It shows you how you can use a custom shape as a chart then use a dashboard filter action to navigate to a different tab within that visualization (the key is to allow it to show tabs). Armed with this information, I knew I could create a small custom shape or even just a filled square that matched the color of the spot I wanted the user to click on (see below). That way you couldn’t see it because it blended in, but you could click on it. By clicking on it, it would evoke a dashboard action to jump you to a new dashboard. Another button could be added to allow you to move from that dashboard back to the main game board. That was the proof of concept that I needed as navigation was 100% within the game and there was no reason to use the tabs whatsoever (although it was necessary to show them in order for it to work).



From there, it all came together like clockwork. Yeah right…I struggled mightily on the very first dashboard (shown below). The first chart went smoothly. It looked like a bar chart, but I wanted it to look like sugar. To do this, I created it as a scatter plot with randomized x y coordinates within the space where the bar would have been. As an example, the data for the year 1700, the x coordinate ranged between 1650 and 1750 and the y coordinate ranged between 0 and 5. For the points, I simply used a white square (and the number of points was reflective of 10 times the measure, i.e. 5 grams in 1700 = 50 points).


But it was the next chart (the peppermints) that gave me nightmares. I originally laid it out in columns and rows and showed both the figure in 1700 (like one and a half peppermints) along with the measure in 2009. I also wanted to show various comparisons like peppermints, cookies, cans of soda, etc. Here is where it all fell apart. It looked awful. Everything I did looked like complete garbage. I probably fiddled with this chart for 3 hours across several days. I had pretty much gotten nothing done. I was 99% sure that I was going to scrap it (this is not an exaggeration, but a fact). I simply could not get it to work…I hated it!  I stopped working on it for several days.

At some point during those days of not touching it, I saw Lindsay Betzendahl’s Influenza viz of the day. It showed seasonal influenza trends over numerous years. Instead of arranging it horizontally, she visualized it in a circular pattern (shown below - click to see the full viz).



That was it!!!  That was my light bulb moment. Forget the rows and columns—I would place it in a circular pattern!  And it worked…it looked exactly like I wanted it to. Thank you so much for the inspiration, Lindsay!!!!  (As a side note, this is what makes Tableau so great. Yes, it is an amazing tool and so fun to use, but it’s the community that takes it to the next level). Okay, enough of the mushy stuff!  Here’s how it ended up looking:


From there, things actually did go relatively smoothly. Sure, I had a handful of challenges and things not looking the way I wanted, but generally I just kept cranking along. Below I will touch on some of the charts in each dashboard, but won’t go into detail.

  • Nine Spoons of Sugar:  the test tubes and percentages for youth and adults are both filled shape charts (see blog for more details, see Filled Shape Charts).
  • Sugar in a Rush:  For the McDonalds chart, I had to determine the x y coordinates. I decided to try Spotify's Coordinator tool. This site allows you to upload and image and it will provide you with the x y coordinates associated with that image. I set it to use 260 points (same as the number of menu items). Once I had the coordinates, I sorted the y coordinate in descending order. I then sorted the McDonalds menu item list in descending order of sugar content. I then combined the lists where the smallest y coordinate matched up with the item with the least amount of sugar. I plotted the points in Tableau, changed the shapes to yellow circles (with the exception of the bottom shapes where I used squares to block off the bottom) and there you have it!  A McDonalds chart showing all their menu items as it relates to sugar content.
  • The Sweetest Country:  this is my favorite dashboard in this viz. The map is simple, but the sugar jar took a bit more time. I wanted to do another filled shape chart, but I couldn’t find a good sugar jar image. So, I drew it myself in PowerPoint. I pieced together two concentric circles and a couple of gray, rounded rectangles. I then trimmed it up on Paint.net and added transparency within the jar itself. It came out very nice and tied in interactively with the map.
  • Sugar Can Do That:  This dashboard was pretty simple. I wanted to show health complications where too much sugar may be a factor. In addition, I wanted to do it like a doctor’s chart where it was pointing to the place on the human body that was affected. So why not use a man…a gingerbread man!  From there, I downloaded several icons from The Noun Project and utilized them as custom shapes with tool tips that explain each health complication.
  • Give Me Some Sugar:  this chart is simply two scatter plots. The first shows sugar cubes at x y coordinate of 0, 0. Then rats are positioned in a circular pattern around the sugar. The rats are one image that I rotated 10 degrees and saved, then 10 more degrees and saved, etc. In total, there are 36 rat images all facing in different directions. This was replicated for the cocaine chart.
  • Now You Are Stuck:  some people were disappointed that they didn’t get to finish the game, but I loved the idea of viewers getting stuck with Lord Licorice where there is a call to action to improve your health (or help someone else improve their health). This dashboard is nothing other than some image work and the only “chart” is the custom information button showing the sources I utilized.

The end result was a viz that focused on an important health topic in a very fun and interactive way. It was a fun one to create and an incredible learning experience. If you have any questions on any part of the viz, certainly feel free to contact me. Now I’m off to go eat a half dozen cookies and wash it down with a couple of sodas…NOT!


I’d like to extend a special thank you to my brother, Ken Flerlage, for allowing me to utilize his blog. He is a fantastic resource in this community.

Kevin Flerlage, July 21, 2018

No comments:

Powered by Blogger.