Much Ado About Coughin’

Whether you know it as whooping cough or the 100 days’ cough, pertussis — a bacterial infection that causes severe coughing fits — is no fun. According to Wikipedia, it affects nearly 50 million people annually and causes almost 300,000 deaths worldwide. Although most of these deaths occur in developing nations, pertussis is the only vaccine-preventable disease that is associated with increasing deaths in the U.S.

Pertussis can be particularly dangerous for young children, so health departments keep a pretty close eye on local outbreaks and ask parents to keep their kids home from school while undergoing treatment. Unfortunately, the infection is very contagious and early symptoms are pretty mild. Combine this with some parental fears surrounding the vaccine and you’ve got a pretty good recipe for the occasional quasi-epidemic.

This year’s “winner” in the whooping cough stakes is apparently Wisconsin. As of April 21, 2012, the CDC estimates that the Badger State has had over 1,000 cases of pertussis, which is about as many cases as all of the Pacific Coastal states combined. Among these unlucky cheeseheads were the two fully-vaccinated kids that currently live under my roof. (My wife speculates that they picked it up at an extremely packed showing of The Hunger Games.)

Now that the quarantine period is over and my two little data points are on the mend, I thought it would be interesting to use some of the CDC data to experiment with Google Charts. I was especially interested to note that Google had a treemap feature. In the chart below, the size of the rectangles represents the current number of whooping cough cases, while the colors represent the increase or decrease over the same period in 2011. (Note: in the revised treemap option, the size of the rectangles represents the current number of whooping cough cases per million in population.)

Pretty simple example, no drill downs or tooltips for now.

U.S. Cases of Whooping Cough (April 21, 2012)

Toggle Between Cases and Cases per Million

Oh, and if you’re looking for Minnesota or Oklahoma, neither state has any current cases.

My favorite online example of a treemap is the Map of the Market on The navigation is very robust and you can nest groups of categories on the primary display. Google’s product allows you to drill down several levels but I couldn’t figure out a way to combine them in one view. I also like the way SmartMoney’s chart allows you to display additional information about each element when you hover over it with your mouse. I suspect that this is possible with the Google version but it is not explicitly called out in the documentation.

Does it work? For comparision, here is the same data in a standard Google bar chart:

U.S. Cases of Whooping Cough (April 21, 2012)

The bar chart results in a lot of whitespace and it needs to be much bigger in order for all the bars to fit. I tried a bubble chart as well (below) but there are limitations for this format, too. In particular, clumps of bubbles are difficult to read. I had to transform the data using a logarithmic scale to spread the shapes out a bit.

U.S. Cases of Whooping Cough (April 21, 2012)

2012 Cases vs. Cases per Million (Size=Population)

These seem to be on a total case basis rather than the usual cases per 1,000. One case in CA would be nothing in comparison to 1 case in RI. How would this look differently if redone using cases per 1,000?

Good point. I’ve altered the treemap to show both total cases and cases per million. A few smaller states definitely do float to the top, notably Vermont and Montana. I struggled a bit with the Google Chart API on this one. I would have preferred a radio button with each option labeled but I struggled to make that work.


Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

What Does the Average Biker Dude Look Like?

CNN published the mugshots of all of the biker gang members who were arrested after the recent shootout in a Waco, TX restaurant. There were a total of 171 pictures, all in the same standard pose and most in the same standard orange jumpsuit: Seeing all of these pictures got …

A Force Node Diagram of the U.S. Interstate System

There’s nothing too complicated about this post. I’ve been interested in creating an illustration of the U.S. Interstate system for awhile but my initial concept of a “subway-style” diagram of the network had already been done. After some recent experimentation with the D3 Javascript library, I decided that it might …

At Least I’ve Got Brownies

It’s a snow day today and the kids are home from school. To celebrate, Grandma made a nice batch of brownies. The chart below shows the distribution of brownies by family member. Leeroy is our dog, named for the internet meme.