From CS 294-10 Visualization Sp10

Jump to: navigation, search



I tried to make the title and subtitle of the chart as informative as possible, stating that I'm focusing on government contributions, not private organizations from particular countries, as well as how many countries are shown on the chart - which includes all countries which at least pledged some amount of money. Perhaps I should have included at least the fact that there were 21 other countries which contributed in-kind goods, if not list those countries. Because the Richter scale is logarithmic, and because there are many phenomena in the natural world which follow power law relationship (linear in log-log plots), I got the idea to see if such a relationship held for the Haiti relief dataset. The log-log plot allowed me to efficiently display the tremendous range of both country populations and their contributions, without losing precision or getting a big mess of a data clump had I tried to capture the range of either quantity on a linear scale. There is a drawback, however, in that log-log plots make it harder to compare differences between pairs of countries, due to the same nonlinear stretching which nicely spreads out all of the data points. For this reason, I decided to put in a muted grid (in soft yellow), both as a reminder to the viewer, and so as to facilitate quick and accurate readout.

For each country, I capture both their committed contributions which are sealed by legal contracts according to OCHA publications, and the sum total of committed and pledged contributions. The concrete, sealed-deal commitments are denoted by sharp, precise points, while the sum total is captured by a larger open circle. This has the nice bulls-eye effect which distinguishes countries which have committed to everything they have pledged. For the rest of the countries, I connected the commitment and total via a subtle black line. It's as though the commitments are little spiders hanging on a thread, pulling themselves up toward their pledged total. Again, although it's not straightforward to compare the committed versus total pledged gaps, I am trying to make a very clear statement about the 11 countries whose line goes down to the abscissa: their 'spiders' don't even make the plot, because their commitments total to zero - putting them at negative infinity in the log-log plot. I don't think I'm being too harsh in singling them out, it effectively communicates which countries are 'all talk' for the time being. Though it took quite a while to spread out all of the country labels so that none of them overlap, I believe it allows the viewer to 'wander' around the data without have to ping-pong off to the side to figure out which short code or annotation line belongs to which country. Serifed font is used throughout to retain readability for such small letters.

I deliberately made the axis spines a darker soft yellow, so that they clearly denote that they are not data - which is all in black - and so they connect with the grid, which is the same color but lower opacity. The axes spines, their labels and tick marks are always there, for reference, but they don't catch your eye and distract you from the data. Once you know the axes and you're busy looking at the data, the axis spines just melt away. I did turn the spines into range frames to hold the data, though I didn't find a good way to put the min/max value on the end without taking up too much real estate. The ordinate spine runs down off the chart to help denote all those 'spiders' hanging out at negative infinity.

There *is* an power-law relationship in the data, the nature of which is somewhat expected: larger countries tend to donate larger sums of money. The particular line which best fits the data, however, is a lot shallower than I would have assumed. I captured this insight in a low intensity red layer, with separate color and dashed line cueing the fact that that it is not itself data, but inferences drawn from and commentary on the data itself. The annotation is off on the right, so they viewer doesn't trip over it right away, since most people in the western world read and view charts from left-to-right. The annotation is pierced by the fitted line itself, is placed so it minimally interferes with the data and serves as the punchline to the whole graph.

Paul Ivanov - Feb 09, 2010 05:08:00 pm

Made in Python using matplotlib, numpy, ipython, and friends. see this Ohloh stack. Code available, but it ain't pretty :)

If you're interested, Fernando Perez has an excellent set of pages about Python for Scientific Computing, including local UC Berkeley meetings and a Starter Kit.

[add comment]
Personal tools