Showing posts with label Pie Charts. Show all posts
Showing posts with label Pie Charts. Show all posts

11 December 2009

Where in the world (are pie charts popular)?



In my prior post I used data from Google Trends to look at how to summarize complex data. The data I pulled compared how often "pie chart" is searched for compared to "bar chart". In this data set you can also compare the relative search popularity by country. The data is normalized to the number of overall searches coming from that country.

While I was just using these terms to get a data set, this information is actually also interesting - Relative to all searches in a country, India's users are twice as likely to be searching for either pie chart or bar chart. Does this mean that India has more studious users while US users are occupied by searching for the latest Tiger Woods news? I don't know how language is accounted for - if the normalization just for searches in a single language this would explain the difference, as English language searches would more likely to be conducted by business users. This brings up an important point about knowing exactly how data is 'manipulated' prior to drawing any sweeping conclusions.

I've added a second series (green dot) that compares the relative popularity of bar vs. pie (pie chart popularity/bar chart popularity) within a country. Interestingly, "bar chart, is almost searched for as often as "pie chart" in India, the Philippines, etc. compared to the US, where "bar chart" is half the search volume of "pie chart". Go draw your own conclusions about that.

7 December 2009

Visualizing data that obscures trends (pie charts are "better")

I've been playing around with Google trends for a while now. It's an incredibly powerful tool for market research, especially when you're looking at new markets, or how the popularity of a brand is changing.  You can look at how a particular search term has trended over five years, where the term is more popular (countries, cities), compare several search terms, and how news stories that bear relevance to the search terms may have impacted the search volume.

The search terms I chose to compare for this example were "pie chart" and "bar chart", partially in response to the friendly back and forwards that Chandoo and Jon Peltier have had recently concerning appropriate use of pie charts. My data adds nothing to their conversation apart from what the public considers 'search worthy', so apologies for the misleading blog title, but the data are perfect for demonstrating how you can better visualize data that have seasonal and other variations that hide overall trends.

Here are the data - relative search popularity of the two terms on a week to week basis since 2004. Some things come out immediately - people search for pie charts more than they search for bar charts. There seems to be seasonal variation within each year, and there seems to be a trend over the years. To investigate these trends further I summarized data by month/year/etc. by grouping the dates in pivot charts.


Here's the seasonal variation - taken by looking at the average search popularity by month of the year, across all five years. Both terms are searched for less in the summer (for the northern hemisphere, but the data are overwhelmingly dominated by users in this hemisphere), and at the end of the year. This would coincide with both school holidays and lower business search volume (as people take vacations). The lines suggest that "bar chart" is less affected during the summer than "pie chart". To confirm this, I've added another series that compares how the two terms vary compared to each other. If the bar for a month is lower than 1, "bar chart" has dropped less relative to its average popularity over the year when compared to "pie chart", so yes, even when you account for the fact that absolute height variation of "pie chart" is greater, "bar chart" does not experience as great a drop-off mid-year.

As a nod towards the bar-chart vs. pie chart argument, perhaps one could argue tongue-in-cheek that "pie chart" is searched for by school children more than business users as the drop-off is larger in the school summer vacation, so therefore bar charts must be more important to business.. No, probably not.

Before we move on though, a quick comment on what we've lost from the 'raw' data. From our summary chart you could conclude that the search volume is about the same in December as it is in the summer months. However, look at the top chart - search volume only drops in December in the last two weeks of the month, whereas search volume is lower for every week of July. For that reason, you must carefully consider the level of summary you chose, whether an average or sum is better for comparisons, and whether you should also show the raw data.


Next we have year to year variation. There is a dip in 2006 and 2007 (for which I have no explanation..) The pattern is the same for bar and pie searches. It is likely to be a reflection of real search volume, not a collection artifact, because two unrelated search terms do not show this dip. I wondered if "bar chart" was catching up to "pie chart", so the line compares the absolute difference. Interestingly, without the average line plotted across, it really looks like this line is dropping - "bar chart" is catching "pie chart" up, but it's misleading - because both the other lines are headed upwards, even a straight-ish line looks like it's dropping. The addition of the straight average line reveals that there is little, if any catching up being done.

Similarly to the prior chart, you have to be mindful of what you've lost in this summary. If you use an absolute count of searches, rather than an average then the results will be different to some degree (and not only because we are missing December 2009 data).

I did also plot these data by day of the month - searches are more slightly popular towards the beginning of a month, but I would attribute that to the two main US holidays, Thanksgiving and Christmas, both occurring the later parts of the month.

How else could you summarize these data?

30 November 2009

Charting data with one disproportionally large value

Datavis tweeted about a fun chart he found comparing 'kills' between the top animals - I'm not sure the data are meant to be real or what 'kills' means, but the point is made that humans are by far the worst offenders. Part of the emphasis is that the human number is literally 'off the chart'.

It got me thinking about how to show data like these - where you  have one very large number and other much smaller numbers. There are two things that people may want to know- how much bigger the single point is than the others, and then how the others compare. I've thrown together a few ways you could do it:


Top left: default scaling - it certainly gets the point across that one value far eclipses the others, but you can't really compare the others, or put numbers to them.

Top right: log scale - often espoused as a solution, but frankly I can't stand it. Most people don't get log scales, and I find myself looking to the axis to compare values - I may as well just have the values in a table. It's also difficult to compare small differences between bars.

Middle left: breaking the axis - you can't really visually see how much bigger the human contribution is, but the point is made that it's much bigger, and you can still compare the smaller values. There is no way in Excel to do this automatically - you can limit the axis max of course, but there's no indication that the bar continues upwards.

Middle right: two charts - Arghhh, my eyes, a pie chart and some bevel effects. Actually I quite like this - pie charts are fine for comparing two values if you're not trying to read the exact comparison from them, though the numbers are needed. As for the bevel effect - I blame that on the excesses of Thanksgiving..

Bottom left: aspect ratio - simply enough, make the chart so long that you can compare the smaller values. Even on web only presentation this is a difficult one because of the real estate used up - that is, unless you use this space for other content.

Bottom right: just imply a continuation - similar to the broken axis, and similar to the original chart that Datavis tweeted, but with the actual value shown. Needless to say, this is not a default view in Excel..

Any comments on these, which is your favorite? How would you address this challenge for a dashboard vs. print publication?

18 November 2009

Nonsense Charts


Daily Dose of Excel shows us an excellent example they found of awful chart design. The chart concerns male and females accepted to various colleges, the class size, number admitted, and number of applications.

It's unclear what the 'take home' is supposed to be - that some colleges have lots more applicants, that the acceptance rate varies, that the male/female ratio varies?

It fails immediately because you're being asked to compare areas - when comparing data we tend to look at just one dimension - e.g. length of a bar. In this case we tend to consider the diameter more than the area, leading to underestimating the difference between colleges. Secondly, the male/female comparison fails because the scale is so small that drawing anything meaningful, even within a single college is difficult.

I would also argue that the dimension used is wrong - a more interesting dimension would be % females accepted vs. % females who applied. I'm also unsure what the class size and admitted dimensions show - admitted is presumably just males plus females. Daily Dose of Excel asks "could (should) this chart be done in Excel?"



Not one to turn down a challenge I roughly estimated the data in the chart and added some college names (obviously not the real ones). It wasn't an easy thing to chart and this isn't perfect. The raw size of the applicant pool is important to show, as is the % who actually got admitted. The ratio of males/females is interesting (though I still think it's the wrong dimension). I declined to show the class size information.

A major difficulty is the very large applicant pool of (what I call) Princeton. Maybe this would be one of those few occasions where an axis with a break in it may work. Equally, for most colleges, the admitted proportion is so much smaller than the applicant pool, that it makes comparing college to college difficult - I resorted to adding the data as text as well. Lastly, there's no way you could break the admitted bar down further to show female/male, so I pulled that data out below the main chart.

For almost any application, pie charts are not the best way to show data (that whole 2D thing again), but when you only have 2 slices, it can work - I think it works okay in this situation - you can certainly quickly scan across and see where the proportion of males/females is very different and where it's more 50/50... Anyway, suggestions on a postcard for how it could be done better.

7 November 2009

Designing for Color Blind Users


We Are Color Blind recently discussed this pie chart that Gizmodo used in an article. While also noting the awfulness of the 3D pie chart, We Are Color Blind make some great points about designing for the 7% of males (and much fewer females) that are color blind. They have a great tool where you can upload images or a URL and it will show you what the result would be for a color blind person.

It's not easy though - when you have three or more series to show, you reach for blue/red/green combinations first (and in Excel 2007 these are the default colors for charts now). I'm still working to a 'perfect' (there isn't one) color table that avoids the problem colors, but still is as readable as possible for everyone.

ShareThis