PTS Blog

Main menu:

PTS Utilities

Commercial Utilities developed by Peltier Technical Services

Waterfall Chart
Box and Whiskers


 

Excel Books

Books that I own and use while developing in Excel

Subscribe

Subscribe

Site search


Recent Posts

Recently Commented

Popular Posts

Archive


 

Categories


 

Buy me a coffee

If this topic or the blog itself has been helpful, why not support further development by treating me to coffee?


Privacy Policy

Creative Commons License
Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

Happy New Year in Numbers, Charts, and Links

by Jon Peltier
Peltier Technical Services, Inc., Copyright © 2009.
Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.


Happy New Year

2008 was an eventful year, with some good stuff and some bad. The good events include starting the PTS Blog in February. The bad event I’ll share here is the blowout with my former web host, which led to some days without service (due to my violating their TOS in ways they couldn’t explain) and ultimately to switching hosts. I’ll probably switch again this year, but it will be planned and not rushed.

Thanks to all of you who follow this blog, and special thanks for all of the comments. That’s what makes a blog better than any old web site: it’s the comments and discussion that add perspective and keep me on track.

Among the interesting statistics about the blog: I wrote 232 Posts, which received 1650 Comments and 6567 Spam Comments (since the host switch in April). If not for Akismet, I’d have been inundated with spam. This blog has a lot to do with charting, so here are a few charts:

Read more »

Antibiotic Effectiveness - A Study of Chart Types

by Jon Peltier
Peltier Technical Services, Inc., Copyright © 2009.
Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.


Chance Magazine is holding a data visualization contest. The objective is to produce a clear, insightful, succinct, original, and aesthetically appealing display of a set of comparative data on antibiotic effectiveness. The data is shown below: click on the picture of the data to download a CSV file if you want to play along at home.

Burtin's Antibiotic Data

The numerical data is Minimum Inhibitory Concentration (MIC), the smallest amount of an antibiotic required to prevent in vitro bacteria growth. Presumably it’s in units of mcg/ml, but I could not verify that. Gram staining indicates whether the bacteria picks up a dark blue or violet color (positive) or a faint pink (negative) when exposed to Gram stain. This is a quick-and-dirty way to separate bacteria into two classes.

The first step in any analysis is to plot the data. Here I’ve created a bar chart with MIC on a logarithmic scale.

Bar Chart of Burtin's Antibiotic Data

The larger the concentration, the less effective an antibiotic is at inhibiting bacteria growth, so the longer bars above indicate lower effectiveness, which is counterintuitive. My next step then was to reverse the direction of the log scale.

Bar Chart of Burtin's Antibiotic Data

That’s better, but it’s still not very easy to read. With so many categories (bacteria species), the bars are too narrow to be clearly resolved.

I decided to try a panel chart to separate the colors, with one panel for each antibiotic. Here is the first cut.

Panel Chart of Burtin's Antibiotic Data

We see the alphabetical sorting issue in this chart. There are a number of ways we could sort the data, and probably the most arbitrary is by alphabetical order of the category labels. What if I sort by effectiveness of Penicillin?

Panel Chart of Burtin's Antibiotic Data

That’s more meaningful. Here is the data sorted by effectiveness of Streptomycin:

Panel Chart of Burtin's Antibiotic Data

Now sorted by Neomycin effectiveness:

Panel Chart of Burtin's Antibiotic Data

I thought the panel charts could be simplified by using the Overlapped Bar Chart - Longer Bars in Back approach of Robert Kosara of EagerEyes. This shows the data ranked by penicillin effectiveness.

Pseudo-Stacked Bar Chart of Burtin's Antibiotic Data

There are problems with this kind of chart. First, I had to choose an uglier green, because the original green was too hard to distinguish from the blue. Second, It’s difficult to get over the ingrained misunderstanding that the bars are not stacked, but shown shorter in front of longer. Also, there are several places, circled below, where two bars coincide (or nearly coincide), making it impossible to identify all three values for each microbe.

Pseudo-Stacked Bar Chart of Burtin's Antibiotic Data

These attempts so far show the effectiveness of the antibiotics well enough, but they omit the Gram staining behavior.  I decided to shade the rows next to Gram positive bacteria, and use a dot plot instead of a bar chart to show the data.

Dot Plot of Burtin's Antibiotic Data

There’s that alpha sort issue again. With this arbitrary sort, it’s very hard to see any correlations in the data. But when we sort by Penicillin effectiveness, we see much more information. When sorted in this way, the Gram-positive bacteria are seen as those against which Penicillin is most effective.

Dot Plot of Burtin's Antibiotic Data

Sorting by effectiveness of Streptomycin and Neomycin (omitted to keep this post reasonably long) is good for comparisons among the antibiotics, but loses the impact of the correlation between Penicillin effectiveness and Gram staining.

This type of chart readily translates to a gray-scale version.

Dot Plot of Burtin's Antibiotic Data

This is the chart I submitted to the contest. What could I have done better?

Growth Rates in a Panel Chart

by Jon Peltier
Peltier Technical Services, Inc., Copyright © 2009.
Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.


In the microsoft.public.excel.misc news group, Flojoe presented a set of data and asked how to present it to show the outstanding growth in revenue over the past few years. I put together a panel chart with stacked columns to compare growth over the prior year’s revenues.

Flojoe’s original data is shown in bold text in the table below, and I’ve added some calculations in regular text. The row called “Base” refers to the prior year’s value. Cell B3 is zero, cell C3 links to B5 (=B5), and cell D3 links to C5 (=C5). The row called “Growth” refers to how much more the current year is over the prior year, so cell B4 contains the formula =B5-B3, and this is filled to column D.

The row called “Labels” will be used to label the “Growth” series once it’s plotted. Cell C7 contains the formula =TEXT(C6,”0%”)&CHAR(10)&”Growth”, which is copied into cell D7. The formula tells Excel to use the value in cell C6 formatted as a percentage with no decimals, plus a line feed, plus the word Growth.

Data for growth rate panel chart

To start, create a line chart using the green highlighted range, with series in rows. (The yellow range will be used later to label the chart.) Simple enough, but it doesn’t really show anything, yet.

Read more »

Low Box Plot Utility Discount Price Expires Soon

by Jon Peltier
Peltier Technical Services, Inc., Copyright © 2009.
Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.


At the beginning of December I announced the new Peltier Tech Box and Whisker Chart Utility. It has been available for an introductory price of $30, but the price will revert to its regular price of $40 as of 1 January 2009.

The Box and Whisker Utility takes your raw data and outputs a table of statistics and a chart onto a new worksheet. The utility produces box plots in three styles: Box and Whisker Quartile Chart, Four Box Quartile Chart, and Box and Whisker Chart with Outliers.

Simple Box and Whisker ChartFour Box Quartile ChartBox and Whisker Chart with Outliers

Each of these box plot styles is available in vertical (column) and horizontal (bar) orientations.

Vertical Box and Whisker Chart with OutliersHorizontal Box and Whisker Chart with Outliers

Read more »

Decline (XKCD)

by Jon Peltier
Peltier Technical Services, Inc., Copyright © 2009.
Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.


I’m taking a break from the holiday break to share a link. From XKCD - A webcomic of romance, sarcasm, math, and language comes an amusing comic entitled Decline:

Decline

Visit XKCD and kill an hour or so.

Spiraling Down the Drain

by Jon Peltier
Peltier Technical Services, Inc., Copyright © 2009.
Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.


Andrew Gelman didn’t care for the ugly spiderweb chart in the Economist article The battle of Smoot-Hawley about the Smoot-Hawley Act. This was a flawed protectionist measure enacted in 1930, which led to decreased international trade and furthered the Great Depression. Andrew states that even a simple time series would be an improvement. As step one in my elaboration on his comment, I’ve recreated the Economist chart of world trade below.

Down the plughole - spiral version

The exercise above shows the best and worst of Excel: it is flexible enough to produce almost any visualization you want (albeit sometimes with substantial effort), but it does not provide guidance on which visualizations are effective, and the default options often lead to poor choices. The poor choice in this case was not due to Excel’s defaults, because this chart is not even possible with a built-in radar chart. Fortunately it requires substantial effort as mentioned above, so we aren’t likely to see many of these charts.

Read more »

Hide Your Data in an Interactive Onion Chart

by Jon Peltier
Peltier Technical Services, Inc., Copyright © 2009.
Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.


A reader named Martin suggested that I take a look at The Slate Bailout Guide, which sported a concentric set of rings purporting to be a chart. It was interactive and all, very slick. The graphic contained data regarding the economic bailout efforts by the US government over the past year. But it tried to do too much, and ended up being confusing.

Onion-like chart from Slate

Read more »

Bissantz Ponders

by Jon Peltier
Peltier Technical Services, Inc., Copyright © 2009.
Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.


Dr. Nicolas Bissantz is founder and General Manager of Bissantz & Company GmbH and master of Bella, the info viz expert. Bissantz makes the sparkline tools SparkMaker and SparkTicker and a Business Intelligence package called DeltaMaster. But Nicolas Bissantz is also the author of »Me, myself and BI«, an evocative and amusing blog which is my topic for today.

Bissantz ponders...

On his blog, Bissantz ponders such topics as Death to business charts!, Can we drive companies like we do cars?, Good reporting is boring, and Are sports fans smarter than managers?

Read more »

How to Edit Series Formulas

by Jon Peltier
Peltier Technical Services, Inc., Copyright © 2009.
Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.


Ever have a situation where you have spent time getting your chart or charts to look nice, then try to use different data ranges in these charts? You’ve discovered that there’s no easy way to approach this change. At least there’s no easy way built into Excel, but there is a utility that can make the task easier.

Scenario 1

You’ve made a gorgeous chart of the data in Sheet1. You copied the chart from Sheet1 to Sheet2 so you could plot Sheet2’s data in the same splendor. And you hit a snag: the chart on Sheet2 refers back to Sheet1’s data. There are two ways to correct this:

  • Create a copy of Sheet1 including the chart, so the chart on the copied sheet refers to the data on the copied sheet. Then copy Sheet2’s data and paste it over the copied sheet’s data.
  • Edit the series formulas of the copied chart in Sheet2, changing all instances of one sheet name to the other. This becomes tedious if there are multiple series in the copied chart, or if you’ve copied multiple charts.

Read more »

Simple Waterfall Chart with Up-Down Bars

by Jon Peltier
Peltier Technical Services, Inc., Copyright © 2009.
Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.


My colleague Mike Alexander has reviewed my tutorials for building waterfall charts*, and thinks a line chart with up-down bars is easier than a stacked column chart. In several ways, Mike is right. Up-down bars can span from negative to positive values, while a column chart bar can only span numbers on the same side of the axis. This means you need fewer series to get the same visual effect. On the other hand, your formatting options are limited to two fill patterns in up-down bars (up and down), while each column in a column series can be individually formatted. In addition, if you make a horizontally oriented waterfall chart (or other stacked bar chart type), you are stuck with stacking of bars, because up-down bars only work in the vertical alignment.

*I’ve written about Waterfall Charts, “Fancy” Waterfall Charts, and Waterfall Charts that Cross the X Axis on my web site, all using the stacked column chart approach, and I’ve built demo and pro versions of a Waterfall Chart Utility.

If we can apply the K.I.S.S. principle to only half of the cases, it’s still a net gain. So I’ll use the example Mike sent to me, adjusted so much that he is unlikely to recognize it. The data is in A2:B9 in the table below, with an initial value and monthly changes. The chart data is in D2:H10, with the necessary calculations described below the table.

Data for Waterfall Chart with Up Down Bars

Read more »

Create Excel dashboards quickly with Plug-N-Play reports.