February 27, 2013
Business Insider published this vertical bar chart of beer prices in the NBA. The data is incredibly simple, yet they made the chart unnecessarily hard to read.
Some of the problems I see with this chart include:
- The vertical bars should be horizontal, which would make them easier to read and compare.
- The bars are sorted backwards. The topic is high beer prices, so the highest prices should be first.
- This chart requires you to turn your head sideways to read it. When you mentally turn your head, suddenly the chart goes from right to left, instead of left to right. Bars are easier to compare when left aligned vs. right aligned because that’s how we read.
- Redesign the chart, factoring in the problems I’ve noted
- Make the chart a bit more fun
- Determine if there’s a relationship between what teams charge and their revenue, franchise value, etc.
February 25, 2013
Nielsen recently published a report on economic recession sentiment, which included this summary chart:
At first glance, you might think “This is simple enough, how could Nielsen screw this one up?” Fortunately for me, they continue to make a mess of even the simplest charts.
This chart makes North America and Europe negative sentiment look so much higher than any other region or the global average. However, that’s only because the scale does not start at zero, nor do they call that fact out. Look at Latin America. Since when is 53% about 1/4 of 75%?
I wanted to see how far off their chart was so I built a simple bar chart in Tableau as a first alternative.
This is a very different perspective. Europe, Middle East/Africa and North America are all pretty close. And the change by quarter does not look nearly as severe.
A simple bar chart is an effective way to present this data, and there are other alternatives that work as well. Let’s consider two slope graphs.
The technique used to build these slope charts is very similar to the one I outlined in my previous blog post. Notice that the lines are colored by whether the sentiment increased (got worse) or decreased (got better). For this coloring, I used a technique recommended by reader Santiago Restrepo in which we calculate the quarterly change as a discrete measure.
First, you need to create a calculated field:
By default, the table calculate is set to compute along the Table (Across). For the slope graphs, we want the calculation to calculate by Quarter. To do so, click on the Default Table Calculation link on the Calculated Field window and choose Quarter.
The first slope graph looks at all Regions together:
The second option splits out each region across the table.
Which of the three options do you prefer? The bar chart or maybe one of the slope graphs?
February 14, 2013
UPDATE: Thanks to a reader for noticing that I had the years in my data set backwards. I have corrected the data and updated this blog post.
Consider this recent chart by Business Insider that attempts to compare data across time and contributions to the whole with multiple pie charts.
It’s not worth words to review how horrible this chart is given the message it’s trying to convey. Instead, consider slope graphs. Download the data for this example here.
I’m assuming that you know how to connect to the data in Tableau.
Step 1 – Drag Measure Names to the Columns shelf
Step 2 – Drag Measure Values to the Rows shelf
Step 3 – Drag the Number of Records measure off of the Measure Values card.
Step 4 – Change the mark type to Line
Step 5 – Drag the Shopping Category dimension to the Level of Detail shelf
You’ve just created a slope graph in Tableau in about 20 seconds. Does this make the data easier to compare? Sort of. You see some lines that go up and some that go down, but the chart need more detail to make it easier to understand.
Step 6 – Format the measures and axis to be percentages. Also remove the “Value” title from the axis while you’re at it.
Step 7 – Drag Shopping Category to the Label shelf and set the labels to show only on the start of the line.
Step 8 – Create a calculated field to identify the categories that increased or decreased.
Step 9 – Drag your calculated field to the Color shelf and adjust the colors to your preferred color scheme.
Step 10 – Add markers to the end of the lines
Does a slope graph communicate the message better than the pie charts? Absolutely!
You can easily see the winners and losers:
- Retailers have increased significantly, nearly double the time spent as the previous year.
- Online shopping and Daily Deals appear to have lost most of their mobile time spent shopping to Retailers.
Are these relationships seen as easily in the pie charts? No chance!
Download the Tableau workbook here.
February 8, 2013
I wanted to find a home to share all of the great content I find on the internet, as well as my blog posts, in one central place, so I’m proud to introduce the VizWiz Facebook page.
Follow my page here: http://www.facebook.com/Vizwiz
This reminded me that Tableau 8, the Kraken, now has the ability to create bubble charts. They’re not quite as sophisticated as what Simon created, they’re more like what you can build with ManyEyes, yet, like most of Tableau’s features, they’re unbelievably simple to build.
Clicks 1 & 2 – Select Agency and Total (which is total spending)
Click 3 – Click the packed bubbles option from Show Me
And here’s what you get:
This is pretty boring, so I placed Total on the color shelf and changed the color palette to red-blue diverging and reversed them.
That’s about six clicks and I have something pretty interesting. But that’s not enough for me. I wanted some interactivity. A few minutes later and this is what I created:
Is it perfect? No. Give it a whirl.
- Play around with the selectors. Notice how the sheet colors change from a measure to a dimension. Download the workbook and see if you can figure out how I did it.
- Click on a department in the table to highlight it’s bubble.
- Notice how the table sorts based on the spending type you pick. This makes finding the top few bubbles much easier.
These new bubble charts are going to be pretty useful, though I can totally see them get wildly misused.
February 5, 2013
Here’s the situation:
- You have several people creating their own dashboards in separate workbooks
- Your boss doesn’t want to open all of the dashboards separately
- You need all of these diverse dashboards in a single dashboard
The solution is way easier than you think. It’s simply a matter of using web page objects.
For this example, I’m going to use these three views:
- Geographically based Economic Data: http://public.tableausoftware.com/views/ATUGJune2011/GeoData?:embed=y
- Afghanistan War Logs: http://public.tableausoftware.com/views/AfghanWar/AfghanistanWarLogs?:embed=y
- Top 100 Grossing Movies of All Time: http://public.tableausoftware.com/views/BoxOfficeHits/Top100Movies?:embed=y
Here’s how it’s done:
Step 1 – You have to connect to some kind of data. I typed up two rows in Excel and copy/pasted them into Tableau. Create an extract. You need to do that to publish.
Data as simple as this will work:
Step 2 – Create a new dashboard
Step 3 – Add a web page object to the dashboard. When the Edit URL dialog appears, copy/paste your URL into the box.
You should now see your dashboard inside the dashboard.
Notice also that if you have tabs enabled on the dashboard, you can see all of those tabs in the web page object.
Step 4 – Repeats steps 2 & 3 for each of the views in the other workbooks.
That’s it! Check out how there are tabs for each dashboard you embedded and then there are tabs inside each of those if you’ve enabled them. Cool!
February 4, 2013
In chapter 1 of Alberto Cairo’s book, The Functional Art, he presents this chart by the Wall Street Journal as an example of non-figurative graphics.
I was struck at first by the use of a red/green color palette (so many people use this to represent positive and negative situations). Then I realized that it need a bit more to really make it useful. I wanted to be able to:
- Understand the magnitudes of the rates
- Compare years
- Fix the color scheme
- Make the chart wider
Here’s what I created using the Tableau 8 (all of this can be done in 7). Does it answer my questions?
February 1, 2013
Just in time for the Super Bowl. Who should you hang out with to watch the game and bond over beer and wings? Facebook data, Tableau style.
The Facebook Data Science team does some pretty awesome analysis of friend relationships! On Monday they published an article on fan relationships between NFL teams. It’s very interesting content. I was working on the last visualization in the post with their team but we didn’t get it done before they had to publish their post.
So with their permission, I’m publishing my version of NFL fan relationships. Here’s their explanation for how to read it:
Even the most die-hard fans among us have some friends who root against us. While it turns out that most friendships between NFL fans on Facebook are between fans of the same team, we wondered, what about the rest of the friendships? Which rival teams' fans are most likely to hang out on Sunday to bond over beer and wings despite their conflicting allegiances?
The following viz shows the fan-friendships for each team in the league, excluding friendships between users who like the same team. Highlight a team by choosing it from the list on the upper-right. Filter by Division.
If you have a large monitor, check out this version.
There are a couple of interesting findings. Dallas and Pittsburgh are nearly always in the top 3, while Jacksonville, Houston and Buffalo aren’t very popular. Perhaps this helps explains why certain teams are on TV more than others, or perhaps they’re more popular because they’re on TV.
Where does your favorite team rank?