<?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>Michael VanDaniker &#187; Information Visualization</title>
	<atom:link href="http://michaelvandaniker.com/blog/category/information-visualization/feed/" rel="self" type="application/rss+xml" />
	<link>http://michaelvandaniker.com/blog</link>
	<description>Data Visualization Architect</description>
	<lastBuildDate>Fri, 23 Dec 2011 16:42:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Axiis Tech Demo: Visualizing Historic Browser Statistics</title>
		<link>http://michaelvandaniker.com/blog/2009/10/31/visualizing-historic-browser-statistics-with-axiis/</link>
		<comments>http://michaelvandaniker.com/blog/2009/10/31/visualizing-historic-browser-statistics-with-axiis/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 19:52:58 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Axiis]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Information Visualization]]></category>

		<guid isPermaLink="false">http://michaelvandaniker.com/blog/?p=263</guid>
		<description><![CDATA[For the beta release of Axiis I prepared a visualization showing the historical browser breakdown of visitors to W3schools.com.  I wouldn&#8217;t consider it a useful data visualization by any stretch of the imagination (pie charts are not a great idea, and concentric pie charts&#8230; oh my!), but it does demonstrate how easy it is to [...]]]></description>
			<content:encoded><![CDATA[<p>For the beta release of <a href="http://axiis.org/">Axiis</a> I prepared a visualization showing the historical browser breakdown of visitors to <a href="http://www.w3schools.com/browsers/browsers_stats.asp">W3schools.com</a>.  I wouldn&#8217;t consider it a useful data visualization by any stretch of the imagination (pie charts are not a great idea, and concentric pie charts&#8230; oh my!), but it does demonstrate how easy it is to get started with Axiis and build something complex in a few lines of mark-up. Since the beta release I added the ability to filter by browser type, and <a href="http://www.twgonzalez.com/blog/">Tom</a> lent his artistic eye and did a little restyling.  Although the number of <a href="http://www.insideria.com/2009/07/axiis---an-introduction-and-tu.html">Axiis</a> <a href="http://saturnboy.com/2009/10/axiis-quest-for-cool/">tutorials</a> <a href="http://riverdalestation.net/2009/10/26/drilling-down-on-an-axiis-bubblechart-a-tutorial/">out</a> <a href="http://www.randytroppmann.com/2009/10/29/displaying-elevation-with-axiis-example/">there</a> is growing steadily, there are still very few, so I&#8217;ll dive deep and explain exactly how this visualization works.  Check it out <a href="http://www.michaelvandaniker.com/labs/browserVisualization/" target="_blank">here</a>.</p>
<p><a href="http://www.michaelvandaniker.com/labs/browserVisualization/" target="_blank"><img src="http://www.michaelvandaniker.com/images/browsers.png" alt="" /></a></p>
<p><strong>What am I looking at exactly?</strong></p>
<p>Each of the concentric rings are essentially pie charts showing the percentage of visitors using each browser for a particular time slice, starting with January 2002 in the center and working out to August 2009.  The numbers on W3schools.com don&#8217;t quite add up to 100% because they don&#8217;t report on browsers that make up less than 0.5% of their visitors.  This results in a gap at the end of each ring.</p>
<p><strong>How&#8217;s it done?</strong></p>
<p>This only took a few hours to construct, and the most time consuming part was parsing the data.  The HTML from W3schools wasn&#8217;t valid XHTML, so I couldn&#8217;t tear through it using AS3&#8242;s E4X parsing without doing some manual manipulation beforehand.  When all was said and done, I ended up formatting the data as XML with a series of &#8220;month&#8221; elements with &#8220;browser&#8221; children that detailed the share of each browser for the corresponding time period.  None of the parsing involved any of the Axiis framework &#8212; just a few loops and conditionals.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;month</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;August 2009&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;browser</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;IE7&quot;</span> <span style="color: #000066;">share</span>=<span style="color: #ff0000;">&quot;0.151&quot;</span> <span style="color: #000066;">month</span>=<span style="color: #ff0000;">&quot;August 2009&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;browser</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;IE6&quot;</span> <span style="color: #000066;">share</span>=<span style="color: #ff0000;">&quot;0.136&quot;</span> <span style="color: #000066;">month</span>=<span style="color: #ff0000;">&quot;August 2009&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;browser</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;IE8&quot;</span> <span style="color: #000066;">share</span>=<span style="color: #ff0000;">&quot;0.106&quot;</span> <span style="color: #000066;">month</span>=<span style="color: #ff0000;">&quot;August 2009&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;browser</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Firefox&quot;</span> <span style="color: #000066;">share</span>=<span style="color: #ff0000;">&quot;0.474&quot;</span> <span style="color: #000066;">month</span>=<span style="color: #ff0000;">&quot;August 2009&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;browser</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Chrome&quot;</span> <span style="color: #000066;">share</span>=<span style="color: #ff0000;">&quot;0.07&quot;</span> <span style="color: #000066;">month</span>=<span style="color: #ff0000;">&quot;August 2009&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;browser</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Safari&quot;</span> <span style="color: #000066;">share</span>=<span style="color: #ff0000;">&quot;0.033&quot;</span> <span style="color: #000066;">month</span>=<span style="color: #ff0000;">&quot;August 2009&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;browser</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Opera&quot;</span> <span style="color: #000066;">share</span>=<span style="color: #ff0000;">&quot;0.021&quot;</span> <span style="color: #000066;">month</span>=<span style="color: #ff0000;">&quot;August 2009&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/month<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
...</pre></div></div>

<p>Conceptually, there are two parts to the browser visualization: the concentric time slice rings and the wedges that divide the time slices down by browser.  To create this effect, I used Axiis&#8217;s embedded layouts.  Layouts loop over a given data provider, manipulate Degrafa geometry based on that data, and draw to the screen.  Layouts can be nested inside on another and behave analogously to nested loops in the programming world; for each iteration of an outer layout, the inner one will loop over all of its data, performing its expected tasks.</p>
<p><strong>The outer layout</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;axiis:DataCanvas</span> id=<span style="color: #ff0000;">&quot;dc&quot;</span></span>
<span style="color: #000000;">	width=<span style="color: #ff0000;">&quot;100%&quot;</span></span>
<span style="color: #000000;">	bottom=<span style="color: #ff0000;">&quot;20&quot;</span></span>
<span style="color: #000000;">	top=<span style="color: #ff0000;">&quot;120&quot;</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;axiis:layouts</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;axiis:ConcentricWedgeLayout</span> id=<span style="color: #ff0000;">&quot;radialLayout&quot;</span></span>
<span style="color: #000000;">			width=<span style="color: #ff0000;">&quot;{dc.width}&quot;</span></span>
<span style="color: #000000;">			height=<span style="color: #ff0000;">&quot;{dc.height - 10}&quot;</span></span>
<span style="color: #000000;">			innerRadius=<span style="color: #ff0000;">&quot;52&quot;</span><span style="color: #7400FF;">&gt;</span></span>
...</pre></div></div>

<p>When the application is done going through its creation process, an event handler is called which parses the XML and passes the resulting ArrayCollection of month Objects to the outer layout, which is an instance of ConcentricWedgeLayout. This type of layout manipulates the inner and outer radii of a Degrafa Wedge such that the during the course of the loop the Wedge will have taken on all the values necessary to fill the space available.  After each iteration, the Wedge and the browser Objects that belong to the current month are passed to the inner layout.</p>
<p><strong>The inner layout</strong></p>
<p>The inner layout was custom-built for this visualization.  It leverages some of the events fired during the layout&#8217;s render cycle to adjust the angle of the wedge. The preRender event is fired at the very beginning of the layout&#8217;s render cycle, before a single iteration has happened.  During preRender, the currentArc property is set to 0.  This makes sure we&#8217;re always starting from the 12:00 position on the visualization.  Since this layout has drawingGeometries defined, the layout dispatches the itemPreDraw event right before drawing them to the screen.  In this example, the itemPreDraw handler updates currentArc to the appropriate value to show the percentage for the browser the layout is currently holding.</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;axiis:LinearScale</span> id=<span style="color: #ff0000;">&quot;arcScale&quot;</span></span>
<span style="color: #000000;">	minValue=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">	maxValue=<span style="color: #ff0000;">&quot;1&quot;</span></span>
<span style="color: #000000;">	minLayout=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">	maxLayout=<span style="color: #ff0000;">&quot;359.99&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
...
<span style="color: #000000;"><span style="color: #7400FF;">&lt;axiis:BaseLayout</span> id=<span style="color: #ff0000;">&quot;arcLayout&quot;</span></span>
<span style="color: #000000;">	dataProvider=<span style="color: #ff0000;">&quot;{radialLayout.currentDatum.browser}&quot;</span></span>
<span style="color: #000000;">	preRender=<span style="color: #ff0000;">&quot;{currentArc = 0}&quot;</span></span>
<span style="color: #000000;">	itemPreDraw=<span style="color: #ff0000;">&quot;{currentArc += arcScale.valueToLayout(arcLayout.currentDatum.share);}&quot;</span></span>
<span style="color: #000000;">...<span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Note the use of the LinearScale here.  The Axiis scale classes create a mapping between two data spaces that we call &#8220;value&#8221; and &#8220;layout&#8221;.  In this example a linear mapping is created between the range of possible percentages (0 &#8211; 1) and the range of possible angles (0 &#8211; 359.99). The valueToLayout method does exactly what you&#8217;d expect it to.  Given a number from the value space, it will return a corresponding number in the layout space.  This is used to advance the reference Wedge&#8217;s angle by the appropriate amount.</p>
<p><strong>Drawing to the screen</strong></p>
<p>Aside from manipulating the angle of the reference Wedge, the inner layout is also responsible for rendering a Wedge to the screen.  The reference Wedge and the drawing Wedge are two separate instances, but the latter derives its properties from the former.</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;geometry:Wedge</span> id=<span style="color: #ff0000;">&quot;wedge&quot;</span></span>
<span style="color: #000000;">	centerX=<span style="color: #ff0000;">&quot;{radialLayout.width/2}&quot;</span></span>
<span style="color: #000000;">	centerY=<span style="color: #ff0000;">&quot;{radialLayout.height/2}&quot;</span></span>
<span style="color: #000000;">	innerRadius=<span style="color: #ff0000;">&quot;{radialLayout.currentReference['innerRadius']}&quot;</span></span>
<span style="color: #000000;">	outerRadius=<span style="color: #ff0000;">&quot;{radialLayout.currentReference['outerRadius']}&quot;</span></span>
<span style="color: #000000;">	startAngle=<span style="color: #ff0000;">&quot;{270 + currentArc - arcScale.valueToLayout(arcLayout.currentDatum.share)}&quot;</span></span>
<span style="color: #000000;">	arc=<span style="color: #ff0000;">&quot;{arcScale.valueToLayout(arcLayout.currentDatum.share)}&quot;</span><span style="color: #7400FF;">&gt;</span></span>
...
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/geometry:Wedge</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>A mapping of browser names to colors defined at the top of the application is used to determine the fill and stroke applied to the Wedge.</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;geometry:fill</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;degrafa:SolidFill</span> id=<span style="color: #ff0000;">&quot;wedgeFill&quot;</span></span>
<span style="color: #000000;">		color=<span style="color: #ff0000;">&quot;{browserColors[arcLayout.currentDatum.name]}&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/geometry:fill</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;geometry:stroke</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;degrafa:SolidStroke</span> id=<span style="color: #ff0000;">&quot;wedgeStroke&quot;</span></span>
<span style="color: #000000;">		color=<span style="color: #ff0000;">&quot;{ColorUtil.adjustBrightness(browserColors[arcLayout.currentDatum.name],-60)}&quot;</span></span>
<span style="color: #000000;">		pixelHinting=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">		alpha=<span style="color: #ff0000;">&quot;.7&quot;</span></span>
<span style="color: #000000;">		weight=<span style="color: #ff0000;">&quot;.5&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/geometry:stroke</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p><strong>Making  it interactive &#8211; States</strong></p>
<p>Axiis states are conceptually similar to Flex&#8217;s states; they define alternative properties for the rendered geometries based on certain conditions. When the user interacts with a rendered geometry, some familiar events are dispatched (mouseOver, mouseOut, etc.).  The layouts capture each of these events and if there are any states registered with the event type in question, the state is applied.  This declaration says that when the mouse is over a wedge the wedgeFill should have its color property dimmed and this action should be undone when the mouse is moved off.</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;axiis:State</span> enterStateEvent=<span style="color: #ff0000;">&quot;mouseOver&quot;</span></span>
<span style="color: #000000;">	exitStateEvent=<span style="color: #ff0000;">&quot;mouseOut&quot;</span></span>
<span style="color: #000000;">	targets=<span style="color: #ff0000;">&quot;{[wedgeFill]}&quot;</span></span>
<span style="color: #000000;">	properties=<span style="color: #ff0000;">&quot;{['color']}&quot;</span></span>
<span style="color: #000000;">	values=<span style="color: #ff0000;">&quot;{[ColorUtil.adjustBrightness(int(wedgeStroke.color),-60)]}&quot;</span><span style="color: #7400FF;">/&gt;</span></span></pre></div></div>

<p><strong>The filtering legend</strong></p>
<p>If you followed how the layout routine works in the main visualization, the construction of the legend is a no-brainer.  It&#8217;s a VBoxLayout &#8212; a layout which spaces out RegularRectangles across its available height &#8212; and it draws a colored square and some text to the screen for each browser name.</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;axiis:DataCanvas</span> id=<span style="color: #ff0000;">&quot;legendDC&quot;</span></span>
<span style="color: #000000;">	width=<span style="color: #ff0000;">&quot;200&quot;</span></span>
<span style="color: #000000;">	height=<span style="color: #ff0000;">&quot;{legendLayout.itemCount * 18}&quot;</span></span>
<span style="color: #000000;">	bottom=<span style="color: #ff0000;">&quot;5&quot;</span></span>
<span style="color: #000000;">	left=<span style="color: #ff0000;">&quot;5&quot;</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;axiis:layouts</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;axiis:VBoxLayout</span> id=<span style="color: #ff0000;">&quot;legendLayout&quot;</span></span>
<span style="color: #000000;">			width=<span style="color: #ff0000;">&quot;{legendDC.width}&quot;</span></span>
<span style="color: #000000;">			height=<span style="color: #ff0000;">&quot;{legendDC.height}&quot;</span></span>
<span style="color: #000000;">			showDataTips=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">			itemClick=<span style="color: #ff0000;">&quot;legendLayout_itemClickHandler(event)&quot;</span><span style="color: #7400FF;">&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;axiis:drawingGeometries</span><span style="color: #7400FF;">&gt;</span></span>
				...
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;/axiis:drawingGeometries</span><span style="color: #7400FF;">&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;axiis:states</span><span style="color: #7400FF;">&gt;</span></span>
				<span style="color: #000000;"><span style="color: #7400FF;">&lt;axiis:State</span> enterStateEvent=<span style="color: #ff0000;">&quot;selected&quot;</span></span>
<span style="color: #000000;">					exitStateEvent=<span style="color: #ff0000;">&quot;unselected&quot;</span></span>
<span style="color: #000000;">					targets=<span style="color: #ff0000;">&quot;{[legendMarkerFill,legendLabel]}&quot;</span></span>
<span style="color: #000000;">					properties=<span style="color: #ff0000;">&quot;{['alpha','italic']}&quot;</span></span>
<span style="color: #000000;">					values=<span style="color: #ff0000;">&quot;{[.1,true]}&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;/axiis:states</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;/axiis:VBoxLayout</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/axiis:layouts</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/axiis:DataCanvas</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>The visualization allows the user to click on items in the legend to filter out the corresponding browsers.  To do this, there is an handler set up on itemClick event on the legend layout.  itemClick is dispatched when a rendered geometry belonging to the layout is clicked.  The event handler updates the list of browsers to include.  In the declaration for the inner layout on the main visualization, a dataFilterFunction is defined which checks the current browser&#8217;s name against the list of included browsers.  Any browsers that fail this test (i.e. the filter function return false) are skipped by the layout.</p>
<p>The state defined on the legend uses two custom event types, &#8220;selected&#8221; and &#8220;unselected&#8221;.  The &#8220;selected&#8221; event is dispatched when a rendered geometry is clicked and the &#8220;unselected&#8221; event is dispatched when that same geometry is clicked again.  In the selected state the text becomes italicized and the fill for the legend marker becomes more transparent, indicating that the browser has been filtered out.</p>
<p>The filtering feature take advantage of a bug fix that was made after the release of the beta that caused problems when all of the data items were filtered from a layout.  The swc included in the view-source download is compiled from Axiis&#8217;s development branch.  We use our repository in a slightly non-traditional manner.  The trunk contains our latest release and our &#8220;development&#8221; branch contain the latest check-in.  Although the development branch is more or less stable keep in mind that it is where we work out new features, so it may not be completely polished and bug-free.  If you run into any bugs or need help with something, give us a holler on our google group.  Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelvandaniker.com/blog/2009/10/31/visualizing-historic-browser-statistics-with-axiis/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>CFUnited Demo &#8211; Axiis Treemaps</title>
		<link>http://michaelvandaniker.com/blog/2009/08/16/cfunited-demo-axiis-treemaps/</link>
		<comments>http://michaelvandaniker.com/blog/2009/08/16/cfunited-demo-axiis-treemaps/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 00:57:47 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Axiis]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Information Visualization]]></category>

		<guid isPermaLink="false">http://michaelvandaniker.com/blog/?p=260</guid>
		<description><![CDATA[Yesterday Tom Gonzalez and I gave a presentation on Axiis at CFUnited. After Tom reviewed the concepts behind the framework, I demonstrated how to build a custom visualization. The resulting application showed a squarified treemap representing the make up of Axiis, Degrafa, Flex, and the Flex Data Visualization framework. I cleaned up the code from [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday <a href="http://www.twgonzalez.com/blog/">Tom Gonzalez</a> and I gave a presentation on Axiis at <a href="http://cfunited.com/2009/">CFUnited</a>.  After Tom reviewed the concepts behind the framework, I demonstrated how to build a custom visualization.  The resulting application showed a squarified <a href="http://en.wikipedia.org/wiki/Treemapping">treemap</a> representing the make up of <a href="http://axiis.org/">Axiis</a>, <a href="http://degrafa.org/">Degrafa</a>, Flex, and the Flex Data Visualization framework.  I cleaned up the code from the presentation, added some pretty fills, and committed it to the development branch of the <a href="http://code.google.com/p/axiis/">repository</a>.  You can view the results <a href="http://www.michaelvandaniker.com/labs/axiis/treemap/TreemapExample.html">here</a> and the source <a href="http://www.michaelvandaniker.com/labs/axiis/treemap/srcview/index.html">here</a>.<br/><br />
<a href="http://www.michaelvandaniker.com/labs/axiis/treemap/TreemapExample.html"><img src="http://www.michaelvandaniker.com/images/axiis-treemap.png"/></a><br />
In the treemap, the area of the main rectangle represents the number of lines of code in the selected framework, and the smaller rectangles are sized proportionally based on the number of lines of code in each class.  The rectangles are colored based on the percentage of methods marked private. Red rectangles represent classes that are mostly private while green rectangles show classes that are more public or protected.  The more intense the color, the further the classes is from being 50% private.  It&#8217;s a pretty meaningless metric, but it demonstrates what the treemap can do.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelvandaniker.com/blog/2009/08/16/cfunited-demo-axiis-treemaps/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Axiis Video Tutorial</title>
		<link>http://michaelvandaniker.com/blog/2009/06/24/axiis-video-tutorial/</link>
		<comments>http://michaelvandaniker.com/blog/2009/06/24/axiis-video-tutorial/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 10:22:38 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Axiis]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Information Visualization]]></category>

		<guid isPermaLink="false">http://michaelvandaniker.com/blog/?p=251</guid>
		<description><![CDATA[An experimental alpha release of Axiis has been available since 360&#124;Flex Indy.  I put together this screencast to help people get up and running with the framework. We&#8217;ve gotten some feedback from a few people already, and some users have already told us about the awesome stuff they&#8217;re making.  Remember during Tom&#8217;s presentation when he [...]]]></description>
			<content:encoded><![CDATA[<p>An experimental alpha release of <a href="http://axiis.org" target="_blank">Axiis</a> has been available since <a href="http://www.360flex.com/" target="_blank">360|Flex Indy</a>.  I put together <strong><a href="http://vimeo.com/5301354" target="_blank">this screencast</a></strong> to help people get up and running with the framework.</p>
<p>We&#8217;ve gotten some feedback from a few people already, and some users have already told us about the awesome stuff they&#8217;re making.  Remember during Tom&#8217;s presentation when he showed the Smith Chart, the <a href="http://en.wikipedia.org/wiki/File:Smith_chart.jpg" target="_blank">insanely complex ring of circles</a> that motivated some of our work?  Yeah, we never attempted to implement that.  It was just meant to get people thinking about some of the things that can&#8217;t easily be done with other frameworks.  Well, <a href="http://www.flexjunk.com/" target="_blank">Andrew Westberg</a> took that slide as a challenge and has already <a href="http://www.flexjunk.com/2009/05/30/developing-a-smith-chart-using-axiis-and-degrafa/" target="_blank">implemented</a> it!  Seeing what everyone is building makes this all worthwhile!</p>
<p>So as you develop, keep in mind that this is alpha software.  If you&#8217;re running into problems with something, please let us know so we can set you on the right path and improve things for the next release.  If you&#8217;ve got the Axiis swc sitting on your machine, build something cool, tell us about it, and let us know what went right/wrong.  If you haven&#8217;t downloaded the swc, you can get it <a href="http://code.google.com/p/axiis/downloads/list" target="_blank">here</a>.</p>
<p>You can get in contact with us by emailing tom or michael [at] axiis.org or direct a tweet towards <a href="http://twitter.com/axiis_dataviz" target="_blank">@Axiis_DataViz</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelvandaniker.com/blog/2009/06/24/axiis-video-tutorial/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Axiis &#8211; A different kind of data visualization framework</title>
		<link>http://michaelvandaniker.com/blog/2009/04/10/axiis-a-different-kind-of-data-visualization-framework/</link>
		<comments>http://michaelvandaniker.com/blog/2009/04/10/axiis-a-different-kind-of-data-visualization-framework/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 04:25:55 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Axiis]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Information Visualization]]></category>

		<guid isPermaLink="false">http://michaelvandaniker.com/blog/?p=231</guid>
		<description><![CDATA[Last week Tom Gonzalez wrote a blog post announcing Axiis, the open-source data visualization framework we&#8217;ve been developing. Tom goes into a good deal of depth about how the system works, so I won&#8217;t rehash all those specifics here. I just wanted to share my take on what Axiis is meant to do at a [...]]]></description>
			<content:encoded><![CDATA[<p>Last week <a href="http://www.twgonzalez.com/blog/">Tom Gonzalez</a> wrote a blog post announcing Axiis, the open-source data visualization framework we&#8217;ve been developing.  Tom goes into a good deal of depth about <a href="http://www.twgonzalez.com/blog/?p=172">how the system works</a>, so I won&#8217;t rehash all those specifics here.  I just wanted to share my take on what Axiis is meant to do at a high level.</p>
<p>Axiis is not a reimagining of the Flex charting framework or any other comparable library.  Axiis can be more accurately described as a <strong>data-driven layout engine for <a href="http://degrafa.org/">Degrafa</a> geometry</strong>.  We see the primary use of this engine being data viz, so we&#8217;re billing it as a data visualization framework.</p>
<p>So what do I mean when I say &#8220;data-driven layout engine?&#8221;  When using Axiis, you describe the geometry necessary to render a single element in your data set.  The engine then iterates over the entire data set, creating and laying out all necessary instances of that geometry.  This process allows you to create seeming complex visualizations in a relatively short amount of markup.</p>
<p>Take a column chart as an example.  (Though not all that complex, it still takes a fair bit of code to write a column chart from scratch.)  A column chart is simply a series of rectangles laid out horizontally where each rectangle&#8217;s height represents the value it is rendering.  So to create that in Axiis, you declare a horizontal layout with a rectangle geometry.  You then set up a binding expression to compute the height for each rectangle.  As the engine runs the binding expression executes, and the geometries are rendered side by side and with correct heights.  Huzzah!</p>
<p>The column chart is just a basic example.  Axiis is capable of much more than simple Cartesian charts.  Layouts can have child layouts as well.  This allows you to iterate over the top level of your data set in a parent layout and then iterate over another property in the child.  Tack on Degrafa&#8217;s ability to compose geometries, and you&#8217;ve got the tools to create very expressive visualizations.  Tom has put together an example he calls the <a href="http://www.twgonzalez.com/blog/?p=143">Stacked Wedge</a> that demonstrates nested layouts and geometry composition.  It represents data in a way that would be difficult to achieve with other frameworks, it looks beautiful, and the core of it is only 100 lines of markup!</p>
<p>Axiis is under heavy development, and it is rapidly approaching an alpha release.  Keep your eyes here and on <a href="http://www.twgonzalez.com/blog/">Tom&#8217;s blog</a> over the next few weeks for news and examples of the full scale of Axiis&#8217; capabilities.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelvandaniker.com/blog/2009/04/10/axiis-a-different-kind-of-data-visualization-framework/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hit detection on graphics primitives: Speeding up the Parallel Coordinates Plot</title>
		<link>http://michaelvandaniker.com/blog/2009/02/19/speeding-up-pcp-using-hit-detection-on-graphics-primitives/</link>
		<comments>http://michaelvandaniker.com/blog/2009/02/19/speeding-up-pcp-using-hit-detection-on-graphics-primitives/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 23:22:05 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[BirdEye]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Information Visualization]]></category>

		<guid isPermaLink="false">http://michaelvandaniker.com/blog/?p=168</guid>
		<description><![CDATA[In my last post I mentioned that I had rewritten the Parallel Coordinates Plot to achieve a pretty drastic speed up. Before I get into the graphics hit detection trick at the heart of the performance boost, I&#8217;d like to explain the problem with the original implementation. The main thing that dragged down the first [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://michaelvandaniker.com/blog/2009/02/13/collaborating-with-birdeye/">my last post</a> I mentioned that I had rewritten the Parallel Coordinates Plot to achieve a pretty drastic speed up. Before I get into the graphics hit detection trick at the heart of the performance boost, I&#8217;d like to explain the problem with the <a href="http://michaelvandaniker.com/blog/2008/10/13/parallel-coordinates-plot-in-flex/">original implementation</a>.  The main thing that dragged down the first version was the fact that each line drawn on the plot was handled by a separate UIComponent.  I knew that that was bad idea going in, but I went with it anyway.  My reasons for subclassing UIComponent were pretty weak&#8230;</p>
<ol>
<li>I wanted to take advantage of invalidation.<br/><br/>In most cases Parallel Coordinates Plots contain hundreds, if not thousands, of lines.  The overhead involved in instantiating and validating thousands of UIComponents outweighs the programming convenience provided by invalidation, especially when all you really want to do is draw a line.<br/><br/></li>
<li>I wanted the lines to have tool tips.<br/><br/>It&#8217;s great that UIComponents have tool tip functionality built right in, but again, it&#8217;s foolish to take advantage of the niceties of UIComponent at the cost of performance.  The ToolTipManager exists for a reason.<br/><br/></li>
<li>I wanted to allow the user to draw anything they wanted between the axes.<br/><br/>Honestly, Parallel Coordinates Plots are crowded enough by default.  I can&#8217;t think of a single thing a user would want to do aside from changing the color and thickness of the lines.</li>
</ol>
<p>So for the most part I made the decision out of laziness.  When I started cleaning up the code to migrate it into <a href="http://code.google.com/p/birdeye/">BirdEye</a>, I realized that I would have to rewrite the Parallel Coordinates Plot altogether if it was going to be useful to anyone.</p>
<p><strong>Cutting out the bloat</strong></p>
<p>With the overhead of UIComponent mind, it might seem reasonable to just make each line a Sprite and manage rendering manually.  Unfortunately, that probably wouldn&#8217;t scale nicely either.  Sprites are lighter than UIComponents, but adding thousands of Sprites to the display list and running graphics operations on them is still a tall order.</p>
<p>Drawing all of the lines to a single Sprite&#8217;s graphics property is straightforward enough, but all those graphics operations wear noticeably on performance.  This is the option I ultimately went with, so to get around the performance problem I store the results of the graphics operations to a BitmapData using the BitmapData.draw method and then render the BitmapData to the screen using Graphics.beginBitmapFill.</p>
<p>Unfortunately, this leaves the lines completely non-interactive.  They&#8217;re not DisplayObjects anymore, so they can&#8217;t dispatch the mouse events needed to support roll over and selection.  But wait&#8230;</p>
<p><strong>Supporting bitmap interactivity using picking techniques</strong></p>
<p>3D engines have to deal with this problem all the time.  When you click on the screen in an OpenGL application, the app knows the coordinates of the cursor, but the developer still has to do some leg work to figure out which 3D object those coordinates refer to.  There are a number of techniques used to solve this &#8220;<a href="http://medialab.di.unipi.it/web/IUM/Waterloo/node87.html">picking</a>&#8221; problem.  One technique is to render the 3D scene twice: once normally and once with each 3D object colored with a unique color.  The first rendering is presented to the user, while the second is kept invisible.  When the user clicks on a pixel in the first rendering, the program looks up the color at the cooresponding coordinates in the second rendering.  Since the colors are uniquely mapped to the 3D objects, this program can determine which object was clicked based on that color.</p>
<p>This is the same technique that the new Parallel Coordinates Plot uses to determine what the user is interacting with.  Each line segment is uniquely identified by two fields and the values in those fields; the fields determine the x coordinates of the line segment&#8217;s endpoints and the values determine the y coordinates.<br />
<center><br />
<img src="http://michaelvandaniker.com/images/pcp-coordinates.png"/><br />
</center></p>
<p>The Parallel Coordinates Plot maintains a hash mapping those four properties to unique colors.  When the user clicks on the component, the color under the pointer is extracted, the hash is queried, and the items that match the field-value pairs are returned.  In the full implementation there are four bitmaps used in all:</p>
<ol>
<li>The first bitmap contains a line for every item, regardless of selected or rolled over status.</li>
<li>The second bitmap only shows lines for rolled over items.  This bitmap is rendered on top of the first bitmap, masking the fact that every item is actually rendered in the first one.</li>
<li>The third bitmap shows only the selected items.  Similarly, this is rendered on top of the second bitmap to achieve the same effect.</li>
<li>The invisible fourth bitmap used for picking.</li>
</ol>
<p>It may seem redundant to render lines more times than absolutely necessary, but the extra steps let the Parallel Coordinates Plot save in the long run.  It only needs to redraw the lines that have changed from one moment to the next.  If the contents of the data provider and the width and height remain constant, the first bitmap only needs to be drawn once.</p>
<p>When it all comes together, the Parallel Coordinates Plot looks like this under the hood:<br />
<center><br />
<img src="http://michaelvandaniker.com/images/pcp-hit-detection.png"/><br />
</center><br />
but the user sees this:<br />
<center><br />
<img src="http://michaelvandaniker.com/images/pcp-selected.png"/><br />
</center><br />
I&#8217;ve put together an <strong><a href="http://www.michaelvandaniker.com/labs/cerealPCP/CerealPCP.html">example</a></strong> that demonstrates the new and improved Parallel Coordinates Plot.  I didn&#8217;t run any metrics to try and compare the performance with the <a href="http://www.michaelvandaniker.com/labs/atomPCP/AtomPCP.html">older sample</a> I put together, but in terms of responsiveness, the new version blows the old one out of the water.  The source for the new sample is available <a href="http://www.michaelvandaniker.com/labs/cerealPCP/srcview/index.html"><strong>here</strong></a>.  The color hashing occurs within the internal FieldValuePairColorHash class at the bottom of the ParallelCoordinatePlot class.<br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://michaelvandaniker.com/blog/2009/02/19/speeding-up-pcp-using-hit-detection-on-graphics-primitives/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Collaborating with BirdEye</title>
		<link>http://michaelvandaniker.com/blog/2009/02/13/collaborating-with-birdeye/</link>
		<comments>http://michaelvandaniker.com/blog/2009/02/13/collaborating-with-birdeye/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 19:39:34 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[BirdEye]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Information Visualization]]></category>

		<guid isPermaLink="false">http://michaelvandaniker.com/blog/?p=149</guid>
		<description><![CDATA[BirdEye is a project that aims to be a comprehensive collection of visualization components, and I was recently asked to join the team.  I&#8217;ve added my components into the appropriate sub-projects; The Heat Map is in GeoVis and the Comparison Matrix and Parallel Coordinates Plot are in QaVis.  During the migration process I fixed a [...]]]></description>
			<content:encoded><![CDATA[<p><a title="BirdEye" href="http://code.google.com/p/birdeye/">BirdEye</a> is a project that aims to be a comprehensive collection of visualization components, and I was recently asked to join the team.  I&#8217;ve added my components into the appropriate sub-projects; The <a href="http://michaelvandaniker.com/blog/2008/07/06/how-to-make-heat-maps-in-flex/">Heat Map</a> is in <a title="GeoViz" href="http://code.google.com/p/birdeye/wiki/GeoVis">GeoVis</a> and the <a href="http://michaelvandaniker.com/blog/2009/01/07/the-comparisonmatrix-component/">Comparison Matrix</a> and <a href="http://michaelvandaniker.com/blog/2008/10/13/parallel-coordinates-plot-in-flex/">Parallel Coordinates Plot</a> are in <a title="QaViz" href="http://code.google.com/p/birdeye/wiki/QaVis">QaVis</a>.  During the migration process I fixed a few bugs, and overhauled the Parallel Coordinate Plot entirely (more about that in a future post).  All future development on these components will occur within BirdEye, so that&#8217;s where you&#8217;ll want to go to get the freshest code.</p>
<p>Be sure to check out the <a title="QaViz Explorer" href="http://birdeye.googlecode.com/svn/trunk/qavis/examples/bin/QaVisExplorer.html">QaVis</a> and the <a title="GeoViz Explorer" href="http://birdeye.googlecode.com/svn/trunk/geovis/demo/GeoVisExplorer.html">GeoVis</a> Explorers.</p>
<p><a href="http://code.google.com/p/birdeye/"><img class="aligncenter" title="BirdEye" src="http://www.michaelvandaniker.com/images/BirdEyeLogo.png" alt="" width="100" height="100" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://michaelvandaniker.com/blog/2009/02/13/collaborating-with-birdeye/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Visualizing the 2008 NFL Season</title>
		<link>http://michaelvandaniker.com/blog/2009/01/21/visualizing-the-2008-nfl-season/</link>
		<comments>http://michaelvandaniker.com/blog/2009/01/21/visualizing-the-2008-nfl-season/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 07:45:56 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Information Visualization]]></category>

		<guid isPermaLink="false">http://michaelvandaniker.com/blog/?p=134</guid>
		<description><![CDATA[Super Bowl XLIII is less than two weeks away, so it feels like an appropriate time to look back at the statistics that were so diligently recorded during this past football season.  I&#8217;ve put together a comparison matrix based on data from pro-football-reference.com.  For first time visitors, a comparison matrix processes multidimensional statistics, looking for [...]]]></description>
			<content:encoded><![CDATA[<p>Super Bowl XLIII is less than two weeks away, so it feels like an appropriate time to look back at the statistics that were so diligently recorded during this past football season.  I&#8217;ve put together a comparison matrix based on data from <a href="http://www.pro-football-reference.com/years/2008/">pro-football-reference.com</a>.  For first time visitors, a <a href="http://michaelvandaniker.com/blog/2009/01/07/the-comparisonmatrix-component/">comparison matrix </a>processes multidimensional statistics, looking for correlations, and lays out the results in a color-coded grid.  In this example, red indicates a positive correlation between the two crossed fields and blue indicates negative.  The deeper the color, the stronger the relationship between the two fields being compared.</p>
<p><a href="http://michaelvandaniker.com/labs/footballMatrix/FootballMatrix.html"><img class="alignnone" title="NFL 2008 Comparison Matrix" src="http://www.michaelvandaniker.com/images/footballMatrix.png" alt="" width="572" height="457" /></a></p>
<p>You can view the interactive version of the matrix <a href="http://michaelvandaniker.com/labs/footballMatrix/FootballMatrix.html">here</a>.  View source is enabled.</p>
<p>I&#8217;m not much of a football pundit, so I&#8217;m not going to try to make too many insights into the data.  It did strike me as interesting that there is a weak or negative correlation between rushing and passing statistics.  It seems that teams with better throwing games tend to prefer to throw the ball over running it.  (Yeah, that was about as insightful as &#8220;The team that scores the most points usually ends up winning&#8230;&#8221;)</p>
<p>In this version of the comparison matrix, I introduced an item renderer which shows a snapshot of each of the plots.  The updated code can be checked out from my <a href="http://code.google.com/p/michaelvandaniker/">repository</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelvandaniker.com/blog/2009/01/21/visualizing-the-2008-nfl-season/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The ComparisonMatrix component&#8230; or Playboy Playmates and the Economy</title>
		<link>http://michaelvandaniker.com/blog/2009/01/07/the-comparisonmatrix-component/</link>
		<comments>http://michaelvandaniker.com/blog/2009/01/07/the-comparisonmatrix-component/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 05:05:59 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Information Visualization]]></category>

		<guid isPermaLink="false">http://michaelvandaniker.com/blog/?p=145</guid>
		<description><![CDATA[One of the challenges of information visualization is to present data in a way that allows the interesting patterns to rise to above the noise.  The ComparisonMatrix allows users to quickly assess where these patterns are so they can make an informed decision about where to start exploring.  To do this, the ComparisonMatrix breaks a [...]]]></description>
			<content:encoded><![CDATA[<p>One of the challenges of information visualization is to present data in a way that allows the interesting patterns to rise to above the noise.  The ComparisonMatrix allows users to quickly assess where these patterns are so they can make an informed decision about where to start exploring.  To do this, the ComparisonMatrix breaks a multidimensional data set into all of the possible pairs of attributes and evaluates the relationships between those pairs.  The relationships are rendered in a grid where the cell at the intersection of the column labeled &#8220;X&#8221; and the row labeled &#8220;Y&#8221; shows you the relationship between X and Y.  The cells are colored to provide a quick visual cue as to which relationships are most interesting.  This is similar to the rank-by-feature prism found in <a href="http://www.cs.umd.edu/hcil/hce/hce3.html">HCE</a>.</p>
<p><strong>How about an example?</strong></p>
<p>In 2004 <a href="http://psp.sagepub.com/cgi/content/abstract/30/9/1186">Terry F. Pettijohn and Brian J. Jungeberg</a> looked at the relationships between the physical features of Playboy&#8217;s playmates of the year and the economy.  I grabbed the csv for the playmate data off of <a href="http://flowingdata.com/2008/10/24/playboy-playmate-curves-and-the-state-of-the-economy/">Flowing Data</a>, added a few fields to it, and dropped it into a <a href="http://michaelvandaniker.com/labs/playmateMatrix/PlaymateMatrix.html"><strong>ComparisonMatrix</strong></a> (view source enabled).  Pink represents a positive correlation while yellow represents negative.  The deeper the color, the stronger the relationship.  You can click on a cell in the matrix to bring up a scatterplot of the data set based on the two selected attributes.</p>
<p><a href="http://michaelvandaniker.com/labs/playmateMatrix/PlaymateMatrix.html"><img class="alignnone" title="Playmate Matrix" src="http://www.michaelvandaniker.com/images/playmateMatrix.png" alt="" width="482" height="463" /></a></p>
<p>The strongest relationship in the playmate data set is actually between GDP and year, so that makes it somewhat difficult to make any assertions about trends in the playmates&#8217; physical features and the economy while not making the same assertion about those physical features and time.  (The authors of the paper actually used something called the &#8220;General Hard Times Measure&#8221; to evaluate the economy, and it looks like GDP isn&#8217;t really equivalent).  Despite this problem, the ComparisonMatrix still provides some interesting information about the playmates.</p>
<ul>
<li>The playmate&#8217;s heights, weights, and waists are all correlated.  These women have roughly the same figures, just scaled up and out differently.</li>
<li>The playmates&#8217; bust to waist ratios have decreased with time while their waist to hip ratios have increased.</li>
<li>BMI, though being a function of height and weight, is more strongly correlated with hip size than height.</li>
<li>There is no relationship between the age at which these women claimed their titles and their hip sizes.  That&#8217;s right, if you have nice hips, it might not be too late too be a playmate.</li>
</ul>
<p><strong>Using the ComparisonMatrix<br />
</strong></p>
<p>Like all my stuff, the ComparisonMatrix is under the MIT license, so you can use and adapt it in whatever way you like.  The code is documented pretty thoroughly, and the source of the playmate example is pretty useful for getting started.</p>
<p>In terms of usage, all you need to do is supply the ComparisonMatrix with the data set you want to analyze (the dataProvider property) and the array of attributes it should consider (the fields property).  Given those two properties, the ComparisonMatrix will be able to render your data, though there are a bunch of other options available.  Take a look at the documentation in the code for details.</p>
<p>The default comparison function is the <a href="http://en.wikipedia.org/wiki/Correlation">correlation coefficent</a>.  As a result, the default behavior is to expect comparison values from -1 to 1.  Since the ComparisonMatrix allows you to plug in your own comparison function, you&#8217;ll have to provide your own color and alpha functions if you want to use a different scale.</p>
<p>I made an effort to make the renderers (the actual cells in the grid) as flexible as possible so you can write your own without rewriting the ComparisonMatrix itself.  To do this, write a class that implements the IComparisonRenderer interface and set the comparisonRenderer property to be a factory for that class.</p>
<p><strong>The next step</strong></p>
<p>Statisticians and information visualization researchers have developed a slew of measures for determining interesting relationships between attributes in a data set.  Even though the ComparisonMatrix allows you to plug in whatever comparison function you want, I&#8217;ll probably build these in at some point for easy access.  As I make updates to this component, I&#8217;ll be committing them to my <a href="http://code.google.com/p/michaelvandaniker/">repository</a>.  As a result, the example here will not always be the most up to date.  For the most up to date code, check <a href="http://code.google.com/p/michaelvandaniker/">here</a>.</p>
<p>I have lofty dreams for this thing.  More later.</p>
<p><strong>UPDATE (January 21, 2009)</strong></p>
<p>I wasn&#8217;t kidding.  The ComparisonMatrix has changed a bit.  If you want the best matrix you can get, grab it from the <a href="http://code.google.com/p/michaelvandaniker/">repo</a>, not the source of the swf.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelvandaniker.com/blog/2009/01/07/the-comparisonmatrix-component/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Parallel Coordinates Plot in Flex</title>
		<link>http://michaelvandaniker.com/blog/2008/10/13/parallel-coordinates-plot-in-flex/</link>
		<comments>http://michaelvandaniker.com/blog/2008/10/13/parallel-coordinates-plot-in-flex/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 02:51:12 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Information Visualization]]></category>

		<guid isPermaLink="false">http://michaelvandaniker.com/blog/?p=56</guid>
		<description><![CDATA[I spent the past few weekends writing a parallel coordinates plot.   For the uninitiated, parallel coordinates plots are used to show the relationships between items in a multidimensional dataset.  Three dimensional data points can be difficult enough to visualize on a two dimensional screen, and when you throw even more dimensions into the problem, things [...]]]></description>
			<content:encoded><![CDATA[<p>I spent the past few weekends writing a parallel coordinates plot.   For the uninitiated, <a href="http://en.wikipedia.org/wiki/Parallel_coordinates">parallel coordinates plots</a> are used to show the relationships between items in a multidimensional dataset.  Three dimensional data points can be difficult enough to visualize on a two dimensional screen, and when you throw even more dimensions into the problem, things just get nasty.  Parallel coordinate plots mitigate this problem by rendering each of the n axes parallel to each other and each data point as a series of line segments corresponding to where the point would appear in n-dimensional space.  So the point (3, 10, 7, 6) would be rendered like this:</p>
<p><a href="http://michaelvandaniker.com/blog/wp-content/uploads/2008/10/pcp.png"><img class="alignnone size-full wp-image-59" title="pcp" src="http://michaelvandaniker.com/blog/wp-content/uploads/2008/10/pcp.png" alt="" width="482" height="242" /></a></p>
<p>Here&#8217;s a little <a href="http://www.michaelvandaniker.com/labs/atomPCP/AtomPCP.html">example</a> application using the period table of elements as a data source.  If you&#8217;re interested in the details of the implementation you can check out the <a href="http://www.michaelvandaniker.com/labs/atomPCP/srcview/index.html">source</a>.</p>
<p>When I started the project I was concerned that using the charting classes as a base would bulk up the code and ultimately hinder performance, so while the MXML that defines the plot is reminiscent of the charting components, the base is actually UIComponent.  I&#8217;ve left plenty of room for extension in the classes that make up the plot.  It&#8217;s licensed under MIT, so if you want a different renderer for each axis, you got it.  If you want to draw loops instead of straight lines between the axes, go for it.  I&#8217;m going to add the project to my <a href="http://code.google.com/p/michaelvandaniker/">repository</a>, so if you&#8217;re interested in any updates that I make to the code, you can check there.</p>
<p>If you need variety, two of the other members of the Fervor team have started open source projects for their own flavors of PCP.  (Swapping the acronym &#8220;PCP&#8221; in for &#8220;parallel coordinates plot&#8221; makes sentences more interesting, don&#8217;t you think?)  <a href="http://code.google.com/p/pcplot/">PCPlot</a> belongs to Dasha and contains the code more or less as it appeared in Fervor.  <a href="http://code.google.com/p/flexpc/">FlexPC</a> is a project Krist started with a couple of developers he met through a flexcoders post about PCP, but that project is still in the planning stage.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelvandaniker.com/blog/2008/10/13/parallel-coordinates-plot-in-flex/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>HeatMapping the Spread of WalMart</title>
		<link>http://michaelvandaniker.com/blog/2008/08/11/heat-mapping-the-spread-of-walmart/</link>
		<comments>http://michaelvandaniker.com/blog/2008/08/11/heat-mapping-the-spread-of-walmart/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 06:20:23 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Information Visualization]]></category>
		<category><![CDATA[Heat Map]]></category>
		<category><![CDATA[ModestMaps]]></category>

		<guid isPermaLink="false">http://michaelvandaniker.com/blog/?p=9</guid>
		<description><![CDATA[I recently came across a post on FlowingData with a visualization showing the growth of the WalMart chain over the years.  It&#8217;s very well done, but all those icons really clutter up the map.  The fact that they&#8217;re semi-transparent makes it possible to distinguish the dense areas from the sparse ones, but it&#8217;s difficult to [...]]]></description>
			<content:encoded><![CDATA[<p>I recently came across a post on <a href="http://flowingdata.com/2008/07/10/watching-the-growth-of-walmart-across-america-interactive-edition/">FlowingData</a> with a visualization showing the growth of the WalMart chain over the years.  It&#8217;s very well done, but all those icons really clutter up the map.  The fact that they&#8217;re semi-transparent makes it possible to distinguish the dense areas from the sparse ones, but it&#8217;s difficult to tell those intermediate shades of green apart from one another.  It sure would be nice if the color varied across the map instead&#8230; heat maps to the rescue!</p>
<p>I&#8217;ve put together <strong><a href="http://michaelvandaniker.com/labs/walmart/WalmartApp.html">my own animation</a></strong> of the WalMart dataset using <a href="http://modestmaps.com/">ModestMaps</a> and the <a href="http://michaelvandaniker.com/blog/2008/07/06/how-to-make-heat-maps-in-flex/">HeatMap</a> component.  The visualization is most impressive when you&#8217;ve zoomed in far enough to see all of the major roadways converging on the large cities.  From there you can watch as WalMart takes over the urban areas, turning them red hot while leaving the less populated areas (relatively) cold and blue.</p>
<p><a href="http://michaelvandaniker.com/labs/walmart/WalmartApp.html"><img class="alignnone size-medium wp-image-21" title="The Wildfire-Like Spread of Walmart" src="http://michaelvandaniker.com/blog/wp-content/uploads/2008/08/walmart.png" alt="" width="450" height="200" /></a></p>
<p>Unfortunately my dataset is somewhat incomplete.  The version I grabbed from <a href="http://www.econ.umn.edu/~holmes/data/WalMart/index.html">Thomas Holmes</a> has addresses for each store, but the geocoding service I used failed to convert about 100 of those addresses to latitude and longitude values.  If anyone can point me towards the complete dataset, I would love to add those missing stores to the visualization.</p>
<p>Before I close I want to give a nod to <a href="http://www.universalmind.com/">Universal Mind</a>.  Last week they released <a href="http://spatialkey.com/">SpatialKey</a>, a heavy-duty temporal-spatial visualization tool that really shows off the strengths of heat mapping.  They&#8217;ve taken a <a href="http://blog.spatialkey.com/2008/08/the-radial-expansion-of-wal-mart/">crack</a> at the WalMart data set as well, and it&#8217;s impressive to say the least.  Congratulations on your launch, UM.</p>
<p>Icons by <a href="http://www.famfamfam.com/lab/icons/silk/">famfamfam.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://michaelvandaniker.com/blog/2008/08/11/heat-mapping-the-spread-of-walmart/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

