Recently in the Flowing Data blog, Nathan Yau wrote U.S. Census Bureau’s 2008 Statistical Abstract – Looking at America’s Data. Interesting, now I can look up anything and take on Cliff Clavin.
Nathan included a chart showing how the price of first class postage stamps had increased over the years. In a comment I noted that a step chart would have been a better choice to show this data, as the nature of stamp prices is not continuous in nature, but is characterized by constant-price segments with jumps from one price level to the next.
Another commenter disagrees, saying that a step chart makes the trend difficult to see. I thought this was a good excuse to make a comparison between line and step charts for this type of data.
I went to the Census Bureau’s Statistical Abstract to get the stamp price data. Strangely enough, searching a number of keywords were unsuccessful, so I visited my favorite source for all knowledge, and found what I wanted in three seconds.
In, Chuck posted the following table of USPS first class rates, and another line chart. And I ask parenthetically, who says Excel 2007 makes better looking charts?
I took Chuck’s data and created my own line chart, and a step chart, of the USPS rate data.
My reasons for preferring the step chart are that it more accurately shows the actual day-to-day prices of a stamp. The trend is pretty obvious, as this data is not very complicated: every several months or years, the price goes up by a few cents. The line chart smudges the data, reducing our ability to (a) discern the intermittent pattern of price changes, (b) compare the duration between price changes, and (c) compare the magnitude of price changes. The line chart does show the increasing trend, but no more effectively than the step chart.
Making a Microsoft Excel Step Chart
Excel has no native step chart, but creating one is only as difficult as properly preparing the data. I wrote about this in my main web site in Step Charts in Microsoft Excel. I showed how to use an XY series with no markers or lines, but with error bars to show the horizontal and vertical segments of the steps. I also showed how to selectively repeat ranges in the source data of a line chart using defined names, but I can tell from feedback on that page that a lot of people had problems conceptualizing that technique. Since I’m a strong proponent of the “Keep It Simple Stupid” philosophy, I’ve come up with an alternative way to prepare data for a step chart line chart.
The sequence of ranges below shows how to do this in about three minutes. Start by copying the original data (yellow), and pasting it below the original data (green), shown in the first block below. The second block shows two cells to be deleted: the first cell of the original dates and the last cell of the original rates. Delete these two cells, shifting cells up to fill the gap; the arrangement is shown in the third block. This arrangement is sufficient for creating a step chart if the X data are dates, because the line chart sorts the data internally before plotting it. However, to make the table more human-friendly, sort it by date, as shown in the fourth block below.
To create a step chart, select the data (processed as in the fourth block above), and create a line chart using the lines without markers option.
It’s possible to modify the data protocol in order to generate a step chart that has only the horizontal segments, without the vertical segments (risers). Derek pointed me toward this in one of the comments, and I incorporated it into a new blog post, Step Chart Without Risers.