Showing posts with label linechart. Show all posts
August 9, 2010
Should you use a log scale vs. zero-based scale for comparisons?
barchart
,
change
,
linechart
,
logarithmic scale
,
perceptualedge
,
stephenfew
,
zero-based scale
No comments
I finished re-reading Show Me the Numbers by Stephen Few last week and in Chapter 10 there is a discussion about Scale Lines, a subsection of which is devoted to logarithmic scales. Stephen made one particular recommendation that caught my eye (p. 199):
On p. 200, Few goes on to say:
Personally, I try, whenever possible, to avoid using a logarithmic scale. They tend to be very difficult to interpret and, for me, it's much easier to understand a graph that shows % change on a zero-based axis. Let's look at an example of both starting with a bar chart.

On this bar chart, it's challenging, but you could make the assumption that both bars are changing at the same rate. This same chart is much easier to read as a line chart like the following:

On this line chart, it is much easier to see how both line have roughly the same angle of ascent leading you to believe that they have approximately equal rates of change.
However, if you look at the same line chart, but with a zero-based axis, you get a much different message:

You can now much more clearly see that the percentage change year to year for the two measures is very different. (NOTE: I have hidden 2001 from this chart because it is the reference point from which the measures begin.) In fact, the logarithmic scale would lead you to believe that there is a positive percent change, however, it is clear from this zero-based line chart that it's quite to opposite.
In the end, I urge caution when using logarithmic scale and my suggestion would be to use a zero-based scale to represent percentage change whenever you can.
- "Whenever you want to compare differences in values as a ratio or percentage, logarithmic scales will do the job nicely. They are especially useful in time-series relationships if you wish to compare ratios of change across time."
On p. 200, Few goes on to say:
- "When you use lines to encode time-series along a logarithmic scale, angles that are the same tell you that the rate of change is the same."
Personally, I try, whenever possible, to avoid using a logarithmic scale. They tend to be very difficult to interpret and, for me, it's much easier to understand a graph that shows % change on a zero-based axis. Let's look at an example of both starting with a bar chart.
On this bar chart, it's challenging, but you could make the assumption that both bars are changing at the same rate. This same chart is much easier to read as a line chart like the following:

On this line chart, it is much easier to see how both line have roughly the same angle of ascent leading you to believe that they have approximately equal rates of change.
However, if you look at the same line chart, but with a zero-based axis, you get a much different message:

You can now much more clearly see that the percentage change year to year for the two measures is very different. (NOTE: I have hidden 2001 from this chart because it is the reference point from which the measures begin.) In fact, the logarithmic scale would lead you to believe that there is a positive percent change, however, it is clear from this zero-based line chart that it's quite to opposite.
In the end, I urge caution when using logarithmic scale and my suggestion would be to use a zero-based scale to represent percentage change whenever you can.
July 16, 2010
Growth Rate vs. Cumulative Growth Rate
I was watching a presentation/webinar today and the author was reviewing growth rates across time periods. Very straight forward data, quite easy to understand, yet the message was deceiving.
My mind immediately went back to Stephen Few's critique of the way BP was praising its efforts collecting oil from the disaster they themselves caused. In this case, BP was using a cumulative bar chart, which intentionally gave viewers the false impression that containment efforts were improving. Stephen quickly pointed out this fault and presented the data as individual measurements so that you could see the real story.
Back to the session I was attending. A chart was displayed that showed growth rates across time, but as individual points. The growth rate was measured from the previous point, not from the beginning of time. This leads you to believe that a negative growth that is less negative than the last point is actually improving results, yet in fact, the situation is just getting worse.
Think of this as the inverse of the problem Stephen addressed with BP.
I took some data for automotive sales in the United States to demonstrate what I mean. The blue line respresents the growth rate from one point to the next.
A good example to consider is October to December 2008. November experienced negative growth compared to October, but it's less negative than October, so the line goes up, giving you the impression the situation is improving. December is negative compared to November, but the line continues to go up because December is less negative than November.
I feel that a more proper way to tell the story is to use a cumulative line chart. The cumulative view is represented by the orange line. Consider the same time period. From a cumulative perspective, since November is negative compared to October, the line continues to decline. November's negative value has been added to October's negative value. The same situation continues in December.
Now, look at the different stories these lines tell. The blue line indicates you are only experiencing a 1% decline, yet the orange line says you've declined close to 50%.
Believe me, I know both lines are "correct." The point I'm trying to make is that you need to be sure to indicate the point you are measuring against. Very often sales figures are stated as "versus last year," but versus last year could mean many things.
In any event, September 2009 was a terrible month for the industry.
My mind immediately went back to Stephen Few's critique of the way BP was praising its efforts collecting oil from the disaster they themselves caused. In this case, BP was using a cumulative bar chart, which intentionally gave viewers the false impression that containment efforts were improving. Stephen quickly pointed out this fault and presented the data as individual measurements so that you could see the real story.
Back to the session I was attending. A chart was displayed that showed growth rates across time, but as individual points. The growth rate was measured from the previous point, not from the beginning of time. This leads you to believe that a negative growth that is less negative than the last point is actually improving results, yet in fact, the situation is just getting worse.
Think of this as the inverse of the problem Stephen addressed with BP.
I took some data for automotive sales in the United States to demonstrate what I mean. The blue line respresents the growth rate from one point to the next.
A good example to consider is October to December 2008. November experienced negative growth compared to October, but it's less negative than October, so the line goes up, giving you the impression the situation is improving. December is negative compared to November, but the line continues to go up because December is less negative than November.
I feel that a more proper way to tell the story is to use a cumulative line chart. The cumulative view is represented by the orange line. Consider the same time period. From a cumulative perspective, since November is negative compared to October, the line continues to decline. November's negative value has been added to October's negative value. The same situation continues in December.
Now, look at the different stories these lines tell. The blue line indicates you are only experiencing a 1% decline, yet the orange line says you've declined close to 50%.
Believe me, I know both lines are "correct." The point I'm trying to make is that you need to be sure to indicate the point you are measuring against. Very often sales figures are stated as "versus last year," but versus last year could mean many things.
In any event, September 2009 was a terrible month for the industry.
July 12, 2010
World Cup of Doughnuts
barchart
,
doughnut
,
flickr
,
football
,
GeorgePrimentas
,
Guardian
,
linechart
,
soccer
,
TheMissingGraph
,
worldcup
No comments
Since I am an avid follower of the Guardian Datablog, I have also become a follower of the Guardian Datastore on flickr so that I can see how people interpret the data provided.
George Primentas of The Missing Graph blog is a consistent contributor to the Datastore, but recently I think he must have started going to Dunkin' Donuts. I've read four blog posts of his about the World Cup and all four of them have doughnut charts. I've been wracking my brain trying to understand why he keeps using them, but I guess it must be because they're cute...or he has a sweet tooth.
In a way I like this particular infographic. It's visually appealing and the level of detail on the background photo interests me as a photographer, but it's a poor visualization of the data. The distinction I'm making is between an infographic and a visualization.
Much like pie charts, doughnut charts are almost always better represented as bar or column charts. Here is his latest example from the post World Cup 2010: Representation of the Continents.

In the blog post, there's a set of "interesting facts" presented, but really, George is just stating the facts; there's not anything to gleam from them. That's not George's fault, the data simply isn't interesting.
I've come up with two ways to more effectively present the data for quicker interpretation of the performance of the different continents/confederations (though they don't make the data any more interesting).
In this line chart, you can quickly see the trends. The chart is clean and it tells the story the data wants to tell. I can get away with a line chart because this is a time-series across sequential points in time.

I prefer this bar chart over the line chart. For me, I can more clearly differentiate the continents and it's easy to see how far each continent went in the tournament; the more bars, the farther along they went in the tournament.

In the end, keep in mind whether you want to tell a story with the data or present an aesthetically pleasing graphic. They each have their place, but care must be taken when combining the two.
George Primentas of The Missing Graph blog is a consistent contributor to the Datastore, but recently I think he must have started going to Dunkin' Donuts. I've read four blog posts of his about the World Cup and all four of them have doughnut charts. I've been wracking my brain trying to understand why he keeps using them, but I guess it must be because they're cute...or he has a sweet tooth.
In a way I like this particular infographic. It's visually appealing and the level of detail on the background photo interests me as a photographer, but it's a poor visualization of the data. The distinction I'm making is between an infographic and a visualization.
Much like pie charts, doughnut charts are almost always better represented as bar or column charts. Here is his latest example from the post World Cup 2010: Representation of the Continents.
In the blog post, there's a set of "interesting facts" presented, but really, George is just stating the facts; there's not anything to gleam from them. That's not George's fault, the data simply isn't interesting.
I've come up with two ways to more effectively present the data for quicker interpretation of the performance of the different continents/confederations (though they don't make the data any more interesting).
In this line chart, you can quickly see the trends. The chart is clean and it tells the story the data wants to tell. I can get away with a line chart because this is a time-series across sequential points in time.
I prefer this bar chart over the line chart. For me, I can more clearly differentiate the continents and it's easy to see how far each continent went in the tournament; the more bars, the farther along they went in the tournament.
In the end, keep in mind whether you want to tell a story with the data or present an aesthetically pleasing graphic. They each have their place, but care must be taken when combining the two.
July 6, 2010
Easy to see fireworks
ChartPorn has once again provided a visualization that is worth improving. The mess created this time is caused by the website Bad Firecracker.
Here are the charts to be critiqued:



I have a couple of big issues with these bar charts:
Here are the charts to be critiqued:
I have a couple of big issues with these bar charts:
- The grid lines are dark, distracting, horizontal, vertical, and overall incredibly distracting. I think the purpose of the charts is to show a trend, but with all of these grid lines, how are you supposed to see the trend?
- The data labels are unnecessary. Again, if you're trying to show an overall trend, the focus needs to be on the trend, not each individual point.
- Each chart has a color legend out to the right and it refers to the vertical axis. Why not properly label the axis in the first place? The color isn't needed unless you're showing all of the charts together in one dashboard.
Here's how I would do it:
- Show all of the data together so that comparisons can be made.
- Since all of the data is on one chart, use colors to differentiate the measures.
- For the purpose of comparing their charts to mine, I created bar charts. What you will notice though is that there are no distracting grid lines and no data labels.
- The axis titles clearly indicate what data is displayed
- Only show the year once, at the bottom of the chart.
- A data table is at the bottom so that if someone is interested in knowing the exact number, they can quickly look it up. This allows the data labels to be removed from the chart.
Surely you see that I have line charts to the right of the bar charts. I prefer the line charts to the bar charts because they're easier to read and the data-to-ink ratio is low.
Follow these simple principles as you create your charts. Your readers will thank you. Keep it simple.
July 2, 2010
Implicit Comparison
The July 1st ChartPorn daily blog post linked to an interesting interactive graphic for economic indicators from the Wall Street Journal, which the author calls "Danger Signs."
The first graph that appears is called Summer Chills. There are two graphs, one for consumer confidence and one for yield on the 10-yr treasury. When I first looked at this, my impression was that the two charts were related. If you carefully read the caption, you can see that they aren't.

I see some issues between the graphs:
The first graph that appears is called Summer Chills. There are two graphs, one for consumer confidence and one for yield on the 10-yr treasury. When I first looked at this, my impression was that the two charts were related. If you carefully read the caption, you can see that they aren't.
I see some issues between the graphs:
- The time frames are different. The CCI graph goes from 2007 through June 2010 and it's by month. However, the 10-yr treasury yield is for the current year and it's by day.
- The scale on the 10-yr treasury yield graph is not zero-based, which leads to variances between points that are greater than the relative variance.
- The reference bands are a bit distracting.
- The level of precision on the mark on the 10-yr treasury yield graph is not necessary. Go with two decimals since that's how it's typically reported.
Some things I like:
- Highlighting the current period and adding a data label
- Chart headers are clear
- Fonts used
- Line colors stand out, grabbing your attention
- The time frames are now consistent; they start at January 2007 and go through June 2010. They also are by month only.
- The scale on the 10-yr treasury yield graph is now zero-based.
- The reference bands have been muted and I've started them at the 2nd range, not at the bottom.
- The line for each measure is a different coloring, triggering you to notice they are distinct.
- Finally, I added a dual-axis line chart that shows the relationship between the measures.
While the point the author is trying to represent is valid, properly created graphs are essential to tell the true story.
February 2, 2010
Problems with Line Charts Over Time
In order to accurately display a data series over time when comparing two dimensions, it's absolutely critical to have data for both dimensions for the same periods of time. Here is an example of a poor use of a time series:

In this example, the author has one line for Republicans and one line for Democrats. Each line has a point for each year. We all know that only one party can hold the presidency. The author should NOT plot a point for the years in which a party is not in power.
The author presents the data properly (though with a slightly different take on the data itself) with this bar chart, though the vertical axis does not include the entire range of values:
In this example, the author has one line for Republicans and one line for Democrats. Each line has a point for each year. We all know that only one party can hold the presidency. The author should NOT plot a point for the years in which a party is not in power.
The author presents the data properly (though with a slightly different take on the data itself) with this bar chart, though the vertical axis does not include the entire range of values:
November 5, 2009
Avitec Airline Dashboard
Dashboard Insight named the Avitec Airline Dashboard as its Dashboard of the Month for November. I can only assume that this dashboard is being recognized as a shining example, but I hope it was chosen simply by blind draw.

There are so many issues with the visual design of this dashboard. Just a couple of my observations (I could go on and on):
There are so many issues with the visual design of this dashboard. Just a couple of my observations (I could go on and on):
- The color choices, while pretty, are completely inappropriate and unnecessary. The two charts on the right are particularly horrific.
- The width to height ratio on the SAFA Ratio, Inspection Severities and Items charts are a poor choice. It looks like they are designed to ensure the screen is filled up, but they distort the story in the data.
- Why is the gigantic Avitec logo right in the middle of the Dashboard? I know it's self-serving, but it sure distracts you from interpreting the charts.
What else do you see?
October 7, 2009
Cell Phone Usage
I received my cell phone bill from AT&T today and noticed that there are usage reports on the site. I typically don't look at these because I really don't care about my usage, but for some reason I decided to look at them.
Here is how AT&T presents the data:

Icky, icky! Where are the dates? I can't tell the difference between some of the bars. Why are long distance and roaming included? You'd never be able to see them anyway. Why not use a simple line graph?

Come on AT&T, get your act together. Although I suspect these were created by a developer that only knows how to use the default graphs in Excel and thought "Oh, I can make these so pretty with the 3D bar charts."
Why the big spike in September? Conference calls...boooooo!
Here is how AT&T presents the data:
Icky, icky! Where are the dates? I can't tell the difference between some of the bars. Why are long distance and roaming included? You'd never be able to see them anyway. Why not use a simple line graph?

Come on AT&T, get your act together. Although I suspect these were created by a developer that only knows how to use the default graphs in Excel and thought "Oh, I can make these so pretty with the 3D bar charts."
Why the big spike in September? Conference calls...boooooo!
Subscribe to:
Posts
(
Atom
)