<?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>Doug McCune &#187; Data Visualization</title>
	<atom:link href="http://dougmccune.com/blog/category/data-visualization/feed/" rel="self" type="application/rss+xml" />
	<link>http://dougmccune.com/blog</link>
	<description>A blog about Adobe Flex</description>
	<lastBuildDate>Mon, 16 Jan 2012 23:34:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Printing Hurricanes as Gifts</title>
		<link>http://dougmccune.com/blog/2011/09/18/printing-hurricanes-as-gifts/</link>
		<comments>http://dougmccune.com/blog/2011/09/18/printing-hurricanes-as-gifts/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 17:54:20 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Data Visualization]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[SpatialKey]]></category>

		<guid isPermaLink="false">http://dougmccune.com/blog/?p=1561</guid>
		<description><![CDATA[We had a very busy month of August at SpatialKey as Hurricane Irene tore through the east coast. Our insurance customers were constantly watching Irene as it built up and approached land, then as it swept through parts of North Carolina, Vermont, New York, etc, and then as it died out quietly. We were writing [...]]]></description>
			<content:encoded><![CDATA[<p>We had a very busy month of August at <a href="http://www.spatialkey.com">SpatialKey</a> as Hurricane Irene tore through the east coast. Our insurance customers were <a href="http://blog.spatialkey.com/2011/08/hurricane-irene-spatialkey-in-action/">constantly watching Irene</a> as it built up and approached land, then as it swept through parts of North Carolina, Vermont, New York, etc, and then as it died out quietly. We were writing software to visualize hurricane forecasts in real-time, as the storm was approaching, and getting immediate feedback from our customers. It was all a bit stressful, but exhilarating.</p>
<p>I wanted to have some kind of gift of thanks to give to our most helpful customers, who worked closely with us, helping us develop our hurricane product. To be honest, it felt like we all weathered a storm together during that hectic week in August. We brainstormed on sending out shirts, or bags, or some other standard corporate gear, but none of it really felt like &#8220;us&#8221;. So I came up with a more unique gift that I think captures our culture.</p>
<p><img src="http://dougmccune.com/blog/wp-content/uploads/2011/09/IMG_1861-e1316366532654.jpg" alt="" title="IMG_1861" width="499" height="333" class="aligncenter size-full wp-image-1562" style="border:2px solid silver; margin-left:10px;" /></p>
<p>This is a 3D model of Hurricane Irene. The height of the model represents the wind speed at that location. You can see there are 3 bands of different wind speeds. The outer band represents where wind speeds hit 39 mph, the next band represents 58 mph, and the third band represents 74 mph (hurricane force winds). Then running through the middle we have the path of the eye of the storm, and the height of that track represents the exact speed at that point in time (Irene got up to 120 mph). </p>

<a href='http://dougmccune.com/blog/2011/09/18/printing-hurricanes-as-gifts/img_1873/' title='IMG_1873'><img width="150" height="150" src="http://dougmccune.com/blog/wp-content/uploads/2011/09/IMG_1873-150x150.jpg" class="attachment-thumbnail" alt="IMG_1873" title="IMG_1873" /></a>
<a href='http://dougmccune.com/blog/2011/09/18/printing-hurricanes-as-gifts/img_1911/' title='IMG_1911'><img width="150" height="150" src="http://dougmccune.com/blog/wp-content/uploads/2011/09/IMG_1911-150x150.jpg" class="attachment-thumbnail" alt="IMG_1911" title="IMG_1911" /></a>
<a href='http://dougmccune.com/blog/2011/09/18/printing-hurricanes-as-gifts/img_1912/' title='IMG_1912'><img width="150" height="150" src="http://dougmccune.com/blog/wp-content/uploads/2011/09/IMG_1912-150x150.jpg" class="attachment-thumbnail" alt="IMG_1912" title="IMG_1912" /></a>
<a href='http://dougmccune.com/blog/2011/09/18/printing-hurricanes-as-gifts/img_1917/' title='IMG_1917'><img width="150" height="150" src="http://dougmccune.com/blog/wp-content/uploads/2011/09/IMG_1917-150x150.jpg" class="attachment-thumbnail" alt="IMG_1917" title="IMG_1917" /></a>
<a href='http://dougmccune.com/blog/2011/09/18/printing-hurricanes-as-gifts/img_1927/' title='IMG_1927'><img width="150" height="150" src="http://dougmccune.com/blog/wp-content/uploads/2011/09/IMG_1927-150x150.jpg" class="attachment-thumbnail" alt="IMG_1927" title="IMG_1927" /></a>
<a href='http://dougmccune.com/blog/2011/09/18/printing-hurricanes-as-gifts/img_1940/' title='IMG_1940'><img width="150" height="150" src="http://dougmccune.com/blog/wp-content/uploads/2011/09/IMG_1940-150x150.jpg" class="attachment-thumbnail" alt="IMG_1940" title="IMG_1940" /></a>

<p>I created the model by taking the GIS data straight from NOAA and using that to build up the 3D model by hand. Then I sent the 3D model off to <a href="http://shapeways.com">Shapeways</a> for printing. The printed version you see in the photos is made out of alumide, which is sort of a composite aluminum material. </p>
<p>For our customers who were working with us while Irene passed through, we hope this will be a nice reminder of the work we did. It&#8217;s just a little paperweight to sit on your desk, but for those who were watching Irene as it developed and keeping a very close eye on the footprint of the storm, I think it&#8217;s a nice memento.</p>
<p>A hurricane can be a difficult concept to understand. For those affected in its path, it&#8217;s an incredibly tangible, visceral thing. But for those watching from afar (like me, sitting in California), it&#8217;s less &#8220;real&#8221;. We hear the overly-dramatic news reports and the doom-and-gloom predictions, but it&#8217;s a purely theoretical experience. Having a little paperweight of the storm on my desk doesn&#8217;t really help me understand the true impact Irene had on all those folks along the east coast, but at least I can touch it.</p>
]]></content:encoded>
			<wfw:commentRss>http://dougmccune.com/blog/2011/09/18/printing-hurricanes-as-gifts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Visualizing Time with the Infinity Hour Chart</title>
		<link>http://dougmccune.com/blog/2011/05/07/visualizing-time-with-the-infinity-hour-chart/</link>
		<comments>http://dougmccune.com/blog/2011/05/07/visualizing-time-with-the-infinity-hour-chart/#comments</comments>
		<pubDate>Sat, 07 May 2011 19:04:11 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Data Visualization]]></category>

		<guid isPermaLink="false">http://dougmccune.com/blog/?p=1500</guid>
		<description><![CDATA[This is another experiment in visualizing 24-hour cyclical data. My last post explored a method of linear representation (the Double Time Bar Chart). Linear representations have problems when it comes to showing the cyclical nature of time data (ie there is no start or end of a 24 hour cycle). Inspiration When trying to think [...]]]></description>
			<content:encoded><![CDATA[<p>This is another experiment in visualizing 24-hour cyclical data. My last post explored a method of linear representation (the <a href="http://dougmccune.com/blog/2011/04/26/visualizing-time-with-the-double-time-bar-chart/">Double Time Bar Chart</a>). Linear representations have problems when it comes to showing the cyclical nature of time data (ie there is no start or end of a 24 hour cycle).<br />
<br style="padding-top:5px;" /></p>
<h2>Inspiration</h2>
<p>When trying to think of visual representations of never-ending cycles I was inspired by the infinity symbol. It&#8217;s a great symbol to show a continuous cycle, while at the same time being more visually interesting than a simple circle (fun fact: the infinity symbol dates back to 1655). The other iconography that came to mind when thinking about infinity is the hour glass. An hour glass not only represents time, but it also looks similar to a vertical infinity symbol.</p>
<p><a href="http://dougmccune.com/blog/wp-content/uploads/2011/05/infinity_hourglass.jpg"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/05/infinity_hourglass-300x129.jpg" alt="" title="infinity_hourglass" width="300" height="129" class="alignnone size-medium wp-image-1512" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a></p>
<p>My thought was that maybe I could combine the two to create a vertical infinity symbol that evokes the metaphor of an hour glass.<br />
<br style="padding-top:5px;" /></p>
<h2>Back of the napkin</h2>
<p>My original sketch of this concept was done on the back of a napkin. This is the first sketch, which shows how I was originally working with a horizontal infinity symbol. </p>
<p><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/napkin.jpg" alt="" title="napkin" width="500" height="479" class="alignnone size-full wp-image-1428"  style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></p>
<p>I experimented with a few different options for how to show the data using fills. One of the sketches (if turned vertically) looks like an hour glass filling up with water on the bottom, reminiscent of the <a href="http://www.wikileaks.ch/">Wikileaks</a> logo.</p>
<p><br style="padding-top:5px;" /></p>
<h2>Drawing Infinity</h2>
<p>The mathematical name for the infinity symbol is <a href="http://en.wikipedia.org/wiki/Lemniscate">lemniscate</a>, and more specifically the <a href="http://en.wikipedia.org/wiki/Lemniscate_of_Bernoulli">lemniscate of Bernoulli</a>. With some good Googling you can find algorithms to draw the lemniscate of Bernoulli, which is what I did. </p>
<p>To start I divided the lemniscate into 24 segments, one for each of the hours of the day. My initial plot of the lemniscate in 24 parts looked like this:<br />
<img src="http://dougmccune.com/blog/wp-content/uploads/2011/05/infinity_outline1.jpg" alt="" title="infinity_outline" width="160" height="252" class="alignnone size-full wp-image-1515" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></p>
<p>I mapped the hours of the day onto this form, with 12pm noon at the very top and the infinity symbol crossing itself at 6pm/6am.<br />
<img src="http://dougmccune.com/blog/wp-content/uploads/2011/05/infinity_numbers.jpg" alt="" title="infinity_numbers" width="160" height="252" class="alignnone size-full wp-image-1503" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></p>
<p>You follow the time by working your way around the infinity. If you start at the top of the symbol at noon, you would start moving around clockwise to 1pm, then 2pm, etc. You&#8217;ll reach the center at 6pm, at which point the symbol crosses itself and you then read it counter-clockwise around the bottom.<br />
<img src="http://dougmccune.com/blog/wp-content/uploads/2011/05/infinity_arrows_numbers2.jpg" alt="" title="infinity_arrows_numbers2" width="375" height="300" class="alignnone size-full wp-image-1519" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></p>
<p>What you end up with is a way of dividing up the times of day into quadrants. The top-left quarter of the image is the morning, from 6am-12pm. Then the top-right is the afternoon, from 12pm-6pm. Then you have the evening in the botom left (6pm-midnight) and then late-night is in the bottom-right (12am-6am). These quarters match well with how I  mentally categorize times of day.<br />
<img src="http://dougmccune.com/blog/wp-content/uploads/2011/05/infinity_labelled.jpg" alt="" title="infinity_labelled" width="302" height="326" class="alignnone size-full wp-image-1505" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /><br />
Because the form crosses over itself you can actually read the chart almost in a left-to-right way for both the day (top) and night (bottom).<br />
<br style="padding-top:5px;" /></p>
<h2>Drawing Data</h2>
<p>The next step is to try to use this form to represent real data. Here&#8217;s an example that shows the distribution of driving under the influence arrests in San Francisco:</p>
<p><img src="http://dougmccune.com/blog/wp-content/uploads/2011/05/drunkenness_labelled.jpg" alt="" title="drunkenness_labelled" width="299" height="322" class="alignnone size-full wp-image-1524" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;"  /></p>
<p>We can see that this particular crime is primarily a night-time activity that surges around midnight and starts falling off after about 2am. I&#8217;ve colored the range of 6am-6pm in orange to show day-time and the range of 6pm-6am in blue to indicate night-time.</p>
<p>For comparison here&#8217;s apartment burglary, which is mostly a day-time activity:</p>
<p><img src="http://dougmccune.com/blog/wp-content/uploads/2011/05/burglary_labelled.jpg" alt="" title="burglary_labelled" width="299" height="322" class="alignnone size-full wp-image-1525" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;"  /></p>
<p>Once the viewer understands how to read the chart we can remove the labels and simply show the pattern. Here&#8217;s a comparison of a few night-time crimes:</p>
<p><img src="http://dougmccune.com/blog/wp-content/uploads/2011/05/nightime_crimes.jpg" alt="" title="nightime_crimes" width="500" height="268" class="alignnone size-full wp-image-1530" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;"  /></p>
<p>Here&#8217;s a comparison of different types of burglary, some of which occur mostly during the daytime (residential burglary) and some of which occur in the afternoon and late at night (burglary of a store).</p>
<p><img src="http://dougmccune.com/blog/wp-content/uploads/2011/05/burglary_comparison.jpg" alt="" title="burglary_comparison" width="359" height="422" class="alignnone size-full wp-image-1542" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></p>
<h2>Small Multiples</h2>
<p>Here&#8217;s a final example of many different crime types represented side by side to try to see how this chart works for comparisons.</p>
<p><a href="http://dougmccune.com/blog/wp-content/uploads/2011/05/infinity_small_multiples.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/05/infinity_small_multiples_500.png" alt="" title="infinity_small_multiples_500" width="500" height="377" class="alignnone size-full wp-image-1552" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a></p>
<h2>Discussion</h2>
<p>I&#8217;m not very happy with this chart in terms of the viewer&#8217;s ability to accurately read the chart. I also don&#8217;t think it highlights changes between hours enough. Often there are changes and trends that are easy to spot in the linear charts of <a href="http://dougmccune.com/blog/2011/04/26/visualizing-time-with-the-double-time-bar-chart/">my last post</a>, but that are very difficult to see in these charts. Each hour is at quite a different angle than the hours on either side, which makes it difficult to compare two hours. You still get the big picture trends, like if a crime is a night-time or day-time crime, but the smaller trends are much harder to spot.</p>
<p>On the flip side, I really like the metaphors of the infinity symbol and the hourglass. On an artistic and philosophical level I think those metaphors make this a really beautiful visualization. Too bad it&#8217;s not also effective <img src='http://dougmccune.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://dougmccune.com/blog/2011/05/07/visualizing-time-with-the-infinity-hour-chart/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Visualizing Time with the Double-Time Bar Chart</title>
		<link>http://dougmccune.com/blog/2011/04/26/visualizing-time-with-the-double-time-bar-chart/</link>
		<comments>http://dougmccune.com/blog/2011/04/26/visualizing-time-with-the-double-time-bar-chart/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 14:45:21 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Data Visualization]]></category>

		<guid isPermaLink="false">http://dougmccune.com/blog/?p=1438</guid>
		<description><![CDATA[In my last post I described some of the issues with visualizing cyclical data by hour of day and covered a few examples of different visualization methods that are typically used. This post is more a visualization experiment. The Context To start with a little context, for my day job I create a software product [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://dougmccune.com/blog/2011/04/21/visualizing-cyclical-time-hour-of-day-charts/">my last post</a> I described some of the issues with visualizing cyclical data by hour of day and covered a few examples of different visualization methods that are typically used. This post is more a visualization experiment.<br />
<br style="padding-bottom:5px;" /></p>
<h2>The Context</h2>
<p>To start with a  little context, for my day job I create a software product called <a href="http://spatialkey.com">SpatialKey</a>, which is a business intelligence/data visualization tool. We can visualize all sorts of data all sorts of ways, but one of the things we do is show you a histogram of the occurrence of your data by the hour of day. The chart looks something like this:</p>
<p><a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/sk_time_chart1.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/sk_time_chart1-300x146.png" alt="" title="sk_time_chart" width="300" height="146" class="alignnone size-medium wp-image-1442" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a><br />
<br style="padding-bottom:5px;" /></p>
<h2>The Problem</h2>
<p>That&#8217;s about as simple as you can get, with a single series of data displayed as a bar chart. The section on line charts in my <a href="http://dougmccune.com/blog/2011/04/21/visualizing-cyclical-time-hour-of-day-charts/">previous post</a> covered some of the problems with these visualizations. I have two issues with this chart:</p>
<ul>
<li>the break in the data between 11pm and midnight</li>
<li>the difficulty understanding the context of the time</li>
</ul>
<p>To summarize, the first problem has to do with being able to understand the trends that occur around midnight (where this chart breaks the data). In this example we can see that data in the evening peaks at 9pm and then declines, but it&#8217;s difficult to accurately assess that declining pattern because you have to try to follow the data as it ends on the right edge of the chart and then continues all the way over on the left edge. This is only problematic when something interesting is happening around midnight (or whenever you choose to have your chart begin/end).</p>
<p>The second point about context has to do with the fact that I don&#8217;t think about my days as starting at midnight and ending at 11:59pm. A more accurate representation of how I think of my days is that they start sometime when I wake up, usually around 7am, and they are broken up into &#8220;day-time&#8221; and &#8220;night-time&#8221;, and they end more or less when I go to sleep. Within &#8220;day-time&#8221; my day is broken up into other categorizations, like &#8220;working hours&#8221;, &#8220;afternoon&#8221;, &#8220;lunch-time&#8221;, etc.  And depending on the data in question, these contextual relationships might be incredibly important. For this post I&#8217;ll be looking at crime data. When you&#8217;re investigating crime data, the contextual relationship to the time of day can be incredibly relevant. I don&#8217;t just want to know about when people are assaulted, I want to know the rate of assaults on the street when I&#8217;m going to be walking on the street (typically right after work on my way home, or later at night going out to dinner, bars, etc). </p>
<p>The simple bar chart doesn&#8217;t solve these problems well. It presents a hard break in the data, forcing the viewer to mentally connect the end of the chart with the beginning. And it also forces the viewer to think about the days in the context of midnight &#8211; 11pm, which is not the natural categorization system we have for the hours of the day.<br />
<br style="padding-bottom:5px;" /></p>
<h2>The Double-Time Bar Chart</h2>
<p>My first attempt to address some of these problems is something I&#8217;m tentatively calling the Double-Time Bar Chart. The goal is to put the time in context a bit more for the viewer, and to always show a relevant, continuous visualization of all times of the day.</p>
<p><a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/contextual_hourly_chart1.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/contextual_hourly_chart1.png" alt="" title="contextual_hourly_chart" width="267" height="222" class="alignnone size-full wp-image-1448" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a></p>
<p>The chart still uses simple bars in a linear chart. But the <strong>data is actually shown twice</strong> in the chart. The top part of the chart is the exact same histogram chart with 24 bars that we had before, going from midnight to 11pm. The bottom part is the <strong>same data</strong> (upside down), but it starts instead at noon and goes to 11am. It&#8217;s shifted by 12 hours compared to the top chart. Imagine taking the top chart, flipping it upside down, then shifting it over to the right by 12 bars.</p>
<p>There&#8217;s a single x-axis for both the top and bottom charts, which is labelled with the hours of the day. But the hours are either AM for the top chart or PM for the bottom chart. </p>
<p>The highlighted regions represent 6am-5pm on the top and 6pm-5am on the bottom. That means there are 24 highlighted bars, so the highlighted bars represent one unduplicated set of 24 hours of data. The highlight is used to draw attention to day-time and night-time activities. A very rough color categorization is used to color 6am-5pm in a lighter yellow, representing day-time, and 6pm-5am in a darker color, representing night. I realize this doesn&#8217;t match up with actual sunlight/darkness times in most cities, but I think the 6am-6pm time range is close enough to how many people think about &#8220;day&#8221; vs &#8220;night&#8221; that it works.</p>
<p>The duplicated (but shifted) data in the top and bottom allows me to see a continuous, unbroken series of data that can show day-time activity (top) or night-time activity (bottom). There is no hour of the day that forces me to read the chart to the end and then continue on by moving my attention back to the beginning. If I&#8217;m interested in the trends during the day (say around lunchtime, so 11am-1pm) then I can read the top chart. But if I&#8217;m interested in night-time activity (say 11pm-1am) then I can read the bottom chart. In both cases I get a continuous chart that shows the full context of all the data around the range in which I&#8217;m interested.</p>
<p>The highlighted regions serve to draw attention to daytime versus nighttime, but we still keep the rest of the 24 hours visible in each chart (the unhighlighted bars) so you can always get the full context of the data. This allows you to follow the data from 4pm-8pm without forcing your eyes to jump from the top to the bottom.<br />
<br style="padding-bottom:5px;" /></p>
<h2>Examples</h2>
<p>For these examples I&#8217;ll be visualizing crime data from the city of San Francisco. I&#8217;m using two full years of crime, 2009 and 2010. You can <a href="http://apps.sfgov.org/datafiles/index.php?dir=Police&#038;by=name&#038;order=asc">download the crime data</a> yourself if you want to play with it. </p>
<p>One note about these charts: there are no y-axis labels and each chart is relative to itself. I was interested in exploring the problem of visualizing the hourly patterns, not necessarily being able to know exactly how many crimes occurred at a certain hour. The highest bar in each chart does not always mean the same value. It simply means that&#8217;s the hour with the most crimes for that particular crime type. </p>
<p>Here&#8217;s an example of a crime the has an interesting day-time pattern, burglary. Notice the nice peak right when everyone leaves their homes unguarded as they go off to work.</p>
<p><a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/burglary1.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/burglary1-300x258.png" alt="" title="burglary" width="300" height="258" class="alignnone size-medium wp-image-1463" style="border:1px solid silver;  margin:10px; background-color:#FFFFFF;"  /></a></p>
<p>And here&#8217;s a contrasting example of a crime that&#8217;s primarily a night-time activity, public intoxication.<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/drunkenness1.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/drunkenness1-300x264.png" alt="" title="drunkenness" width="300" height="264" class="alignnone size-medium wp-image-1464" style="border:1px solid silver; margin:10px; background-color:#FFFFFF;"  /></a></p>
<p>Notice the nice nearly-linear build up all the way from about 9am up to the peak at midnight, then the dropoff after 2am (when the bars close in San Francisco). </p>
<p>There are a few crimes that are even more polarized. Arrests for driving under the influence have a nice distribution curve that peaks at midnight.</p>
<p><a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/dui.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/dui-300x260.png" alt="" title="dui" width="300" height="260" class="alignnone size-medium wp-image-1467" style="border:1px solid silver; margin:10px; background-color:#FFFFFF;"  /></a></p>
<p>And prostitution is also primarily a night-time activity in San Francisco. There are two peaks, one just after work around 6-7pm, and then another a bit later in the evening at 11pm.</p>
<p><a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/prostitution.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/prostitution-300x262.png" alt="" title="prostitution" width="300" height="262" class="alignnone size-medium wp-image-1469" style="border:1px solid silver;  margin:10px; background-color:#FFFFFF;"  /></a><br />
<br style="padding-bottom:5px;" /></p>
<h2>Small Multiples for Comparison</h2>
<p>One way to compare different kinds of data is to use <a href="http://en.wikipedia.org/wiki/Small_multiple">small multiples</a>, which relies on small charts all laid out together to make it easy for your eyes to scan. These Double-Time charts work well in small multiples because you can quickly scan to see the difference between predominantly daytime crimes (large yellow areas in the top half) versus night-time crimes (blue areas in the bottom half). For instance, to get a better view of burglary, we can look at the sub-categorizations.<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/burglary_comparison.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/burglary_comparison.png" alt="" title="burglary_comparison" width="452" height="508" class="alignnone size-full wp-image-1473" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a></p>
<p>We can see that residential burglaries occur in the morning when people leave for work, whereas burglaries of a store are either late-afternoon or evening crimes.</p>
<p>The same approach can be used to compare many different types of crimes:<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/small_multiples_medium.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/small_multiples_medium_500.png" alt="" title="small_multiples_medium_500" width="500" height="360" class="alignnone size-full wp-image-1480" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a></p>
<p>Or we can remove the x-axis and strip down the extra whitespace in the charts to get an even more compact view:<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/small_multiples_small.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/small_multiples_small_500.png" alt="" title="small_multiples_small_500" width="500" height="249" class="alignnone size-full wp-image-1483" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a><br />
<br style="padding-bottom:5px;" /></p>
<h2>Summary/Revisiting the Goals</h2>
<p>Now to circle back around to what I was trying to accomplish with this type of chart. There were two main goals: preserving the continuity of the data and putting the data into the context of your day. </p>
<p>To preserve continuity I&#8217;ve duplicated the data, which allows for a nice continuous linear chart that covers any important time range. If you&#8217;re interested in day-time trends you can look at the top chart. If you&#8217;re interested in night-time trends you can look at the bottom chart. But in either case you get a full, continuous range to put the trend in context. </p>
<p>To further put the data in context I&#8217;ve added some simple coloring to highlight the day-time vs night-time ranges. The x-axis labels (showing 6am, noon, 6pm, etc) give you some further context that helps you categorize the data. If you split the chart in quadrants you get rough categories for morning (top-left), afternoon (top-right), evening (bottom-left) and night (bottom-right). </p>
<p><br style="padding-bottom:10px;" /></p>
<h2>The Big Caveat</h2>
<p>This is just a simple design experiment. I&#8217;m making no claims about the efficacy of this chart. I have not run any studies to validate that this chart is clear to viewers or is any better (or worse) than any other visualization. I don&#8217;t even know if I myself think this is an effective chart. I&#8217;m just trying to spur a bit of a discussion and some experimentation around the problem of visualizing cyclical hourly data. So what do you think?</p>
<p>I&#8217;ll be posting another (even more experimental) take on this same topic shortly. </p>
]]></content:encoded>
			<wfw:commentRss>http://dougmccune.com/blog/2011/04/26/visualizing-time-with-the-double-time-bar-chart/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Visualizing Cyclical Time &#8211; Hour of Day Charts</title>
		<link>http://dougmccune.com/blog/2011/04/21/visualizing-cyclical-time-hour-of-day-charts/</link>
		<comments>http://dougmccune.com/blog/2011/04/21/visualizing-cyclical-time-hour-of-day-charts/#comments</comments>
		<pubDate>Thu, 21 Apr 2011 14:28:56 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Data Visualization]]></category>

		<guid isPermaLink="false">http://dougmccune.com/blog/?p=1290</guid>
		<description><![CDATA[I&#8217;ve been mulling over a problem in my head for the past few days. How do you represent the hourly trends in data? More specifically, I&#8217;m talking about taking something like a whole year of crime records and showing the hourly trends of each type of crime, so you can see which crimes happen mostly [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been mulling over a problem in my head for the past few days. How do you represent the hourly trends in data? More specifically, I&#8217;m talking about taking something like a whole year of crime records and showing the hourly trends of each type of crime, so you can see which crimes happen mostly in the mornings and which ones happen when the bars close. I haven&#8217;t yet found a solution I&#8217;m happy with.<br />
<br style="padding-bottom:10px;" /></p>
<h2>A Multi-Part Mini-Series All About Time</h2>
<p>This is the first part of a few blog posts on this topic. Apologies ahead of time if you don&#8217;t find the topic of visualizing the 24 hours of the day as fascinating as I do, but I&#8217;m going to take the time to fully geek out and focus in on this very specific problem in depth.</p>
<p>This is <i>Part 1: Explaining the Challenge and Reviewing the Status Quo</i>. This is sort of like a lit review; it&#8217;s my attempt to consolidate everything I can find about how people are currently representing 24-hour cyclical data.<br />
<br style="padding-bottom:10px;" /></p>
<h3>Challenge: Continuity</h3>
<p>The 24 hours of the day are a continuous cycle. The &#8220;day&#8221; doesn&#8217;t end at any arbitrary time. A normal single day ends at 11:59pm, but that&#8217;s just an imaginary line. When you&#8217;re talking about a generalized 24 hours, 11:59pm leads straight into midnight, which continues on to 1am. And sometimes the most interesting trends are in those hours on either side of midnight.</p>
<p>Many line or bar charts that deal with the 24-hour cycle simply pick a point at which  the chart starts and ends. Sometimes the charts go from 12am-12am, sometimes they use ranges like 4am-4am (which puts the break during a time when most people are sleeping). For specific data this is often acceptable, but in general I find it to be a big limitation.<br />
<br style="padding-bottom:10px;" /></p>
<h3>Challenge: Personal Context</h3>
<p>We all have our daily routines. I wake up around 7:15, start work at 8, walk outside to get lunch around 12:30. For most people there&#8217;s a period in the morning and early evening when you&#8217;re coming and going from your home on the way to work. These moments bracket out experiences with time. We think about the day split into these chunks. Did something happen during the work day (roughly 8-5), or was it in the evening (roughly 5-8), or was it at night (9-12)? I think it&#8217;s safe to say that most people have a common notion of what morning, afternoon, evening, and night mean (even if those definitions vary a bit person to person). And each of us makes a mental organization of those time periods based on our own habits. When visualizing hourly trends I want to give people something they can relate to in the context of their daily schedules. </p>
<p>These issues aren&#8217;t easy to solve, and I&#8217;m reminded of a fantastic quote from the movie Closer:</p>
<blockquote><p>Time, what a tricky little fucker.</p></blockquote>
<p>Tricky, indeed.</p>
<p>Of course when it comes to visualizing the 24-hour cycle there are many more challenges than the few I&#8217;ve listed, but most of the other challenges fall into the general bucket of data visualization (as opposed to being very specific to the 24-hour cycle). Things like being able to accurately compare values against each other or being able to understand the chart without getting lost in confusion are things that are critical in all forms of data visualization.<br />
<br style="padding-bottom:10px;" /></p>
<h2>Line Charts</h2>
<p>One of the easiest methods of displaying data by hour of day is in a simple line series or bar chart. Typically these charts begin at a certain hour (often midnight) and show 24 unique bars or data points, ending at the same time they started. An example of this type of line chart is the following figure, taken from <a href="http://www.smu.ca/partners/iatur/24Final/24ch5.htm">The 24 Hour Society</a>.</p>
<p>This chart shows the percentage of people shopping at any given time of the day:<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/24_hour_shopping.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/24_hour_shopping-300x179.png" alt="" title="24_hour_shopping" width="300" height="179" class="alignnone size-medium wp-image-1299" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a><br />
That chart goes from midnight to 11pm, which works great for showing the trend for an activity like shopping (which occurs during the day). But the choice of the x-axis range isn&#8217;t as nice when looking at an activity where the important trend period includes midnight. </p>
<p>Here&#8217;s another chart from the same publication that shows when people are sleeping:<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/24_hour_sleeping.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/24_hour_sleeping-300x158.png" alt="" title="24_hour_sleeping" width="300" height="158" class="alignnone size-medium wp-image-1301" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a></p>
<p>In that case the interesting time period that we want to focus on is around 9pm &#8211; 7am, when people are going to sleep and waking up. But with an x-axis that starts at midnight we end up breaking the data directly in the middle of the interesting period. </p>
<p>Another <a href="http://www.nytimes.com/interactive/2009/07/31/business/20080801-metrics-graphic.html">example from the New York Times</a> analyzes similar data about the typical activities that people perform throughout the day.<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/nyt_24_hours.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/nyt_24_hours-300x155.png" alt="" title="nyt_24_hours" width="300" height="155" class="alignnone size-medium wp-image-1310" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a></p>
<p>The NYT chart starts at 4am instead of midnight, which does a bit of a better job showing the trend of when people go to sleep than an x-axis that starts at midnight. The 4am-4am axis does a good job at showing activities during the day (which is what it was designed to do). Luckily there aren&#8217;t many activities that people do that cross over that 4am break (other than sleeping). But what if there was an interesting trend we wanted to highlight that did span 4am? </p>
<p>The biggest problem I have with these charts is continuity. As a general visualization tool, how can you pick an arbitrary time to break the data? How are you sure the most interesting part of the data doesn&#8217;t overlap when the chart begins and ends?<br />
<br style="padding-bottom:10px;" /></p>
<h2>Circular Charts</h2>
<p>The problem of continuity that line charts have can often be overcome by using some form of circular chart. The cyclical nature of the 24-hour day lends itself well to a circular representation. There are a few different methods typically used to visualize the 24 hour cycle. Some charts use a 12 hour circle, which mimics the display of an analog clock. Others display a full 24 hour circle.<br />
<br style="padding-bottom:10px;" /></p>
<h3>12 Hour Clocks</h3>
<p>It&#8217;s often tempting to use analogies to the real world, especially when visualizing time. Everyone is used to reading the hands of an analog clock. At a glance we all know what each of the 12 numbers on the clock face mean, and we already have built in associations with the spatial layout. The big problem with using the metaphor of a clock is that a clock face is only broken up into 12 hours, which means that you can only show half your data at a time (or you need to somehow layer two series on top of each other).</p>
<h4>2 Clocks</h4>
<p>One attempt at solving the problem of the 12 hour clock is to use two of them, since with two clocks you now have enough space to show all 24 hours. Here&#8217;s an <a href="http://chandoo.org/wp/2008/08/14/plot-time-series-data-excel/">example</a> by <a href="http://chandoo.org/">Purna Duggirala</a> that is essentailly a bubble chart that uses two clocks side by side.</p>
<p><a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/two_clocks.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/two_clocks-300x163.png" alt="" title="two_clocks" width="300" height="163" class="alignnone size-medium wp-image-1336"  style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;"/></a></p>
<p>The biggest problem with the chart is the incorrect continuity. A single clock on its own isn&#8217;t a continuous range, it&#8217;s really only half a range. So the clock on the left is showing 12am &#8211; 12pm, but when you reach the end of the circle the data doesn&#8217;t continue on like the representation shows. Instead you need to jump over to the second clock and continue on around. It&#8217;s difficult to see the ranges right around both 12pm and 12am, since you lose context in one direction or another (and worse, you get the incorrect context from the bordering bubbles).</p>
<h4>Polar Spiral Clock</h4>
<p>In a great show of Internet collaboration, the double clock chart spurred some other experimentation. Jorge Camos<a href="http://www.excelcharts.com/blog/charting-around-the-clock/"> came up with a polar chart</a> that plots the data on a single &#8220;clock face,&#8221; showing two 12 hour charts overlaid on top of each other.<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/polar_chart2.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/polar_chart2-300x256.png" alt="" title="polar_chart2" width="300" height="256" class="alignnone size-medium wp-image-1345" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a></p>
<p>This then led to <a href="http://peltiertech.com/WordPress/rock-around-the-clock/">another iteration</a> that makes the continuation of the data series clearer. <a href="http://peltiertech.com">Jon Peltier</a> modified the polar chart to show a line series connecting the hours.<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/polar_chart3.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/polar_chart3-300x230.png" alt="" title="polar_chart3" width="300" height="230" class="alignnone size-medium wp-image-1348" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a></p>
<p>Without experimenting more with this kind of polar chart, I can&#8217;t make up my mind about whether it&#8217;s effective or not. But I do really like the ingenuity.<br />
<br style="padding-bottom:10px;" /></p>
<h3>24 Hour Circles</h3>
<p>Given that the 12-hour clock is a difficult metaphor to use for a visualization, many people choose to use a 24-hour circle. 24-hour circular charts typically start with midnight at the top of the chart and then proceed clockwise, showing all 24 hours in one 360-degree range. The benefit of a 24-hour circular chart is that the cyclical nature of the data is represented and the viewer can easily read the continuity at any point on the chart. </p>
<p>A simple example of a 24-hour circle comes from <a href="http://stamen.com">Stamen Design</a>&#8216;s <a href="http://oakland.crimespotting.org/">Crimespotting</a>. This isn&#8217;t a data-heavy visualization chart, since it doesn&#8217;t actually show any data other than sunrise and sunset times (instead it&#8217;s main purpose is as a filtering control). But it&#8217;s a good example of the general layout of 24-hour charts, and it&#8217;s very clean and well-labeled. You can read about the thinking that went into designing this &#8220;time of pie&#8221; on <a href="http://content.stamen.com/node/171">Stamen&#8217;s blog</a>.<br />
<img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/crimespotting_time_pie.png" alt="" title="crimespotting_time_pie" width="141" height="133" class="alignnone size-full wp-image-1359" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></p>
<p>The inspiration for this time selector, which is documented in Tom Carden&#8217;s <a href="http://www.tom-carden.co.uk/2009/06/02/historical-hurricanes-oakland-crime/">blog post</a>, was the real-life timer control used for automating lights in your house.<br />
<img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/real_life_time_pie-150x150.png" alt="" title="real_life_time_pie" width="150" height="150" class="alignnone size-thumbnail wp-image-1360" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;"   /></p>
<p>If you&#8217;ve decided to use a 24-hour circular chart then you&#8217;ll need a way to visualize your data. The main methods I&#8217;ve found for visualizing data around a circle include sized wedges, colored arcs/wedges, sized bubbles positioned around the chart, or sized spokes. I&#8217;ll cover just a few of these (sized wedges and colored arcs).</p>
<h4>Wedges</h4>
<p>Perhaps the most well-known radial chart that uses differently sized wedges is Florence Nightingale&#8217;s <a href="http://understandinguncertainty.org/coxcombs">coxcomb chart</a> from 1857 that shows the causes of death during the  Crimean War.<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/coxcomb.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/coxcomb-277x300.png" alt="" title="coxcomb" width="277" height="300" class="alignnone size-medium wp-image-1374" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a></p>
<p>Nightingale&#8217;s chart shows 12 months of data, each wedge corresponds with a single month. The same technique can easily be applied to hourly data as well. Instead of 12 wedges an hourly chart would have 24, but the same general principle applies. Wedges always use the same angles (as opposed to typical pie charts) and modify the radius to size the wedge based on the data.</p>
<p>If you&#8217;re thinking about using this type of chart I&#8217;d highly recommend reading over <a href="http://dd.dynamicdiagrams.com/2008/01/nightingales-rose/">this critique</a> that highlights some common problems with the approach.</p>
<p>An alternative take on using wedge size around a circular chart can be found in Antonio Gabaglio&#8217;s <a href="http://books.google.com/books?id=YyhBAAAAIAAJ&#038;printsec=frontcover">Storia e Teoria Generale Della Statistica</a>, which was written in 1880. Gabaglio created a few charts that also plotted data by month in a circular fashion. He used a few different wedge orientations:<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/gabaglio.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/gabaglio-300x140.png" alt="" title="gabaglio" width="300" height="140" class="alignnone size-medium wp-image-1395" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a></p>
<p>I haven&#8217;t seen this method used to represent data by hour of day, but the same technique could easily apply.</p>
<h4>Colored Arcs/Wedges</h4>
<p>Another way to represent data around a circle is to use bands of color. An interesting article, <a href="http://www.palgrave-journals.com/ivs/journal/v7/n3/full/9500184a.html"><i>Activities, ringmaps and geovisualization of large human movement fields</i></a>, by Jinfeng Zhao, Pip Forer, and Andrew Harvey explains a data viz approach they call a &#8220;Ringmap.&#8221; The article itself isn&#8217;t freely available, but you can access<a href="http://geoanalytics.net/GeoVis08/a25.pdf"> this condensed version</a> to get the gist, or take a look at <a href="http://geoanalytics.net/GeoVis08/s1-4.pdf">this presentation</a> for more good illustrations of the technique.<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/time_ring_colors.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/time_ring_colors-300x239.png" alt="" title="time_ring_colors" width="300" height="239" class="alignnone size-medium wp-image-1383" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a></p>
<p>Here are a few more complex examples of using ringmaps:<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/time_ring22.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/time_ring22-300x138.png" alt="" title="time_ring2" width="300" height="138" class="alignnone size-medium wp-image-1390" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a></p>
<p>Ringmaps can also represent multiple series of data. Comparing multiple series was actually the main intention of the authors. With multiple series the data forms multiple rings, one around the other. That allows for comparison of the same cycle periods between data series. Comparing multiple data series is a bit outside the scope of this article (and god knows this is getting long enough), so I won&#8217;t go into detail.</p>
<p><br style="padding-bottom:10px;" /></p>
<h2>Spirals</h2>
<p>Spirals are similar to circular charts, but are used with slightly different data. They don&#8217;t really apply directly to the task I&#8217;m concerned with in this article, but they&#8217;re interesting in their own right and deserve a mention. Like circle charts, spirals are used to represent cyclical data, such as data that occurs over a 24-hour period. But spirals typically show many iterations of the data (ie many series) in a spiral layout. So instead of showing aggregate numbers (ie a single set of numbers showing the total number of occurrences in each hour), a spiral chart might show many individual days worth of data, all in a connected sequence.</p>
<p>Here&#8217;s a spiral chart of data tracking sunshine intensity, from the paper <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.19.65&#038;rep=rep1&#038;type=pdf"><i>Visualizing Time-Series on Spirals</i></a> by Marc Alexa. By visualizing many individual days worth of data at the same time you can start to identify patterns and find abnormalities.<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/sun_spiral.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/sun_spiral-292x300.png" alt="" title="sun_spiral" width="292" height="300" class="alignnone size-medium wp-image-1404" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a></p>
<p>Here&#8217;s one last spiral example, which was published by a fellow Flex developer, <a href="http://michaelvandaniker.com/blog/">Michael VanDaniker</a>. In his paper, <a href="http://trb.metapress.com/content/y76l182257304480/"><i>Leveraging the Spiral Graph for Transportation System Data Visualization</i></a>, VanDaniker provides the following example of using a spiral representation to show the pattern of traffic collisions on the different days of the week (and the hours of the day during those days).<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/vandankier_spiral.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/vandankier_spiral-300x200.png" alt="" title="vandankier_spiral" width="300" height="200" class="alignnone size-medium wp-image-1409" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a></p>
<p>Spirals are a bit outside the scope of the problem I&#8217;m trying to solve, but since they are used for identifying patterns in periodic data they fall within the same ballpark.<br />
<br style="padding-bottom:10px;" /></p>
<h2>Continuous Circles vs Terminal Lines</h2>
<p>One final point I want to make before closing has to do with weighing the benefits of circular visualizations (continuous) over line or bar charts (terminal, since they have a beginning and end). The continuity offered by circular charts makes them seem like a good choice, but it might be worth taking a critical stance when it comes to choosing circular charts versus line or bar charts. </p>
<p>I haven&#8217;t been able to find many studies that have examined how effective circular data visualization techniques are over linear ones, but I did come across a dissertation from 2008 by a Stanford Psychology student, Angela Kessell. Kessell&#8217;s dissertation, titled <i><a href="http://www.stanford.edu/dept/psychology/webd/system/files/Kessell_Dissertation.08.pdf">Cognitive Methods for Information Visualization: Linear and Cyclical Events</a></i>, examines how people choose to represent cycles, and finds that in many cases the majority of people draw cyclical data (things like the water cycle, the four seasons, etc) in a linear fashion and not as circles as we might expect. </p>
<p>When we choose to represent cyclical data it might seem like using a circular representation is the most intuitive and obvious choice, but Kessell&#8217;s research makes you question whether people&#8217;s brains intuitively think of cyclical data in a circular fashion or if they instead think of cyclical data in a linear way. Without jumping to any hard conclusions, I just want to point out the idea that maybe our brains more effectively conceptualize linear representations.</p>
<p><br style="padding-bottom:10px;" /></p>
<h2>Whew</h2>
<p>So that&#8217;s my attempt at an exhaustive run-down on the current state of the industry when it comes to visualizing cyclical 24-hour data. If you made it this far, I salute you.</p>
<p>The next parts in this mini-series about time charts will be some experiments that I&#8217;ve been working on to try some new ideas for visualizing time data. As a teaser for the upcoming posts, here are some images that I&#8217;ll be explaining soon in subsequent posts.</p>
<p>These are coming soon:<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/experimental_chart.png"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/experimental_chart-300x149.png" alt="" title="experimental_chart" width="300" height="149" class="alignnone size-medium wp-image-1431" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a><br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2011/04/napkin.jpg"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/04/napkin-300x287.jpg" alt="" title="napkin" width="300" height="287" class="alignnone size-medium wp-image-1428" style="border:1px solid silver; padding:5px; margin:10px; background-color:#FFFFFF;" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://dougmccune.com/blog/2011/04/21/visualizing-cyclical-time-hour-of-day-charts/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Ethics and the use of DUI data</title>
		<link>http://dougmccune.com/blog/2011/03/23/ethics-and-the-use-of-dui-data/</link>
		<comments>http://dougmccune.com/blog/2011/03/23/ethics-and-the-use-of-dui-data/#comments</comments>
		<pubDate>Wed, 23 Mar 2011 21:44:34 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[cime]]></category>
		<category><![CDATA[Data Visualization]]></category>
		<category><![CDATA[datasf]]></category>
		<category><![CDATA[san francisco]]></category>
		<category><![CDATA[SpatialKey]]></category>

		<guid isPermaLink="false">http://dougmccune.com/blog/?p=1275</guid>
		<description><![CDATA[I do a lot of work with San Francisco crime data, and one of the things that I&#8217;ve been struggling with is one particular dataset: the locations of all the driving under the influence (DUI) arrests in the city. Just yesterday there was an article about US Senators asking Apple to remove DUI checkpoint applications [...]]]></description>
			<content:encoded><![CDATA[<p>I do a lot of work with San Francisco crime data, and one of the things that I&#8217;ve been struggling with is one particular dataset: the locations of all the driving under the influence (DUI) arrests in the city. Just yesterday there was an <a href="http://news.cnet.com/8301-13579_3-20045942-37.html">article</a> about US Senators asking Apple to remove DUI checkpoint applications from the app store.</p>
<p>San Francisco publishes a huge amount of crime data, going all the way back to 2003. You can <a href="http://apps.sfgov.org/datafiles/index.php?dir=Police&#038;by=name&#038;order=asc">grab a single CSV file</a> with all the data. Over a million crimes. It&#8217;s beautiful.</p>
<p>If you look at just the DUI records you start seeing patterns. Here&#8217;s about a thousand DUIs over the past 2 years (2009-2010). Click any of these images for larger versions of the maps.</p>
<p><a href="http://dougmccune.com/blog/wp-content/uploads/2011/03/spatialkey_duis_points.jpg"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/03/spatialkey_duis_points-300x222.jpg" alt="" title="spatialkey_duis_points" width="300" height="222" class="aligncenter size-medium wp-image-1278" /></a></p>
<p>If we look at a density map individual streets start lighting up. Specific intersections stand out. </p>
<p><a href="http://dougmccune.com/blog/wp-content/uploads/2011/03/spatialkey_duis_heatmap.jpg"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/03/spatialkey_duis_heatmap-300x222.jpg" alt="" title="spatialkey_duis_heatmap" width="300" height="222" class="aligncenter size-medium wp-image-1279" /></a></p>
<p>Here&#8217;s a representation that assigns the number of DUIs to the street segment they occurred on and colors the data like a typical traffic map.</p>
<p><a href="http://dougmccune.com/blog/wp-content/uploads/2011/03/spatialkey_duis_traffic.jpg"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/03/spatialkey_duis_traffic-300x222.jpg" alt="" title="spatialkey_duis_traffic" width="300" height="222" class="aligncenter size-medium wp-image-1280" /></a></p>
<p>And finally just for fun, here&#8217;s a 3D rendering of the same 2 years of data:</p>
<p><a href="http://dougmccune.com/blog/wp-content/uploads/2011/03/3D_duis.jpg"><img src="http://dougmccune.com/blog/wp-content/uploads/2011/03/3D_duis-300x211.jpg" alt="" title="3D_duis" width="300" height="211" class="aligncenter size-medium wp-image-1281" /></a></p>
<p>It&#8217;s compelling data, and fairly easy to tell an interesting story. But is there an ethical issue around visualizing or using this data? There&#8217;s a lot that you can do with the data, obviously visualizations like this are just scratching the surface.</p>
<p><strong>An idea that crosses the line</strong></p>
<p>Following one train of thought to its logical conclusion leads me to a mobile app idea. It&#8217;s a simple app, essentially just a routing application. You type in where you&#8217;re going and you can get directions from your current location, just like any other mapping or GPS routing application. Except we can give you directions that avoid known DUI hotspots. In a very simplified sense, routing algorithms basically give streets a score, usually determined based on factors like speed limit, road size, distance, etc. The path with the lowest score wins, and that&#8217;s what you end up getting for your directions. All you&#8217;d have to do to route around common DUI locations is make the number of historical DUIs along a street segment count in the routing algorithm&#8217;s calculation. Streets with lots of historical DUIs would be avoided in favor of side streets with fewer arrests. You&#8217;d avoid Geary Blvd and intersections like 16th St and Mission St.</p>
<p>It&#8217;s an easy app and the data is there for the taking. I&#8217;ll leave aside the question of whether the idea would work in terms of being effective at making drunk drivers avoid actual arrest. For argument&#8217;s sake, let&#8217;s assume that it would work, or that some other similar type of app could. It&#8217;s not an app I&#8217;d build, and I assume pretty much everyone understands the moral objection. </p>
<p>I don&#8217;t have any big moral takeaway or conclusion. On the one hand there are arguments that data and knowledge can never inherently be bad. Then there are arguments that this particular data (or at least specifically a DUI-avoiding directions app) would only be used to encourage drunk driving. I&#8217;m not going to make the DUI-avoiding mobile app, that goes way too far down the path of encouraging bad behavior. But it brings up a lot of interesting questions we need to think about as we&#8217;re working with data like this.</p>
]]></content:encoded>
			<wfw:commentRss>http://dougmccune.com/blog/2011/03/23/ethics-and-the-use-of-dui-data/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Iraq Death Dots &#8211; Visualizing Each Death in the Wikileaks Iraq War Logs</title>
		<link>http://dougmccune.com/blog/2010/11/29/iraq-death-dots-visualizing-each-death-in-the-wikileaks-iraq-war-logs/</link>
		<comments>http://dougmccune.com/blog/2010/11/29/iraq-death-dots-visualizing-each-death-in-the-wikileaks-iraq-war-logs/#comments</comments>
		<pubDate>Mon, 29 Nov 2010 15:30:29 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Data Visualization]]></category>
		<category><![CDATA[Iraq]]></category>
		<category><![CDATA[Wikileaks]]></category>

		<guid isPermaLink="false">http://dougmccune.com/blog/?p=1242</guid>
		<description><![CDATA[What would 108,394 deaths look like? I&#8217;ve been combing through the Wikileaks Iraq War Logs dataset and experimenting with different visualizations. This new one shows each individual death logged in the data. A single death is drawn as a single dot. The color of the dot indicates who was killed: either a civilian, a coalition [...]]]></description>
			<content:encoded><![CDATA[<p>What would 108,394 deaths look like?</p>
<p>I&#8217;ve been combing through the Wikileaks Iraq War Logs dataset and experimenting with different visualizations. This new one shows each individual death logged in the data. A single death is drawn as a single dot. The color of the dot indicates who was killed: either a civilian, a coalition soldier, an Iraqi soldier, or an enemy combatant. These classifications are taken directly from the military records, I did not categorize the data myself in any way. The dataset documents exactly 108,394 deaths, so exactly 108,394 dots are drawn. </p>
<p>Coalition soldiers are white dots, Iraqi forces are gray dots, enemy forces are blue dots, and civilians are red dots. At a glance you can see the shift from the heavy blue in the early days of the war to the overwhelming red. Let that soak in for a second. Every red dot is a civilian life.</p>
<p>The live visualization is embedded below. Or view a <a href="http://dougmccune.com/iraq_death_dots/">larger standalone version</a>.</p>
<p>
<object type="application/x-shockwave-flash" width="500" height="700">
<param name="movie" value="http://dougmccune.com/iraq_death_dots/IraqCount.swf" />
<embed src="http://dougmccune.com/iraq_death_dots/IraqCount.swf" type="application/x-shockwave-flash" width="500" height="700" >
</object>
</p>
<p>Explore the visualization by selecting a different tab along the top (Years, Months, Incident Type, Category, Casualty Type) or by using the plus and minus buttons to zoom in and out of the visualization. I encourage you to experience the visualization in full screen (use the full-screen button on the bottom-right).</p>
<p><strong>The data</strong><br />
This dataset uses the <a href="http://www.guardian.co.uk/news/datablog/2010/oct/23/wikileaks-iraq-data-journalism#data">dataset produced by the Guardian</a>, which filtered the full WIkileaks dataset to only include records with one or more deaths logged. It contains 52,048 records that document 108,394 deaths.</p>
<p>Please note that this data only contains incidents documented by <a href="http://en.wikipedia.org/wiki/Multi-National_Force_%E2%80%93_Iraq">Multi-National Force &#8211; Iraq</a> and presents only a partial, incomplete record of the war. Please see <a href="http://www.guardian.co.uk/news/datablog/2010/oct/25/wikileaks-iraq-data">this article</a> about issues with this dataset.</p>
<p><strong>Inspiration</strong><br />
This work was inspired by <a href="http://melka.one.free.fr/">Kamel Makhloufi</a>, who created some <a href="http://www.flickr.com/photos/melkaone/5121285002/">fantastic images</a> that colored individual pixels by the type of casualty.<br />
<a href="http://www.flickr.com/photos/melkaone/5121285002/"><img src="http://dougmccune.com/blog/wp-content/uploads/2010/11/function.gif" alt="" title="function" width="300" height="155" class="alignnone size-full wp-image-1243" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://dougmccune.com/blog/2010/11/29/iraq-death-dots-visualizing-each-death-in-the-wikileaks-iraq-war-logs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Take the Tangent &#8211; Video of my 360&#124;Flex Keynote</title>
		<link>http://dougmccune.com/blog/2010/10/24/take-the-tangent-video-of-my-360flex-keynote/</link>
		<comments>http://dougmccune.com/blog/2010/10/24/take-the-tangent-video-of-my-360flex-keynote/#comments</comments>
		<pubDate>Sun, 24 Oct 2010 19:57:59 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[360Flex]]></category>
		<category><![CDATA[Data Visualization]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[SpatialKey]]></category>

		<guid isPermaLink="false">http://dougmccune.com/blog/?p=1170</guid>
		<description><![CDATA[I was honored to be asked to give a keynote presentation at 360&#124;Flex in DC last month. All the sessions were recorded, and John Wilker was gracious enough to let me post the full video of my keynote. This keynote was a bit different. I went out on a limb a bit and talked about [...]]]></description>
			<content:encoded><![CDATA[<p>I was honored to be asked to give a keynote presentation at <a href="http://www.360flex.com/">360|Flex</a> in DC last month. All the sessions were recorded, and John Wilker was gracious enough to let me post the full video of my keynote.</p>
<p>This keynote was a bit different. I went out on a limb a bit and talked about the experimental projects that I&#8217;ve been working on, and my belief in the importance of pursuing fun experiments to stay invigorated and passionate about our work. It covers a number of mapping and data visualization projects I&#8217;ve been playing with, but the point was really that we all need to pursue what we&#8217;re passionate about. For me that happens to be maps right now, but everyone has their own unique areas of interest.</p>
<p>If you&#8217;re interested in mapping work then the projects I talk about should be right up your alley. But even if you&#8217;re not a map geek, I think the presentation is still interesting and (I hope!) inspirational.</p>
<p><iframe src="http://player.vimeo.com/video/16128330?portrait=0" width="450" height="281" frameborder="0"></iframe></p>
<p>You can also see the <a href="http://www.slideshare.net/dougmccune/take-the-tangent-5271740">slide deck on its own</a>, but I think the video gives much better context to the slides.</p>
]]></content:encoded>
			<wfw:commentRss>http://dougmccune.com/blog/2010/10/24/take-the-tangent-video-of-my-360flex-keynote/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If San Francisco Crime were Elevation</title>
		<link>http://dougmccune.com/blog/2010/06/05/if-san-francisco-crime-was-elevation/</link>
		<comments>http://dougmccune.com/blog/2010/06/05/if-san-francisco-crime-was-elevation/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 22:28:11 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Data Visualization]]></category>
		<category><![CDATA[datasf]]></category>
		<category><![CDATA[geospatial]]></category>
		<category><![CDATA[GIS]]></category>

		<guid isPermaLink="false">http://dougmccune.com/blog/?p=1141</guid>
		<description><![CDATA[I&#8217;ve been playing with different ways of representing data (see my previous night lights example) and I decided to venture into 3D representations. I&#8217;ve used a full year of crime data for San Francisco from 2009 to create these maps. The full dataset can be download from the city&#8217;s DataSF website. A view from above [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing with different ways of representing data (see my previous <a href="http://dougmccune.com/blog/2009/12/30/data-visualized-as-city-lights-at-night/">night lights example</a>) and I decided to venture into 3D representations. I&#8217;ve used a full year of crime data for San Francisco from 2009 to create these maps. The full dataset can be download from the <a href="http://datasf.org/story.php?title=crime-incident-data">city&#8217;s DataSF website</a>.</p>
<p><strong>A view from above</strong><br />
This view shows different types of crime in San Francisco viewed directly from above. The sun is shining from the east, as it would during sunrise. </p>
<p><img src="http://dougmccune.com/blog/wp-content/uploads/2010/06/top_500.jpg" alt="top_500" align="none" width="500" height="803" class="attachment wp-att-1142 " /></p>
<p>I love how some of the features in these maps are pretty consistent across all the crime types, like the mountain ridge along Mission St., and how some of the features only crop up in one or two of the maps. The most unique map by far is the one for prostitution (more on that further down).</p>
<p><strong>An alternate view</strong><br />
Here&#8217;s the same data but from a different angle, which helps show some of the differences.</p>
<p><strong>UPDATE:</strong> Whoops, I screwed up originally and had a duplicate image. The original graphic showed the same map for Vandalism and Assault (both were the Vandalism map). This updated graphic has the correct map for Assault.</p>
<p><img src="http://dougmccune.com/blog/wp-content/uploads/2010/06/right_500_2.jpg" alt="right_500_2" align="none" width="500" height="803" class="attachment wp-att-1158 " /></p>
<p>Many of the maps have peaks in the Tenderloin, which is that high area sort of in the north-east center area of the city. Some are extremely concentrated (narcotics) and some are far more spread out (vehicle theft).</p>
<p>My favorite map is the one for prostitution (maybe &#8220;favorite&#8221; is the wrong choice of words there). Nearly all the arrests for prostitution in San Francisco occur along what I&#8217;m calling the <del datetime="2010-06-07T22:51:13+00:00">&#8220;Mission Mountain Ridge&#8221;, which runs up Mission St between 24th and 16th</del>. </p>
<p><strong>EDIT:</strong> I&#8217;ve been corrected. Upon closer inspection the prostitution arrests are peaking on Shotwell St. at the intersections of 19th and 17th. I&#8217;m sure the number of colorful euphemisms you can come up with that include the words &#8220;shot&#8221; and &#8220;well&#8221; are endless.  </p>
<p>I love the way the mountain range casts a shadow over much of the city. There&#8217;s also a second peak in the Tenderloin (which I&#8217;m dubbing Mt. Loin). </p>
<p><img src="http://dougmccune.com/blog/wp-content/uploads/2010/06/prostitution_500.jpg" alt="prostitution_500" align="none" width="500" height="1158" class="attachment wp-att-1144 " /></p>
<p>Drug crimes are also interesting to look at, since so much of the drug activity in San Francisco is centered in a few distinct areas. We can see Mt. Loin rising high above all the other small peaks. The second highest peak is the 16th St. BART peak.</p>
<p><img src="http://dougmccune.com/blog/wp-content/uploads/2010/06/drugs_500.jpg" alt="drugs_500" align="none" width="500" height="1158" class="attachment wp-att-1146 " /></p>
<p>There are other consistent features in these maps, in addition to Mt. Loin and the Mission Range. There&#8217;s a valley that separates the peaks in the Mission and the peaks in the Tenderloin, which is where the freeway runs (Valley 101). You&#8217;ll also notice a division in many of the maps that separates the southeast corner. That&#8217;s the Hunter&#8217;s Point Riverbed (aka the 280 freeway).</p>
<p><strong>Disclaimer</strong><br />
These maps were generated from real data, but please don&#8217;t take them as being accurate. The data was aggregated geographically and artistically rendered. This is meant more as an art piece than an informative visualization. </p>
]]></content:encoded>
			<wfw:commentRss>http://dougmccune.com/blog/2010/06/05/if-san-francisco-crime-was-elevation/feed/</wfw:commentRss>
		<slash:comments>253</slash:comments>
		</item>
		<item>
		<title>The New York Times Without Flash</title>
		<link>http://dougmccune.com/blog/2010/01/28/the-new-york-times-without-flash/</link>
		<comments>http://dougmccune.com/blog/2010/01/28/the-new-york-times-without-flash/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 22:14:31 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Data Visualization]]></category>
		<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPod]]></category>

		<guid isPermaLink="false">http://dougmccune.com/blog/?p=1048</guid>
		<description><![CDATA[I&#8217;m in love with the New York Times data visualization/infographics division. They consistently put out some of the most amazing visualization pieces (both in print and online) that I&#8217;ve ever seen. Their recently geographic analysis of Netflix ratings was absolutely superb. And we all probably saw their election maps (either for 2008 or 2004). They [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in love with the New York Times data visualization/infographics division. They consistently put out some of the most amazing visualization pieces (both in print and online) that I&#8217;ve ever seen. Their recently geographic analysis of Netflix ratings was absolutely superb. And we all probably saw their election maps (either for 2008 or 2004). They produce stunning displays that convey amazing amounts of information in a way that only interactive graphics can do. And they&#8217;re all done in Flash.</p>
<p><a title="nyt_netflix" href="http://dougmccune.com/blog/wp-content/uploads/2010/01/nyt_netflix.png"><img class="attachment wp-att-1053 " style="border: 1px solid silver; width: 400px;" src="http://dougmccune.com/blog/wp-content/uploads/2010/01/nyt_netflix.thumbnail.png" alt="nyt_netflix" width="400" height="262" align="none" /></a><a href="http://www.nytimes.com/interactive/2010/01/10/nyregion/20100110-netflix-map.html"><br />
A Peek Into Netflix Queues</a></p>
<p><br style="clear: both;" /></p>
<div style="float: left; margin-right: 10px;"><a title="nyt_thanksgiving_recipes" href="http://dougmccune.com/blog/wp-content/uploads/2010/01/nyt_thanksgiving_recipes.png"><img class="attachment wp-att-1056 " style="border: 1px solid silver; width: 200px;" src="http://dougmccune.com/blog/wp-content/uploads/2010/01/nyt_thanksgiving_recipes.thumbnail.png" alt="nyt_thanksgiving_recipes" width="200" height="140" align="none" /></a><br />
<a href="http://www.nytimes.com/interactive/2009/11/26/us/20091126-search-graphic.html">What&#8217;s Cooking For Thanksgiving</a></div>
<div><a title="nyt_swineflu" href="http://dougmccune.com/blog/wp-content/uploads/2010/01/nyt_swineflu.png"><img class="attachment wp-att-1081 " style="border: 1px solid silver; width: 200px;" src="http://dougmccune.com/blog/wp-content/uploads/2010/01/nyt_swineflu.thumbnail.png" alt="nyt_swineflu" width="200" height="129" align="none" /></a><br />
<a href="http://www.nytimes.com/interactive/2009/04/27/us/20090427-flu-update-graphic.html">Swine Flu Cases Map</a></div>
<p><br style="clear: both;" /></p>
<div style="float: left; margin-right:10px;"><a title="nyt_unemployment_explorer" href="http://dougmccune.com/blog/wp-content/uploads/2010/01/nyt_unemployment_explorer.png"><img class="attachment wp-att-1061 " style="border: 1px solid silver; width: 200px;" src="http://dougmccune.com/blog/wp-content/uploads/2010/01/nyt_unemployment_explorer.thumbnail.png" alt="nyt_unemployment_explorer" width="200" height="106" align="none" /></a><br />
<a href="http://www.nytimes.com/interactive/2009/11/06/business/economy/unemployment-lines.html">The Jobless Rate for People Like You</a></div>
<div><a title="nyt_vtech" href="http://dougmccune.com/blog/wp-content/uploads/2010/01/nyt_vtech.png"><img class="attachment wp-att-1080 " style="border: 1px solid silver; width: 200px;" src="http://dougmccune.com/blog/wp-content/uploads/2010/01/nyt_vtech.thumbnail.png" alt="nyt_vtech" width="200" height="101" align="none" /></a><br />
<a href="http://www.nytimes.com/2007/04/17/us/20070417_SHOOTING_GRAPHIC.html">Virginia Tech Shooting</a></div>
<p><br style="clear: both;" /></p>
<div style="float: left; margin-right:10px;"><a title="nyt_parkingtickets" href="http://dougmccune.com/blog/wp-content/uploads/2010/01/nyt_parkingtickets.png"><img class="attachment wp-att-1062 " style="border: 1px solid silver; width: 200px;" src="http://dougmccune.com/blog/wp-content/uploads/2010/01/nyt_parkingtickets.thumbnail.png" alt="nyt_parkingtickets" width="200" height="143" align="none" /></a><br />
<a href="http://www.nytimes.com/interactive/2008/11/26/nyregion/20081128_PARKING.html">Map of Parking Tickets in New York City</a></div>
<div><a href="http://dougmccune.com/blog/wp-content/uploads/2010/01/nyt_how_people_spend_their_day.png" title="nyt_how_people_spend_their_day"><img src="http://dougmccune.com/blog/wp-content/uploads/2010/01/nyt_how_people_spend_their_day.thumbnail.png" alt="nyt_how_people_spend_their_day" align="none" width="200" height="122" class="attachment wp-att-1088 " /></a><br />
<a href="http://www.nytimes.com/interactive/2008/11/26/nyregion/20081128_PARKING.html">How Different Groups Spend Their Day</a></div>
<p><br style="clear: both;" /></p>
<p>And for even more check out the <a href="http://www.nytimes.com/packages/html/newsgraphics/2009/ona/index.html">NYT&#8217;s selected infographics</a> list or simply do a Google <a href="http://www.google.com/search?q=site%3Anytimes.com+experimental+visualization">search for &#8220;interactive graphic&#8221;</a> on the New York Times website.</p>
<p><a title="flash" href="http://dougmccune.com/blog/wp-content/uploads/2010/01/flash.jpeg"><img class="attachment wp-att-1071 " style="border: 1px solid silver; margin-left: 10px;" src="http://dougmccune.com/blog/wp-content/uploads/2010/01/flash.thumbnail.jpeg" alt="flash" width="200" height="132" align="right" /></a>So when you see images showing the missing plugin icon on the New York Times website on the iPad or iPhone, that&#8217;s not just some annoying ad that&#8217;s not playing or a streaming video. <strong>That&#8217;s some of the most cutting edge visualization work that&#8217;s being produced today.</strong> And without Flash it simply doesn&#8217;t exist.</p>
<p>Sure, you might be able to recreate some of these without using Flash (I&#8217;d argue that many you simply would never be able to do, but that&#8217;s for another debate). But the point isn&#8217;t whether or not you could eventually do it without Flash. The point is that the New York Times does them <strong>all with flash</strong>. So we need to ask why. It&#8217;s not an accident or an arbitrary technology choice. Newspapers operate on a schedule and a budget (and one that is getting tighter and tighter). The simple truth is, creating amazing visualizations like you see on the NYT website is possible and easy with Flash. They use the tools that get the job done most efficiently and produce the best end result. This isn&#8217;t an argument about whether it&#8217;s theoretically possible to create these types of visualizations without Flash, it&#8217;s about whether it&#8217;s being done. And save for <a href="http://vis.stanford.edu/protovis/">handfuls of examples</a>, it&#8217;s not (for every one good JavaScript visualization I&#8217;ll show you ten good Flash ones). Taking away the New York Times&#8217; ability to use Flash is setting their data visualization department back 5 or 10 years. And it would mean that we, as readers and citizens, would be missing out on some of the most important journalism being produced today.</p>
<p>The New York Times (like all newspapers) is in crisis. They are trying to reinvent themselves in an online form. And as a news organization they are one of the most progressive and experimental out there. They are embracing the new medium by doing some of the best damn interactive graphic work I&#8217;ve ever seen. They make things that convey news and information in ways that draw people in and keep them coming back for more.</p>
<p>But without Flash they&#8217;re just a newspaper. And we all know newspapers are dying.</p>
]]></content:encoded>
			<wfw:commentRss>http://dougmccune.com/blog/2010/01/28/the-new-york-times-without-flash/feed/</wfw:commentRss>
		<slash:comments>42</slash:comments>
		</item>
		<item>
		<title>Recreating William Playfair&#8217;s Import/Export Charts</title>
		<link>http://dougmccune.com/blog/2010/01/19/recreating-william-playfairs-importexport-charts/</link>
		<comments>http://dougmccune.com/blog/2010/01/19/recreating-william-playfairs-importexport-charts/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 16:16:06 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Data Visualization]]></category>
		<category><![CDATA[History]]></category>
		<category><![CDATA[William Playfair]]></category>

		<guid isPermaLink="false">http://dougmccune.com/blog/?p=1014</guid>
		<description><![CDATA[I&#8217;ve been reading William Playfair&#8217;s Commercial and Political Atlas, in which he invented the line chart. In the book, Playfair examines the imports and exports between Britain and various countries. To illustrate these trade relationships, Playfair created the first ever line charts that show the change in trade over time. The Inspiration Each section of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been reading William Playfair&#8217;s Commercial and Political Atlas, in which he invented the line chart. In the book, Playfair examines the imports and exports between Britain and various countries. To illustrate these trade relationships, Playfair created the first ever line charts that show the change in trade over time. </p>
<p><strong>The Inspiration</strong><br />
Each section of the book covered a different country, and each one contained a chart that showed the imports and exports like this:</p>
<p><a title="playfair_north_america_trade2" href="http://dougmccune.com/blog/wp-content/uploads/2010/01/playfair_north_america_trade2.jpg"><img class="attachment wp-att-900 " src="http://dougmccune.com/blog/wp-content/uploads/2010/01/playfair_north_america_trade2.thumbnail.jpg" alt="playfair_north_america_trade2" width="400" height="223" align="none" /></a><br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2010/01/playfair_ireland.jpg" title="playfair_ireland"><img src="http://dougmccune.com/blog/wp-content/uploads/2010/01/playfair_ireland.thumbnail.jpg" alt="playfair_ireland" align="none" width="400" height="239" class="attachment wp-att-1015 " /></a><br />
Two line series are shown, one for imports and one for exports, and shading is used to show when there was a &#8220;balance in favor of England&#8221; (when there were more exports than imports). </p>
<p><strong>My Recreation</strong><br />
I&#8217;ve been captivated by these charts and wanted to recreate them, but with modern data. You can find <a href="http://www.census.gov/foreign-trade/balance/index.html">tons of US trade data</a> at the US Census Bureau&#8217;s website, including a <a href="http://www.census.gov/foreign-trade/balance/country.zip">spreadsheet</a> that has all the data in one place. I downloaded that data and put together a little application to create Playfair-esque charts.</p>
<p>Click this screenshot to <a href="http://dougmccune.com/flex/recreatingPlayfair/">play with the app yourself</a>:<br />
<a href="http://dougmccune.com/flex/recreatingPlayfair/" title="playfair_app_screenshot"><img src="http://dougmccune.com/blog/wp-content/uploads/2010/01/playfair_app_screenshot.png" alt="playfair_app_screenshot" align="none" width="400" height="245" class="attachment wp-att-1017 " /></a><br />
<a href="http://dougmccune.com/flex/recreatingPlayfair/srcview/index.html">View source</a> is enabled.</p>
<p>The app displays all the countries that the US has trade data for, month by month going back as far as 1985. Each country is displayed in the list on the left with a sparkline chart of the trade data. A red fill indicates we are importing from a given country more than we are exporting, and a light green fill indicates we are exporting more than we are importing.</p>
<p><strong>Exploring the data</strong><br />
The charts tell some really interesting stories. Some of the charts show a nearly identical relationship of imports to exports, both growing at the same rates, like these charts of the UK and Guatemala.<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2010/01/united_kingdom.png" title="united_kingdom"><img src="http://dougmccune.com/blog/wp-content/uploads/2010/01/united_kingdom.thumbnail.png" alt="united_kingdom" align="none" width="400" height="306" class="attachment wp-att-1036 " /></a><br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2010/01/guatemala.png" title="guatemala"><img src="http://dougmccune.com/blog/wp-content/uploads/2010/01/guatemala.thumbnail.png" alt="guatemala" align="none" width="400" height="305" class="attachment wp-att-1037 " /></a></p>
<p>While some other charts show different relationships. Notice how exports to Hong Kong have been steadily increasing, but imports from Hong Kong have been declining.<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2010/01/hong_kong.png" title="hong_kong"><img src="http://dougmccune.com/blog/wp-content/uploads/2010/01/hong_kong.thumbnail.png" alt="hong_kong" align="none" width="400" height="305" class="attachment wp-att-1024 " /></a></p>
<p>Or we can see what imposing sanctions on a country looks like, as illustrated by <a href="http://www.treas.gov/offices/enforcement/ofac/programs/burma/burma.shtml">sanctions on Burma</a> that were put into place in 2003:<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2010/01/burma.png" title="burma"><img src="http://dougmccune.com/blog/wp-content/uploads/2010/01/burma.thumbnail.png" alt="burma" align="none" width="400" height="304" class="attachment wp-att-1025 " /></a></p>
<p>Or what a <a href="http://en.wikipedia.org/wiki/Haiti#1990s">coup in Haiti</a> looks like:<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2010/01/haiti.png" title="haiti"><img src="http://dougmccune.com/blog/wp-content/uploads/2010/01/haiti.thumbnail.png" alt="haiti" align="none" width="400" height="306" class="attachment wp-att-1026 " /></a></p>
<p>Or what a <a href="http://en.wikipedia.org/wiki/Effect_of_the_2004_Indian_Ocean_earthquake_on_the_Maldives">massive tsunami</a> can do to a place like the Maldives:<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2010/01/maldives.png" title="maldives"><img src="http://dougmccune.com/blog/wp-content/uploads/2010/01/maldives.thumbnail.png" alt="maldives" align="none" width="400" height="305" class="attachment wp-att-1027 " /></a></p>
<p>We can see the massive growth of China (and notice how interestingly seasonal each year is, peaking in October):<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2010/01/china.png" title="china"><img src="http://dougmccune.com/blog/wp-content/uploads/2010/01/china.thumbnail.png" alt="china" align="none" width="400" height="305" class="attachment wp-att-1028 " /></a></p>
<p>And one final one that I find very interesting, isn&#8217;t a country, but the import and export of what is classified as &#8220;<a href="http://www.census.gov/foreign-trade/reference/glossary/a/atp.html">Advanced Technology Products</a>&#8220;, which includes things like biotech and advanced electronics products. Notice how up until the early 2000s we were exporting more of these products than we were importing, but by 2002 that balance shifted and the gap continues to increase:<br />
<a href="http://dougmccune.com/blog/wp-content/uploads/2010/01/advance_tech_products.png" title="advance_tech_products"><img src="http://dougmccune.com/blog/wp-content/uploads/2010/01/advance_tech_products.thumbnail.png" alt="advance_tech_products" align="none" width="400" height="304" class="attachment wp-att-1029 " /></a></p>
<p>I had fun creating this app, but one thing I didn&#8217;t expect was how much fun researching the charts was going to be. The charts that stuck out with trends that were abnormal all had interesting stories to tell about the history of the country.</p>
<p>In closing, I&#8217;ll end with a quote from Playfair in which he describes the concept of displaying numeric values in a line chart (remember, he was the first person to actually do this):</p>
<blockquote><p>As the eye is the best judge of proportion, being able to estimate it with more quickness and accuracy than any other of our organs, it follows, that wherever relative quantities are in question &#8230; this mode of representing it is peculiarly applicable; it gives a simple, accurate, and permanent idea, by giving form and shape to a number of separate ideas, which are otherwise abstract and unconnected.</p></blockquote>
<p>Well said, Mr. Playfair, well said. Your charts are just as effective nearly 200 years later.</p>
]]></content:encoded>
			<wfw:commentRss>http://dougmccune.com/blog/2010/01/19/recreating-william-playfairs-importexport-charts/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

