Creating “Filled Shape Charts” in Tableau
This article originally appeared as a guest blog (and my first blog post) on my brother’s website at http://www.kenflerlage.com in April 2018.
Hello visualizationaries! My name is Kevin Flerlage. Yes, you read that correctly; it’s not a typo. I am the identical twin brother of Tableau Zen Master, Ken Flerlage (I’m sure you know the name since you are reading this on kenflerlage.com). Although I’ve been involved in data analytics for most of my career, I am actually a Tableau newbie. At the time of writing this guest blog, I had been using Tableau for just 6 weeks. Ken provided me with a Tableau crash course and I fell in love with the perfect combination of data and creation. Four weeks later, my fifth visualization was selected as Viz of the Day. (It certainly helps to have a Zen Master as a teacher). My Viz of the Day (African Water Crisis) can be seen on my Tableau Public Profile and will be the subject of this blog. Thanks to Ken for the invite to be a guest blogger.
Visualizing my Visualization
When creating my African Water Crisis viz, I wanted to visually represent the substantial difference in access to clean water in Africa compared to the rest of the world. Sure a bar graph or a map would suffice, but I wanted something that would truly drive it home (I mean, this is why we are here, right?). I had seen visualizations previously where people had seemingly “filled different shapes” based on some level of data. As a newbie, I thought “how the heck did they do that?”—a thought that has been a recurring theme for me in this short time. I ultimately learned that beautiful doesn’t mean complicated (but don’t tell my wife that). Let’s dig into the “filled shape chart”.
The Data
The data I used for this viz was lengthy, but very simple. The data showed the percentage of people within each country who have access to clean water. It showed this information for nearly every country between 1990 and 2015. In addition, the data was rolled up to region (Europe, Oceanic, Americas, etc.). For the filled shape chart, I focused solely on the most recent measurements for 2015. The scrubbed data simply showed each region and a total percentage with access to clean water.
The Bar Graph
Previously I said that a bar graph would suffice; well the truth is that it is the basis of the filled shape chart (though other charts can be used as well and I’ll mention this later in this blog). So let’s start by creating a simple bar graph. I changed the background to black and since I was dealing with water, I changed the color to blue. I removed all grid lines to make it a bit cleaner, but I did keep the axis labels for ease of reading. The bar graph by itself looked pretty good:
The Bottle Shape
So how do we turn a simple bar graph into a filled shape chart? Okay, this is the critical point in this entire process. Please be prepared. Are you ready? Okay. Just stick an image on top of the bar graph. What????!!!! Yeah, just overlay an image with a transparent center on top of the image to look like it’s filled. This was a total buzz kill for me. In my brain, I wanted it to be more complicated. I wanted it to involve some crazy Tableau trick that would literally fill the shape–some magic formula. I felt like I did when Ken and I were kids and we learned that a piece of PVC pipe slid onto a hose that was strung between two trees two stories high did NOT make a good zip line (ask Ken about that sometime). But, though somewhat disappointing, it was a complete aha moment. The truth is that it’s simple and doesn’t need to be complicated. And once I learned that, I started thinking about all the applications for this type of work (and there are a lot of them).
This image had white background and black bottle outline. My viz utilized a black background with white lettering so I changed the bottle to have a black background and white outline.
As mentioned previously, you will need to make the inside of the image (in this case a water bottle) transparent. On his website, Josh Tapley shows us how to create transparency in images quickly and easily using PowerPoint. For the filled shape chart, instead of making the background transparent like Josh shows us, we need to make the inside of the image transparent so the bar graph will show “through” the image. For my bottle, I utilized this method to make each segment of the inside of the bottle transparent. When working on your image, be sure to leave the background opaque (for some reason I was always confused as to exactly what opaque meant, but ultimately it just means NOT transparent). The background will also need to be the same background color of your dashboard. The reason it will not be made transparent is because you want it to actually block out any extraneous parts of the bar graph—without an opaque background, I would have had part of the bar graph peeking out from the curved bottom of my water bottle.
Raising the Bar
From here, it's easy. You add your bar graph to the dashboard, then add the image to your dashboard. Move and resize the image to fit nicely over the bar graph so that only the bar shows within the image itself—this may take a bit of tinkering with the image size/position and bar graph size/position. See below:
Resize and position the image:
Repeat this process until all bar graphs are covered and aligned (Tip: Use the Layout panel to adjust the position of each shape). The result is a bar graph with flair. Compare the two options bellow. Sure the bar graph would work, but the bar graph with overlaying water bottles (filled shape chart) sure gives your visualization a nice boost.
Original Bar Chart
Updated Filled Shape Chart
As I mentioned earlier, once you realize the secret behind this, you will start to see applications for it on a regular basis. Simon Beaumont just recently did this with his Makeover Monday gender equality visualization.
And it’s not limited to just bar graphs—you can do it with all kinds of other charts such as pie charts (that look like actual donuts).
Well there you have it…my first blog. And since you’re reading this, it means you made it all the way to the end (hooray for me and especially you!). I hope this Tableau newbie was able to provide a tiny bit of insight into the filled shape chart. And by the way, Ken Flerlage rocks!
This article originally appeared as a guest blog (and my first blog post) on my brother’s website at http://www.kenflerlage.com in April 2018.
Kevin Flerlage, April 7, 2018
This is a fantastic post. Thanks for sharing.
ReplyDeleteThank you! Glad you enjoyed it.
DeleteWOW! :O
ReplyDeleteFinally I found you, and found how to make something like this, thank you very much
ReplyDeletecan you please post how we can turn the image into transparent, the link you provided for Joshs blog exists no long.
ReplyDeletethanks alot
Sure, check out this video. 15:55 into the video, I explain how to do exactly this! https://www.youtube.com/watch?v=xA_vjb1Lz_I&feature=youtu.be
DeleteGreat post!
ReplyDeleteThanks for the blog Kevin. Which font have you used for title of the viz?
ReplyDeleteI used a free font called "African".
DeleteThanks Kevin.
Delete