Data Viz Done Right

April 24, 2017

Makeover Monday: Which data skills are HOT where you live?

No comments
This week Tableau joins us for a special edition of Makeover Monday. One of their very own, Marissa Michelotti, published this viz on Tableau Public and volunteered it for the Makeover Monday Community to improve upon.

What works well?

  • Clear title that tells me what the viz is about
  • Can easily find the top 10 job skills in any country (but there are some problems with this too).
  • Keyword search in the box & whisker plot
  • Overall layout is simple

What could be improved?

  • What do the colors mean in the bump chart? There's no legend.
  • The bump chart cuts off jobs when they aren't in the top 10, making it look like they didn't exist in the other years.
  • The country filter only applies to the top chart. I didn't realize that. I think it could be more clear.
  • Box & whisker plots are hard to understand for most audiences. And using one for data that is ranks doesn't make a lot of sense to me since you really can't tell how much better the top is from the bottom with ranks.
  • How are the jobs organized in the bottom chart? Is there a logic to the sort?
  • What's the scale of the box & whisker plot? It looks half cut off to me.
  • For most people, they probably won't care how their country compares to other countries. I would think it's more important to understand which jobs are hot where you live.
  • There are a LOT of missing roles in 2016 that existed in 2015 & 2014. I would remove 2016 since it's not comparable to the other years.

Much like Eva, I decide to make this a tool people could use. If someone lives in the U.S., they probably don't care which jobs are hot in Singapore. Or maybe they do care about Singapore because they want to move there. My viz is intended to help people find the hot jobs that are geographically important to them.

Click on the image for the interactive version.

April 21, 2017

Five Years of Parking Violations in Philadelphia

Tuesday evening, Eva and I were invited by Amarendranath to participate in an event at St. Joseph's University in Philadelphia (my hometown) where we got to introduce them to Makeover Monday, watch Corey Jones give a great Tableau demo in which he introduced them to their challenge.

How can you visualize 7.4 million parking violations in Philadelphia?

The data comes from the City of Philadelphia and was provided in a packaged workbook. This was sent to Eva and I as well, but the extract was painfully slow for me. I promised everyone I would create my own viz and the performance had to be addressed. I knew Exasol would give me the performance I was needing, so I created a workflow in Alteryx to take the CSV and upload it to Exasol. The great thing about throwing the data into Exasol is that I don't have to do any performance tuning. Exasol figures all of that out for you.

Now I was cooking with gas! I explored time series, types of violations, where violations occur, etc. to get a feel for the data. Next I went to back to the city's website and had a peek at their dashboard and thought it wasn't too bad. The major issue I see with it is filtering performance. I decided to build the same view in Tableau with a few changes:

  1. Create an aggregated extract that only includes the fields I need and aggregates to the monthly level. This significantly reduces the data for publishing to Tableau Public and makes the user experience better.
  2. Since the Eagles are my favorite NFL team, I changed the color scheme to use their official colors.
  3. I made the chart titles more informative by putting them in question form.
  4. I added an option for the user to switch between the number of violations and the amount of the fines.

All of this took about 30 minutes (primarily because the dashboard design was already done for me). Thanks Corey and Amarendranath for the opportunity to meet the team and participate! Let's do it again soon.

April 19, 2017

Workout Wednesday: Bollinger Bands and Tableau Stock

No comments
Emma had a cheeky grin on her face today when I asked her about Workout Wednesday. I'm fairly sure she was convinced that she had something tricky up her sleeve for me because, well, we're a bit competitive.

This week she challenged us to build a Bollinger Band chart based on Tableau's stock performance.
Fortunately for me I had already done nearly this exact chart back in 2014 as a tip here and as a video here. Heck, it was even based on Tableau's stock! How convenient is that!

Emma threw in a couple nice nuggets in her tooltips that required a couple calcs, but nothing overly complex. The trickiest bits are the table calcs you need for the lower and upper bounds. Mostly everything else is formatting the view.

Thanks for the challenge Emma! I'll be extra mean next week because you seemed excited about that.

April 18, 2017

Tableau Tip Tuesday: FIXED Level of Detail Expressions in a Plain English Sentence

UPDATE: In the first iteration of this video, I was explaining the FIXED LOD like I would explain an INCLUDE LOD. I have fixed that and re-recorded the video. Thanks to Graeme Wiggins and Bora Beran for the feedback!
Back in February, I wrote about putting table calculations into an english sentence. This concept can be easily extended to level of detail expressions. As such, I'm going to kick off a series of blog posts that show how to take ANY level of detail expression and turn it into an english sentence.

First up are three use cases for FIXED LODs.

How many customers placed how many orders by region and product category?

How many products sell in how many regions by year and quarter?

What is the total number of customers acquired by region by day?

Here's a video of how I created each of the scenarios and the examples for you to download and follow along. Enjoy!

April 16, 2017

Makeover Monday: Lamotrigine vs. Lamictal - How much does the NHS save by prescribing the generic drug?

No comments
Eva was up to her tricks again this week, providing us with a ridiculously large dataset to play with of prescriptions in the UK.
I've used this dataset before, so I was already pretty comfortable with the data. The viz that she asked us to makeover in underwhelming given the detail of the data behind it.

What works well?
  • Line charts are always very easy to understand
  • Laying the charts out side-by-side allows me to see that while prescriptions have been rising, costs haven't been rising at the same rate.
  • Axes are clearly marked and not too crowded
  • Title tells me what the viz is about, though it's pretty boring
  • Chart titles describe what I'm seeing
  • Using green for the lines, which is the color for pharmacists in the UK

What could be improved?
  • There's no story. Are the trends good or bad?
  • There could be more comparisons and context. Something like cost per prescription makes it easier to understand if costs are going up or down overall.
  • More detailed data, like at the quarterly or monthly level, might show more interesting patterns like if the prescriptions are seasonal.
  • Do these trends apply to all regions in the UK? Does it apply to all medicines?
  • Use a more impactful title.
  • When I look at medical data, I always wonder what it means for me. This viz can't answer that.

For my viz, I wanted to look at two specific drugs. Well really it's the same drug, just in generic and brand name versions. Pharma companies spend a ton of money pushing their new medications, yet the NHS has a responsibility to keep costs down. To help me understand this better, I reviewed Lamictal (brand) vs. Lamotrigine (generic). I chose these because I've taken both of them and know how stupidly expensive the brand can be. If you're curious to know why I took these, I explain at the bottom of the viz.

Special thanks to Johannes Meier for creating this dataset and to EXASOL for hosting it.

April 13, 2017

Mac’s Declining Relevance To Apple | A Tableau Remake

No comments
Earlier today I wrote about this great viz from Business Insider. In particular I really like the annotations.

I had a few minutes this morning so I decided to build a Tableau version. The first problem I ran into was getting the data in fiscal quarters. I couldn't find the data quickly, so I went with calendar quarter data that I found on Bare Figures. My data doesn't match the original above due to the calendaring, but that wasn't the point of the exercise. This was all about practice for me.

Essentially I wanted to replicate the viz with a more impactful title and some other minor formatting changes. Here's what I came up with. Click on the image for the interactive version.

April 12, 2017

Workout Wednesday: How many times has a team been top of the Premier League?

I bet you'll find this week pretty easy. If not, blame Charlie Hutcheson. He was asking for a bit of table calc and LOD practice.

The requirements this week are pretty simple and use a data set of Premier League points from the 2015/16 season. Note that this data set doesn't include the whole season; that's not the purpose of the exercise.

  1. Must be a single chart
  2. Match the colors of the teams exactly
  3. Match the tooltips
  4. Sort the teams by the number of weeks they were in first place
  5. Left bar chart must be based on a LOD expression
  6. Right bar chart must be based on a table calculation
  7. Both bar charts need to have a label on the end of the bar with the number of weeks in first place
  8. Match the column headers
  9. View size is 800x600

Good luck!

April 11, 2017

10 Years Later...What Tableau Means to Me?

Anyone that knows me will agree that I am absolutely terrible at remembering important dates. Yet April 11, 2007 is a day I will never forget. My boss' boss at Coca-Cola, the Director of Revenue Management, came into my office on the 15th floor on a sunbaked day in Atlanta with a simple question:

Can you create a few dashboards to help us monitor the annual planning process?

Seemed simple enough, yet we didn't have any dashboard software. All we had was pivot tables in Excel sitting on top of OLAP cubes. I had tried and failed miserably to created dashboards before. I knew I needed to try something else. So I turned to Google and entered this simple search:

The first result that came back seemed to be exactly what I was looking for.

I downloaded and installed Tableau 4.1 and watched the first few training videos. 30 minutes later, the whole project was done and my life was changed forever.

It might seem odd that a simple piece of software could change my life, yet I know that finding Tableau has been the most important moment in my career. No doubt about it!

At the time, Tableau had just added dashboards. There were no table calcs, no LODs, yet the software got out of the way and allowed me to enjoy every minute of every working day. 10 years later, I'm just as in love with Tableau as I was on that first day. Here are some of the reasons why.


Tableau is fast and easy to learn, yet sophisticated and elegant. Tableau's most powerful feature, in my opinion, isn't dashboarding, which is what so many companies purchase it for. Rather, Tableau's bread and butter is visual analytics. When Tableau says they allow you to "see and understand your data,” they mean it. Tableau does what it says on the tin. If you're not using the power of visual analytics in your organization, you're missing out on the true power of Tableau. No other product allows you to answer questions you have visually, at the speed of thought. You can literally SEE the answers to your questions.


Tableau users are a passionate bunch. No other product comes even close to the network of people freely willing to help each other. Post a question to the Forums and you're likely to have a response in a matter of minutes. There are countless people waiting to help you. Tableau doesn't require their users to help each other. The users help each other because they WANT to. From Joe Mako to Jonathan Drummey to Pooja Gandhi to Alexander Mou and many others; these people feel their personal mission is to help others succeed with Tableau. People helped them and they are merely paying it forward.

Then there are the bloggers: people that use their free time to write about Tableau. We do it (assuming I can speak for others) because we want to help people learn. When we learn something, we want to share the knowledge. Why? Because writing about Tableau helps everyone get better. And really, it helps the writer the most. When you write about what you learn, it helps reinforce the learning. Sounds great for everyone!

And of course, there are the Community projects. Projects like Makeover Monday that I run with Eva Murray (and last year with Andy Cotgreave) have been wildly successful because, first and foremost, they encourage people to learn, practice and improve. Every week, I'm amazed that hundreds of people can take the same data set and all create a unique visualisation. No other piece of software has Community projects like this that I'm aware of. Beyond Makeover Monday, people will come up with any excuse to meet and use Tableau. Viz Club even meets in a pub!


I count myself one of the few fortunate people that have gotten to know the leadership team at Tableau very well. In fact, I consider all of them my friends. I know I'm not the only one that feels this way and it's to their credit that they really want to get to know their customers. Most importantly for me, if I have a concern, I know I can email Elissa Fink or Francois Ajenstat or Andrew Beers or Dave Story and they'll respond. What makes them special is they genuinely stop and listen. They know that without their passionate customers, Tableau wouldn't be the product that it is.

Case in point: a few weeks ago I had some concerns that I needed to vent about. I was in Scotland and sent an email to Francois who was in Seattle. The next evening we were on the phone discussing my concerns. And you know what? Francois followed up with me. He didn't have to take my call. He didn't have to listen. Yet he did, and I'm grateful for that.


Products seem to spring up monthly, claiming to be the “Tableau Killer!” I'll let you in on a little secret these companies don't know: Tableau is innovating faster than they are, and it's a moving target they won't catch. No other data visualisation product reinvests as much in the product as Tableau. This means amazing new features in every single quarterly release.

What impresses me most, though, is how Tableau takes the complex and makes it appear effortless. That's an art! Other products don't think that way; they see features as a checklist. Tableau sees features as capabilities to solve problems. Don't believe me? Try to create the same chart in several products. I guarantee it will be simpler and more elegant to do in Tableau.


If you haven't been to a Tableau Conference, you need to get yourself there. Even if you have to pay for it yourself, do it. It's like a Bruce Springsteen concert for data nerds. People are literally high-fiving, giving standing ovations, cheering at the new features they're seeing for the first time. You don't see this at other software conferences. You come out of every Tableau Conference ready to take on the world.

I love TC because I get to learn, to connect with people I've only ever known on Twitter, to see the people I consider some of my closest friends. You know that feeling when you reconnect with someone you've known for a long time and it's like no time has passed? That's what TC is like for me.

As a Tableau Zen Master, I have the privilege of connecting to TC in a unique way. I've had the pleasure of speaking at seven TCs in the US, including the very first TC in 2008 which had barely over 100 people in attendance. Now, there are over 10,000 people. I also get to help with Tableau Doctor. People come to the Doctors for help with their Tableau problems and we get to help them 1-on-1. I get to sit in on Community Alley for a meet and greet. This is special for me because I get to meet the people that read my blog and get to know them personally.


I bet I can count on one hand the number of days that I've used Tableau where I DIDN'T learn something new. That's right, I've been using Tableau for 10 years and still learn nearly every day. I love that about Tableau! Whether it's a new way to accomplish a task or breaking an old habit, Tableau and the Community are there to help me learn.

That's the inspiration behind the Workout Wednesday project that I run along with Emma Whyte. Each week we post a challenge to each other and we get to learn. Plus, the Community learns along with us. I love how we see the same task accomplished in Tableau in many different ways. Some may be more efficient or cleaner than others, yet they all work.

Tableau lets you work through your problems the way your brain works. And what's more fun than learning and improving every day?


Yes, using data visualisation software can indeed be fun. I spring out of bed every day in anticipation of using Tableau. I keep a notebook beside my bed to write down ideas I get in the middle of the night. I use Tableau to answer any data-related question I have. I might see some football stats or some political commentary I want to fact check. It's so simple to get the data, explore my hunches in Tableau and turn it into a data-driven story I can share with everyone.


Perhaps this is a bold statement. I stand behind it as proof of the positive impact Tableau can have on one's life. Without Tableau, I'm fairly sure I'd be in a job that isn't as fulfilling. Instead, I've had the opportunity to spread the Tableau gospel at places like Coca-Cola and Facebook. And now I'm creating the next generation of great data analysts at The Data School. Seriously, The Information Lab actually pays me to teach really smart people Tableau every day. What a gig!

My life isn't the only one that's been touched and impacted by Tableau though. Think about the work that DataBlick is doing with PATH to eliminate malaria in Africa. Or the work The Data School does for Connect2Help in Indianapolis. Or the many other Tableau Foundation projects. People genuinely use Tableau to make an impact on the world.

There are tons of people that have moved onto bigger, better and more fulfilling careers because of Tableau. Tableau Public helps you create a portfolio that helps you stand out from the crowd. In my opinion, the CV/resume is dead. Companies that want to hire great people don't look at these. They look at your body of work. So get to it! Create content. Publish it to Tableau Public. That dream job will find YOU.


Let me end with a simple thank you. Thank you to Chris Stolte, Pat Hanrahan, and Christian Chabot for creating Tableau. Thank you for being pioneers. Thank you for creating a great product. Thank you to my wife for encouraging me to chase my dreams. Thank you to the Tableau Community and everyone that has helped me. Thank you to Dan Murray for being my first Tableau mentor and for kicking me in the rear when I needed it. Thank you to Jeffrey Shaffer for being an incredible project partner and teaching me so much. Thank you to Andy Cotgreave and Eva Murray for Makeover Monday; you have no idea how much I enjoy this project. Thank you to Tom Brown for the best job in the world!

Thank you for an amazing 10 years. Cheers to the next 10!

April 9, 2017

Makeover Monday: What Does the Gold-Crude Oil Ratio Mean?

This is a pretty special week for me. 10 years ago, I downloaded Tableau and my life was forever changed. So I thought for Makeover Monday week 15 that we should look back at one of my very early blog posts. It turns out that this post was kind of like Makeover Monday, but I didn't call it Makeover Monday back then. I created this visualisation about the relationship between gold and oil prices:

An interesting sidebar: I went back to the original blog post, downloaded the workbook, then opened it to see how I had shaped the data. Turns out I build this in Tableau 4.1. How cool is that!?! Dashboards had just been added to Tableau. Ahh, the good old days! People starting to use Tableau now have no idea how good they have it.

Anyway, back to the makeover.

What works well?
  • Minimal use of color
  • Axes are clearly labeled
  • Trend line adds context
  • Scatterplot portrays the relationship well

What could be improved?
  • The title doesn't tell me much at all.
  • What does each dot mean?
  • Is there more to the story?
  • What does being above or below the trend line actually mean?

Keeping all of these questions in mind, I had an idea. Instead of looking at a scatterplot again, does it make sense to look at the gold price compared to the oil price as a ratio? That is, the price of one ounce of gold divided by the price of one barrel of crude oil. I wasn't really sure if this metric was valid. It made sense in my head, so I ran it by Eva who said it made sense to her too.

Ok great, but what does this ratio actually mean? I turned to Google and found a few great articles, one of which I refer to in my final visualisation. First, I looked at this article from The Telegraph, which included a chart of the gold-oil ratio. Phew! I'm not crazy after all.

Next, I read this article that explained in simple terms with examples, what the gold-oil ratio means. This was incredibly helpful in crafting the story of my viz. Referenced inside of the article was a very detailed research paper on the gold-oil ratio that provided a tremendous amount of context. This bit of research didn't take long and it really helped solidify the ideas that were in my head.

With all this in mind, here's my Makeover Monday week 15 about the gold-oil ratio.

April 5, 2017

Workout Wednesday: Do UK exports fit the Pareto Principle?

I love Pareto charts! They're on of my favorite charts to teach and the Pareto principle itself is pretty interesting. The Principle suggests:

The Pareto principle (also known as the 80/20 rule, the law of the vital few, or the principle of factor sparsity)[1] states that, for many events, roughly 80% of the effects come from 20% of the causes.
For Workout Wednesday week 14, Emma decided to look at UK exports and see if they follow the Pareto principle. As an exporter, I imagine it would be really bad if 80% of your exports only went to 20% of countries. I'd think you'd want to spread your exports around the world. I'm not an economist, so I'm just guessing.

What's the answer? No, UK exports do not follow the Pareto principle.

Having done this type of chart countless times, it only took me about 1 minute. The trickiest part for me was getting the first ranked country into the sheet title. I accomplished this through a table calc since I already had country in the view and I knew I needed to compute by country for the calculation.

I used a LOOKUP table calc because it let's me find a specific value in the view no matter which mark I'm on. I then added the IF THEN because the US and Other needed to have special labels. Pretty straightforward.

UPDATE: I just took a peek at how Emma created the title calc and she used an LOD along with a LOOKUP. Overly complex I'd say, but it gets the job done and that's the beauty of Tableau. You can nearly always solve the same problem many ways.

Here's my Workout Wednesday creation:

April 4, 2017

Tableau Tip Tuesday: Using a LOD Expression to Count Customers Meeting a Sales Threshold

I'm on a plane headed for an 8-day holiday with the family, so no video tip this week. I doubt my neighbors on the flight would appreciate me creating a video. I'm working on a series about LOD expressions to put them into an easy to understand sentence much like I did with table calculations (read that post here). For me, the easiest way to make sense of LODs is to go through lots and lots of examples.

This post will walk through a pretty simple, but very applicable use case. Let's say you've set goals at your company that you want to sell £500 worth of products to each customer each quarter. But you also need that goal to be flexible. That is, the user needs to be able to change that amount.

First, we need to create a simple view that has Year and Quarter on the Columns shelf. I'm going to use continuous quarters.

Next, we need to create parameter to allow the user to enter the minimum threshold. To do that, I'll right click on Sales and choose Create -> Parameter. This automatically creates the parameter type that I need. I'm chose the All option in the Allowable values section because I want my user to be able to type in any value. I also set the Display format to currency.

Right click on your parameter and show the parameter control. The parameter doesn't do anything until I use it in a calculation. What we want to do now is create a level of detail expression to count the number of customers that met the threshold in each quarter. First, though, we need to determine the sale for each customer in each quarter. In a plain English sentence this would be:

For each customer, year and quarter, calculate their total sales.
Since customer isn't in the view, that's our clue that we need to use a level of detail expression. The calculation looks like this:

Ok, now I need to determine how many customers met the threshold. To do this, I'm going to edit my calculation and add a simple IF statement.

This calc is looking at the sales for each customer in each quarter and if that customer meets the threshold, we count them. Otherwise, we don't count them. Dropping this into onto the Rows shelf, we now get a simple line chart.

As you change the parameter, every recalculates perfectly. Great! Now we know how many customers met the threshold each quarter. The problem now is that we don't have a lot of context. Is the 210 that met the £500 threshold in January good? Maybe we should have a secondary goal that X% of customers need to meet the target. In other words, 210 in January represents what percent of all customers?

To answer that we need to create another LOD expression to count the total customers.

One more calculation and we're nearly done. This time we want to calculate the % of customers that met the threshold.

Format this calculation to percentage (I like one decimal) and then replace the measure on the Rows shelf with this new calculation.

Great! Much more context now, but we can make it even better. Let's set an additional goal. How about we give our user the option to set the % of customers that need to meet the target as well? Let's start by creating a parameter to allow the user to enter the % of customers meeting the target.
Show the parameter control, add a reference line that uses the Target % value, change the Quarter field on the columns to discrete and change the mark type to bars. Make the bars as wide as they'll go and add a light grey border.

From here, I would create an additional calc that highlights the bars that are not meeting the threshold. Why? Because those are the areas of concern. The calculation looks like this:

Dropping that onto the color shelf and tweaking the colors, I now have a pretty complete view. The last thing I would do is adjust the format of my quarters and put it all together in a dashboard.

Hopefully you found this a good use case and explanation. It's also helped me realize how much easier it is to create videos.