<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>FORTH GO &#187; Graphs</title>
	<atom:link href="http://www.forthgo.com/blog/category/graphs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.forthgo.com/blog</link>
	<description>Code and Recreations of Xan Gregg</description>
	<lastBuildDate>Sat, 20 Aug 2011 17:32:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Worse Bar Chart Labels</title>
		<link>http://www.forthgo.com/blog/2011/04/24/worse-bar-chart-labels/</link>
		<comments>http://www.forthgo.com/blog/2011/04/24/worse-bar-chart-labels/#comments</comments>
		<pubDate>Sun, 24 Apr 2011 17:08:27 +0000</pubDate>
		<dc:creator>xan</dc:creator>
				<category><![CDATA[Graphs]]></category>

		<guid isPermaLink="false">http://www.forthgo.com/blog/?p=460</guid>
		<description><![CDATA[I recently ran into this bar chart as part of a credit card summary. It took me a few moments to realize each run of superscripted digits was part of a single number, as opposed to indicating exponentiation or footnotes. &#8230; <a href="http://www.forthgo.com/blog/2011/04/24/worse-bar-chart-labels/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently ran into this bar chart as part of a credit card summary. It took me a few moments to realize each run of superscripted digits was part of a single number, as opposed to indicating exponentiation or footnotes. I&#8217;ve never seen such bad labels before. I hope the chart was custom-made and not a feature of some charting software.</p>
<p><img class="aligncenter size-full wp-image-461" title="badbarchartlabels" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/badbarchartlabels.png" alt="" width="478" height="304" /></p>
<p>At least the bad labeling overshadows the other minor faults of the graph. Sort of like when having a bad toothache prevents you from noticing your sore knee.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.forthgo.com/blog/2011/04/24/worse-bar-chart-labels/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Lots of Dots Quilt</title>
		<link>http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/</link>
		<comments>http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/#comments</comments>
		<pubDate>Sun, 17 Apr 2011 17:07:29 +0000</pubDate>
		<dc:creator>xan</dc:creator>
				<category><![CDATA[Art]]></category>
		<category><![CDATA[Graphs]]></category>

		<guid isPermaLink="false">http://www.forthgo.com/blog/?p=433</guid>
		<description><![CDATA[At a family gathering last month, Bonnie and I received an unexpected gift from my cousin the Polka Dot Debutante. She made this amazing quilt for us titled &#8220;Lots of Dots&#8221;: &#160; Being in the data visualization business, I can&#8217;t &#8230; <a href="http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>At a family gathering last month, Bonnie and I received an unexpected gift from my cousin the <a title="Lee's Blog" href="http://www.polkadotdebutante.com/">Polka Dot Debutante</a>. She made this amazing quilt for us titled &#8220;Lots of Dots&#8221;:</p>
<p>&nbsp;</p>
<p><img class="aligncenter size-full wp-image-434" title="lotsofdotsall" src="http://www.forthgo.com/photos/lotsofdots/lod600.jpg" alt="" width="600" height="473" /></p>
<p>Being in the data visualization business, I can&#8217;t help but see lots of familiar and new plots:</p>

<a href='http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/img_0081/' title='Scatter'><img width="200" height="200" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/IMG_0081.jpg" class="attachment-thumbnail" alt="Scatter" title="Scatter" /></a>
<a href='http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/img_0082/' title='Contour'><img width="200" height="200" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/IMG_0082.jpg" class="attachment-thumbnail" alt="Contour" title="Contour" /></a>
<a href='http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/img_0083/' title='Heat'><img width="200" height="200" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/IMG_0083.jpg" class="attachment-thumbnail" alt="Heat" title="Heat" /></a>
<a href='http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/img_0084/' title='Bubble'><img width="200" height="200" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/IMG_0084.jpg" class="attachment-thumbnail" alt="Bubble" title="Bubble" /></a>
<a href='http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/img_0085/' title='Eyeball'><img width="200" height="200" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/IMG_0085.jpg" class="attachment-thumbnail" alt="Eyeball?" title="Eyeball" /></a>
<a href='http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/img_0086/' title='Ripple'><img width="200" height="200" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/IMG_0086.jpg" class="attachment-thumbnail" alt="Ripple" title="Ripple" /></a>
<a href='http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/img_0087/' title='Bubble'><img width="200" height="200" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/IMG_0087.jpg" class="attachment-thumbnail" alt="Bubble" title="Bubble" /></a>
<a href='http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/img_0088/' title='Trellis'><img width="200" height="200" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/IMG_0088.jpg" class="attachment-thumbnail" alt="Trellis" title="Trellis" /></a>
<a href='http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/img_0089/' title='Contour'><img width="200" height="200" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/IMG_0089.jpg" class="attachment-thumbnail" alt="Contour" title="Contour" /></a>
<a href='http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/img_0092/' title='Bubble'><img width="200" height="200" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/IMG_0092.jpg" class="attachment-thumbnail" alt="Bubble" title="Bubble" /></a>
<a href='http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/img_0093/' title='Bubble'><img width="200" height="200" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/IMG_0093.jpg" class="attachment-thumbnail" alt="Bubble" title="Bubble" /></a>
<a href='http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/img_0094/' title='Cell'><img width="200" height="200" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/IMG_0094.jpg" class="attachment-thumbnail" alt="Cell" title="Cell" /></a>
<a href='http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/img_0095/' title='Diamond Cell'><img width="200" height="200" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/IMG_0095.jpg" class="attachment-thumbnail" alt="Diamond Cell" title="Diamond Cell" /></a>
<a href='http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/img_0096/' title='Blob'><img width="200" height="200" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/IMG_0096.jpg" class="attachment-thumbnail" alt="Blob?" title="Blob" /></a>
<a href='http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/img_0098/' title='Heat'><img width="200" height="200" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/IMG_0098.jpg" class="attachment-thumbnail" alt="Heat" title="Heat" /></a>
<a href='http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/img_0099/' title='Brick'><img width="200" height="200" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/IMG_0099.jpg" class="attachment-thumbnail" alt="Brick?" title="Brick" /></a>
<a href='http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/img_0103/' title='Scatter'><img width="200" height="200" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/IMG_0103.jpg" class="attachment-thumbnail" alt="Scatter" title="Scatter" /></a>
<a href='http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/img_0104/' title='Diamond Cell'><img width="200" height="200" src="http://www.forthgo.com/blog/wp-content/uploads/2011/04/IMG_0104.jpg" class="attachment-thumbnail" alt="Diamond Cell?" title="Diamond Cell" /></a>

]]></content:encoded>
			<wfw:commentRss>http://www.forthgo.com/blog/2011/04/17/lots-of-dots-quilt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chapel Hill Election Clustering Revised</title>
		<link>http://www.forthgo.com/blog/2009/11/17/chapel-hill-election-clustering-revised/</link>
		<comments>http://www.forthgo.com/blog/2009/11/17/chapel-hill-election-clustering-revised/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 01:28:32 +0000</pubDate>
		<dc:creator>xan</dc:creator>
				<category><![CDATA[Graphs]]></category>
		<category><![CDATA[Local]]></category>

		<guid isPermaLink="false">http://www.forthgo.com/blog/?p=360</guid>
		<description><![CDATA[I&#8217;ve updated the cluster analysis based on comments received. Thanks to Ed Harrison, I have included data from the Durham County precincts. And since other commenters explained away the apparent under-voting in some precincts, I recalculated the percentages to be &#8230; <a href="http://www.forthgo.com/blog/2009/11/17/chapel-hill-election-clustering-revised/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated the cluster analysis based on comments received. Thanks to Ed Harrison, I have included data from the Durham County precincts. And since other commenters explained away the apparent under-voting in some precincts, I recalculated the percentages to be based on the number of people voting in that race instead of the total ballots cast for the precinct. For town council, I approximated 4 votes per person which is necessarily on the high side, but makes the town council percentages comparable to the mayor percentages.</p>
<div id="attachment_361" class="wp-caption aligncenter" style="width: 491px"><a href="http://www.forthgo.com/blog/wp-content/uploads/2009/11/CH2009Cluster2.png"><img src="http://www.forthgo.com/blog/wp-content/uploads/2009/11/CH2009Cluster2.png" alt="Two-way cluster of precincts and candidates" title="CH2009Cluster2" width="481" height="563" class="size-full wp-image-361" /></a><p class="wp-caption-text">Two cluster of precincts and candidates</p></div>
<p>I also figured out how to color the clusters by absolute values rather than relative values, which helps to differentiate the candidates. They still fall into two large groups, but now it&#8217;s easier to see subgroups. Mayor-council alignments are highly sensitive to the council multiplication factor (4 here), so ignore Kleinschmidt and Czajkowski for candidate clustering.</p>
<p>For the record, low scoring candidates have been eliminated (otherwise they make all precincts look more similar), and absentee and provisional votes have been combined with One Stop precincts.</p>
<p>The precincts present a similar clustering as before, except the under-voters are now distributed into other clusters. The yellow group is fairly neutral. The green group is left leaning. The purple group is left-leaning with a focus on Harrison/Rich/Easthom. The blue group is left-leaning with a focus on Merritt/Kleinschmidt. The red group is right-leaning and includes two of the Durham precincts.</p>
<p>As a bonus, I thought this visual was attractive. It shows a smoothed trend line of the vote percentages (times four for town council candidates) by precinct, where the precincts are ordered by support for Kleinschmidt, the winner of the race for mayor. (Click graph for a larger version.)</p>
<p><a href="http://www.forthgo.com/blog/wp-content/uploads/2009/11/CH2009Performance.png"><img src="http://www.forthgo.com/blog/wp-content/uploads/2009/11/CH2009Performance-317x250.png" alt="CH2009Performance" title="CH2009Performance" width="317" height="250" class="aligncenter size-thumbnail wp-image-362" /></a></p>
<p>The &#8220;left-leaning&#8221; candidates generally rise with Kleinschmidt while the &#8220;right-leaning&#8221; candidates (dotted lines) fall. Merritt&#8217;s strong showing at Lincoln and Northside is also evident. Unfortunately for him, those precincts had very low turn-out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.forthgo.com/blog/2009/11/17/chapel-hill-election-clustering-revised/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Chapel Hill Election Clustering</title>
		<link>http://www.forthgo.com/blog/2009/11/16/chapel-hill-election-clustering/</link>
		<comments>http://www.forthgo.com/blog/2009/11/16/chapel-hill-election-clustering/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 02:22:31 +0000</pubDate>
		<dc:creator>xan</dc:creator>
				<category><![CDATA[Graphs]]></category>
		<category><![CDATA[Local]]></category>

		<guid isPermaLink="false">http://www.forthgo.com/blog/?p=356</guid>
		<description><![CDATA[Damon Seils provided some great maps of the precinct results from this month&#8217;s local elections. I played around with the data, and found the results of a two-cluster analysis to be interesting. The ballots don&#8217;t include party affiliation, but candidates &#8230; <a href="http://www.forthgo.com/blog/2009/11/16/chapel-hill-election-clustering/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Damon Seils provided some great <a href="http://www.orangepolitics.org/node%252F5207">maps of the precinct results</a> from this month&#8217;s local elections. I played around with the data, and found the results of a two-cluster analysis to be interesting. The ballots don&#8217;t include party affiliation, but candidates fell into two clusters, anyway, and the precincts fit several different profiles in support of those two candidate groups.</p>
<div id="attachment_357" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.forthgo.com/blog/wp-content/uploads/2009/11/CH2009Cluster.png"><img src="http://www.forthgo.com/blog/wp-content/uploads/2009/11/CH2009Cluster.png" alt="Two-way clustering of candidates and precincts" title="CH2009Cluster" width="500" height="545" class="size-full wp-image-357" /></a><p class="wp-caption-text">Two-way clustering of candidates and precincts</p></div>
<p>I&#8217;ll agree the diagram looks a bit complicated, but if you put in a little work, there&#8217;s a few gems to be found. Precincts are listed down the left side, and candidates across the bottom. The square at each precinct-candidate intersection is colored according to the candidate&#8217;s relative support at that precinct, red being strong, gray medium and blue weak. That part&#8217;s called a <em>cell plot</em> or <em>heat map</em>. </p>
<p>The tree-like parts are <em>dendrograms</em>, which show the results of the hierarchical cluster analyses. Similar items (precincts or candidates) are grouped together in the tree. </p>
<p>For the candidates, along the bottom, there&#8217;s a clear pair of clusters, which I&#8217;ll call <em>left-leaning</em> and <em>right-leaning</em> candidates. Coincidently, the left-leaning are on the left and the right-leaning are on the right.</p>
<p>The precincts are more interesting, though I have even less knowledge of their actual political orientations. I&#8217;ve colored the precincts into five groups. The first (red) and to a greater extent the second (yellow) cluster generally voted in favor of the right-leaning candidates. That is, the left six columns of the heat map are bluish and the right four columns are reddish. The opposite is true for the green and purple clusters; they&#8217;re more left-leaning, especially the purple precincts.</p>
<p>What puzzles me is the middle (blue) cluster. Those precincts don&#8217;t seem to like anyone. The numbers I used for clustering were percent of ballots cast, and apparently there were more voters in those precincts with incomplete ballots, voting in some but not all races. For instance, the two major mayoral candidates, Kleinschmidt and Czajkowski, only received votes on 28% and 21%, respectively, of the ballots at the Kings Mill precinct.</p>
<p>That leads to looking at votes per ballot for each race by precinct. Here&#8217;s a bar chart with the precincts ordered by town council votes per ballot.</p>
<p><a href="http://www.forthgo.com/blog/wp-content/uploads/2009/11/VotesPerBallot.png"><img src="http://www.forthgo.com/blog/wp-content/uploads/2009/11/VotesPerBallot-327x250.png" alt="VotesPerBallot" title="VotesPerBallot" width="327" height="250" class="aligncenter size-thumbnail wp-image-358" /></a></p>
<p>Most precincts had near 100% participation in the mayoral race (exactly 100% for Booker Creek and Coker Hills), and most precincts averaged over three (of four available) votes in the town council race. So only the already-identified cluster of three (plus Dogwood Acres to a lesser degree) stand out regarding participation.</p>
<p>I imagine the One Stop (early voting for all precincts) totals reflect a lot of Carrboro voters. What makes the others different? Were people there to vote for a different race, like the school board? Or just voting for a favorite son/daughter candidate?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.forthgo.com/blog/2009/11/16/chapel-hill-election-clustering/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Numerals are Visualizations, too</title>
		<link>http://www.forthgo.com/blog/2009/08/09/numerals-are-visualizations/</link>
		<comments>http://www.forthgo.com/blog/2009/08/09/numerals-are-visualizations/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 02:26:51 +0000</pubDate>
		<dc:creator>xan</dc:creator>
				<category><![CDATA[Graphs]]></category>

		<guid isPermaLink="false">http://www.forthgo.com/blog/?p=339</guid>
		<description><![CDATA[I like looking at annual reports as a good source of data visualizations. Much of the typical report is just feel-good decoration, and the graphs usually fall into that category with lots of shine but little content. However, what caught &#8230; <a href="http://www.forthgo.com/blog/2009/08/09/numerals-are-visualizations/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I like looking at annual reports as a good source of data visualizations. Much of the typical report is just feel-good decoration, and the graphs usually fall into that category with lots of shine but little content. However, what caught by eye in the <a href="http://www.citizen.org/">Public Citizen</a> 2008 annual report <a href="http://www.citizen.org/documents/annrpt2008.pdf">[PDF]</a>, was a table of numbers (the graphs aren&#8217;t too great either).</p>
<p><a href="http://www.forthgo.com/blog/wp-content/uploads/2009/08/knockouttable.png"><img src="http://www.forthgo.com/blog/wp-content/uploads/2009/08/knockouttable-300x74.png" alt="Misaligned figures" title="Misaligned figures" width="300" height="74" class="aligncenter size-medium wp-image-340" /></a></p>
<p>See anything odd about the numbers? The columns are not aligned vertically because of different digit widths; in particular, the &#8220;1&#8243; digit is very narrow. As a result, the <em>Publications and Subscriptions</em> value seems smaller than the <em>Grants</em> value at first glance, since the latter number is wider.</p>
<p>I thought it was a cardinal rule of font design that all digits were the same width. Unicode even has a &#8220;Figure Dash&#8221; character, which is a dash with the same width as the digit characters.</p>
<p>I set out to find the font in question. First I sampled what I had on my Mac. I didn&#8217;t find the font, but I did find several fonts with digits of unequal width. Most of them were artful fonts like <a href="http://en.wikipedia.org/wiki/Comic_Sans">Comic Sans</a>, but <a href="http://en.wikipedia.org/wiki/Georgia_(typeface)">Georgia</a> was also in that category.</p>
<p>Next I tried <a href="http://www.identifont.com/">Indentifont</a>, a clever idea for identifying a font by asking a series of questions about the characters, such as what kind of bar the &#8220;G&#8221; has. It returned a few fonts that matched by answers, but none that looked like the report text. The &#8220;1&#8243; and the &#8220;t&#8221; are particularly distinctive.</p>
<p>Finally I realized that with the PDF available I could just examine the file in a text editor. After searching for the word &#8220;Font&#8221; a few times, I kept seeing the word &#8220;Knockout&#8221; nearby. Checking the characters on the <a href="http://www.typography.com/fonts/font_overview.php?productLineID=100013">foundry site the Knockout font family</a>, shows a perfect match for the font called &#8220;No. 32 Junior Cruiserweight&#8221;.</p>
<p>So my theory about fonts was wrong, but I still hold that tables of numbers should never contains variable-width digits.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.forthgo.com/blog/2009/08/09/numerals-are-visualizations/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dual-Scaled Graph Examples</title>
		<link>http://www.forthgo.com/blog/2009/06/12/dual-scaled-graph-examples/</link>
		<comments>http://www.forthgo.com/blog/2009/06/12/dual-scaled-graph-examples/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 01:58:33 +0000</pubDate>
		<dc:creator>xan</dc:creator>
				<category><![CDATA[Graphs]]></category>

		<guid isPermaLink="false">http://www.forthgo.com/blog/?p=326</guid>
		<description><![CDATA[Visualizations experts says it&#8217;s generally a bad idea to put two different vertical axes on a single graph (see Dual-Scaled Axes in Graphs &#8212; Are They Ever the Best Solution? [PDF]) since it invites comparison of data on different scales. &#8230; <a href="http://www.forthgo.com/blog/2009/06/12/dual-scaled-graph-examples/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Visualizations experts says it&#8217;s generally a bad idea to put two different vertical axes on a single graph (see <a href="http://www.perceptualedge.com/articles/visual_business_intelligence/dual-scaled_axes.pdf">Dual-Scaled Axes in Graphs &#8212; Are They Ever the Best Solution? [PDF]</a>) since it invites comparison of data on different scales. However, the treatment is still popular because of the two-in-one information density, and the distortion can be overcome with careful reading. </p>
<p>In the worse case, though, two completely different scales are carefully transformed to almost line up and suggest correlation. An insidious example from a few years ago was the <a href="http://bigpicture.typepad.com/comments/2006/04/gasoline_prices.html">presidential popularity versus price of gas</a> graphs, about which one writer believes show that there&#8217;s &#8220;clearly a correlation.&#8221;</p>
<p><img src="http://www.forthgo.com/blog/wp-content/uploads/2009/06/newbushindex_28670_image001_1.png" alt="" title="" width="506" height="345" class="aligncenter size-full wp-image-329" /></p>
<p>It does look like a correlation, but that&#8217;s only because the scales have been transformed to follow the same long-term path, which could be done to any two generally linear data series. There are a couple related spikes for the September 11 attacks and the Iraq War start which our eyes quickly pick up on, but otherwise the local ups and downs don&#8217;t match too well. These graphs disappeared shortly afterwards when the two trends obviously diverged (gas prices got better but Bush ratings didn&#8217;t).</p>
<p>What I really don&#8217;t understand, though, is this next example on employment data from <a href="http://www.mybudget360.com/real-unemployment-situation-approximately-26000000-unemployed-or-underemployed-job-growth-in-10-per-hour-jobs-while-20-per-hour-jobs-disappear/">My Budget 360</a>.</p>
<p><a href="http://www.forthgo.com/blog/wp-content/uploads/2009/06/leisure-vs-manufacturing1.png"><img src="http://www.forthgo.com/blog/wp-content/uploads/2009/06/leisure-vs-manufacturing1-416x250.png" alt="leisure-vs-manufacturing1" title="leisure-vs-manufacturing1" width="416" height="250" class="aligncenter size-thumbnail wp-image-332" /></a></p>
<p>I&#8217;ve never seen a dual-scaled graph where both scales were the same units and approximate range. What&#8217;s the point? It shifted the intersection point a little, but not enough to affect the thesis of the article. It does exaggerate the climb of the blue line (leisure employment). I can&#8217;t tell if this one is intentional distortion or just carelessness.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.forthgo.com/blog/2009/06/12/dual-scaled-graph-examples/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Burtin Antibiotic Illustrations</title>
		<link>http://www.forthgo.com/blog/2009/01/11/burtin-antibiotic-illustrations/</link>
		<comments>http://www.forthgo.com/blog/2009/01/11/burtin-antibiotic-illustrations/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 18:32:58 +0000</pubDate>
		<dc:creator>xan</dc:creator>
				<category><![CDATA[Graphs]]></category>

		<guid isPermaLink="false">http://www.forthgo.com/blog/?p=295</guid>
		<description><![CDATA[CHANCE magazine is running a contest to create the best illustration for a data set of the effectiveness of three antibiotics on sixteen strains of bacteria. Designer Will Burtin used this data set for a 1950s visualization. With only five &#8230; <a href="http://www.forthgo.com/blog/2009/01/11/burtin-antibiotic-illustrations/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.amstat.org/PUBLICATIONS/chance/">CHANCE</a> magazine is running a <a href="http://www.public.iastate.edu/~larsen/graphic%20contest/graphics%20contest.pdf">contest</a> to create the best illustration for a data set of the effectiveness of three antibiotics on sixteen strains of bacteria. Designer Will Burtin used this data set for a 1950s visualization.</p>
<p>With only five variables and sixteen observations, my first question is, &#8220;What&#8217;s wrong with just using a table?&#8221; The table in the contest description is even nicely laid out.<br />
<a href="http://www.public.iastate.edu/~larsen/graphic%20contest/graphics%20contest.pdf"><img src="http://www.forthgo.com/blog/wp-content/uploads/2009/01/burtin-data-300x159.png" alt="burtin-data" title="burtin-data" width="300" height="159" class="aligncenter size-medium wp-image-296" /></a></p>
<p>My second question is, &#8220;Best for whom?&#8221; Which illustration is best depends on the audience, which in this case might be doctors, researchers, statisticians or the general public among others. </p>
<p>The data shows Minimum Inhibitory Concentration (MIC, presumably in µg/ml) for each antibiotic and bacteria combination. Lower is better, indicating less antibiotic is needed to treat the bacteria. The MIC values vary widely from 0.001 to 1000, and I applied a logarithm transform for analysis, either on the data or on the graph. Besides nicely spreading out the data values, the log transformation may have a physical interpretation. If an antibiotic culture grows exponentially, then the log of the concentration is the time to grow it.</p>
<p>Exploring the data a little bit, the simplest visualization is a heat map, where every number is represented by a swatch of color. I don&#8217;t see much advantage over the table of numbers, except to quickly find extreme values or certain other patterns that the colors help with.</p>
<p><a href="http://www.forthgo.com/blog/wp-content/uploads/2009/01/burtin-heat.png"><img src="http://www.forthgo.com/blog/wp-content/uploads/2009/01/burtin-heat-300x244.png" alt="burtin-heat" title="burtin-heat" width="300" height="244" class="aligncenter size-medium wp-image-299" /></a></p>
<p>Next, we might think from a researcher/statistician perspective and try to cluster the bacteria that react similarly to the antibiotics. Here&#8217;s a heat map and dendrogram resulting from a cluster analysis. The rows are colored by gram staining. It&#8217;s like the heat map above, but similar bacteria are grouped together (and the color scale is slightly different). The bacteria that are clustered close together might suggest a commonality for future research.</p>
<p><a href="http://www.forthgo.com/blog/wp-content/uploads/2009/01/burtin-cluster.png"><img src="http://www.forthgo.com/blog/wp-content/uploads/2009/01/burtin-cluster-300x242.png" alt="burtin-cluster" title="burtin-cluster" width="300" height="242" class="aligncenter size-medium wp-image-300" /></a></p>
<p>Since there are only three antibiotics, we can view the data as a 3D scatter plot. Here, the data markers correspond to the clusters.</p>
<p><a href="http://www.forthgo.com/blog/wp-content/uploads/2009/01/burtin-3d-1.png"><img src="http://www.forthgo.com/blog/wp-content/uploads/2009/01/burtin-3d-1-300x269.png" alt="burtin-3d-1" title="burtin-3d-1" width="300" height="269" class="aligncenter size-medium wp-image-298" /></a></p>
<p>3D doesn&#8217;t work too well in static 2D media like this one since you need to be able to rotate it to see the structure. If you do rotate it, you can see that three of the clusters appear roughly in a straight line, so maybe there are really two different kinds instead of four. Here&#8217;s a view looking straight down the line.</p>
<p><a href="http://www.forthgo.com/blog/wp-content/uploads/2009/01/burtin-3d-2.png"><img src="http://www.forthgo.com/blog/wp-content/uploads/2009/01/burtin-3d-2-300x292.png" alt="burtin-3d-2" title="burtin-3d-2" width="300" height="292" class="aligncenter size-medium wp-image-297" /></a></p>
<p>A scatter plot matrix shows all the 2D relationships better and is better for static presentation. It can&#8217;t show the 3D the alignment of the three clusters, but you can get a hint of it in the neomycin versus penicillin panel.</p>
<p><a href="http://www.forthgo.com/blog/wp-content/uploads/2009/01/burtin-scm.png"><img src="http://www.forthgo.com/blog/wp-content/uploads/2009/01/burtin-scm-300x279.png" alt="burtin-scm" title="burtin-scm" width="300" height="279" class="aligncenter size-medium wp-image-301" /></a></p>
<p>For my contest entry, I decided to go with the perspective of a 1950s doctor, with the idea that a doctor treating a patient doesn&#8217;t know usually know what bacteria is causing the infection and may or may not have the results of a gram staining. With that in mind, my visualization shows the MIC for each antibiotic with the best dose for each scenario called out.</p>
<p><a href="http://www.forthgo.com/blog/wp-content/uploads/2009/01/burtin-gb.png"><img src="http://www.forthgo.com/blog/wp-content/uploads/2009/01/burtin-gb-300x219.png" alt="burtin-gb" title="burtin-gb" width="300" height="219" class="aligncenter size-medium wp-image-302" /></a></p>
<p>The graph shows that penicillin is best for gram positive bacteria since all purple circles are below 1µg/ml for penicillin. Similarly, neomycin is best for gram negative bacteria and streptomycin is best if gram staining is unknown. A drawback of this graph is that the points are not labeled or connected. I tried a few ways to do that with labels and lines, but the graph just became too messy. If you need that much detail, you probably need the table of numbers.</p>
<p>After doing all that, I found Burtin&#8217;s original visualization via a <a href="http://www.nytimes.com/2008/06/01/books/review/Heller-t.html?_r=1&#038;oref=slogin">NY Times article</a>.<br />
<a href="http://graphics8.nytimes.com/images/2008/06/01/books/heller-1.jpg"><img alt="" src="http://graphics8.nytimes.com/images/2008/06/01/books/heller-1.jpg" title="Will Burtin Antibiotic Graph" class="aligncenter" width="300" height="325" /></a></p>
<p>I hope this isn&#8217;t what CHANCE is looking for. It has little communication value except to say &#8220;Look how cool I am!&#8221; At least all the data is present, so a meticulous reader can get what information he needs. The audience for this must be a hospital administrator who needs to feel like he&#8217;s getting his money&#8217;s worth with fancy visualizations. I think it is more a work of art than of communication.</p>
<p>Jon Peltier has a <a href="http://peltiertech.com/WordPress/2009/01/05/antibiotic-effectiveness-a-study-of-chart-types/">write-up</a> of his contest entry. It has all the data of Burtin&#8217;s original in a much better rectangular structure.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.forthgo.com/blog/2009/01/11/burtin-antibiotic-illustrations/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

