<?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>vis4.net</title>
	<atom:link href="http://vis4.net/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://vis4.net/blog</link>
	<description>Visual Interaction Development in Flash, HTML5 and Processing</description>
	<lastBuildDate>Fri, 27 Aug 2010 10:30:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Experimenting With Stream Graph Colors</title>
		<link>http://vis4.net/blog/2010/08/streamgraph-color/</link>
		<comments>http://vis4.net/blog/2010/08/streamgraph-color/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 09:25:32 +0000</pubDate>
		<dc:creator>Gregor</dc:creator>
				<category><![CDATA[visualizations]]></category>

		<guid isPermaLink="false">http://vis4.net/blog/?p=1941</guid>
		<description><![CDATA[In the last week I experimented a little with stream graphs and created a tool which helps finding nice color scales for stream graphs.]]></description>
			<content:encoded><![CDATA[<p><img src='http://vis4.net/blog/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/blog/wp-content/thumbnails/1941.png&amp;w=200&amp;h=0&amp;zc=1&amp;ft=png' alt='post thumbnail' /></p>
<p>I&#8217;m not quite sure about the real practical use of <a href="http://leebyron.com/else/streamgraph/">stream graph visualizations</a>, but I admit that they look very nice. In the last week I experimented a little with stream graphs and created a tool which helps finding nice color scales for stream graphs. It allows to define three different scales for each component of the HSL color space. The displayed data set is taken from Piwik Analytics and shows the evolution of visitor countries over the last 16 weeks. Click on the image to enter the live version.</p>
<p><a href="http://vis4.net/experiments/streamgraphs/"><img class="aligncenter size-large wp-image-1942" title="stream-countries-01" src="http://vis4.net/blog/wp-content/uploads/2010/08/stream-countries-01-1200x603.png" alt="" width="935" height="468" /></a></p>
<p>Below you find a small introduction to the different toolbar controls.</p>
<p style="text-align: center;"><a href="http://vis4.net/blog/wp-content/uploads/2010/08/help1.png"><img class="aligncenter size-full wp-image-1947" title="help" src="http://vis4.net/blog/wp-content/uploads/2010/08/help1.png" alt="" width="900" height="162" /></a></p>
<p style="text-align: left;">
<p style="text-align: left;"><em>Update</em>: I added the possibility to copy the URL of the current settings, which allows to permamently store and share a color scale.</p>
<p style="text-align: left;">Here are a few quick examples for different settings:</p>
<p style="text-align: center;"><a href="http://vis4.net/experiments/streamgraphs/?hueExp=1.2903301886792455&amp;lineColor=000000&amp;hueInvert=false&amp;lineAlpha=0.2&amp;hueMirrored=true&amp;visQuality=0.2&amp;labelMinSize=8&amp;splines=true&amp;labelMaxSize=25&amp;satMin=0.1509433962264151&amp;layerAlpha=0.85&amp;labelAlpha=0.4&amp;satMax=0.9528301886792453&amp;bg=BBAAAA&amp;satExp=1.2358490566037736&amp;labelColor=000000&amp;satMirrored=false&amp;xLabelOffset=10&amp;lgtMin=0.4377358490566038&amp;xLabels=true&amp;xLabelColor=000000&amp;lgtMax=0.5410377358490566&amp;xLabelSize=13&amp;xLabelAlpha=0.4&amp;lines=true&amp;lgtMirrored=true&amp;hueMin=0&amp;hueMax=54.33962264150943&amp;lgtExp=1&amp;lgtAlt=-0.16666666666666666"><img class="alignnone size-full wp-image-1959" title="sg1" src="http://vis4.net/blog/wp-content/uploads/2010/08/sg11.png" alt="" width="300" height="177" /></a> &nbsp;&nbsp;&nbsp;<a href="http://vis4.net/experiments/streamgraphs/?xLabelAlpha=0.4&amp;lgtAlt=0.033333333333333326&amp;hueExp=1.0591981132075474&amp;lineColor=999999&amp;hueInvert=true&amp;hueMin=142.64150943396228&amp;lineAlpha=0.2&amp;hueMirrored=false&amp;labelAlpha=0.4&amp;satMin=0&amp;labelMinSize=8&amp;layerAlpha=0.85&amp;satMax=0.584433962264151&amp;bg=000000&amp;satExp=0.5283018867924528&amp;labelMaxSize=25&amp;labelColor=ccccee&amp;satMirrored=true&amp;xLabelSize=13&amp;lgtMin=0&amp;xLabelOffset=10&amp;xLabels=true&amp;lgtMax=0.6731132075471697&amp;visQuality=0.2&amp;lines=true&amp;splines=true&amp;lgtExp=0.6698113207547169&amp;xLabelColor=cccccc&amp;lgtMirrored=true&amp;hueMax=54.33962264150943"><img class="alignnone size-full wp-image-1960" title="sg2" src="http://vis4.net/blog/wp-content/uploads/2010/08/sg2.png" alt="" width="300" height="177" /></a> &nbsp;&nbsp;&nbsp;<a href="http://vis4.net/experiments/streamgraphs/?lgtAlt=-0.09999999999999998&amp;hueExp=1.0591981132075474&amp;lineColor=333333&amp;hueInvert=true&amp;lineAlpha=0.2&amp;hueMirrored=false&amp;visQuality=0.2&amp;labelMinSize=8&amp;splines=true&amp;labelMaxSize=25&amp;satMin=0.5188679245283019&amp;layerAlpha=0.85&amp;satMax=0.5183962264150944&amp;labelAlpha=0.4&amp;bg=EDEDEF&amp;satExp=0.5283018867924528&amp;labelColor=CCCCEE&amp;satMirrored=true&amp;xLabelOffset=10&amp;lgtMin=0.27358490566037735&amp;xLabels=true&amp;lgtMax=0.2957547169811321&amp;xLabelColor=333333&amp;xLabelSize=13&amp;lgtExp=0.6698113207547169&amp;xLabelAlpha=0.4&amp;lines=true&amp;hueMin=193.58490566037736&amp;lgtMirrored=false&amp;hueMax=196.9811320754717"><img class="alignnone size-full wp-image-1962" title="sg3" src="http://vis4.net/blog/wp-content/uploads/2010/08/sg3.png" alt="" width="300" height="177" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://vis4.net/blog/2010/08/streamgraph-color/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Further Development Of The Piwik Map</title>
		<link>http://vis4.net/blog/2010/08/piwik-maps-2/</link>
		<comments>http://vis4.net/blog/2010/08/piwik-maps-2/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 10:54:35 +0000</pubDate>
		<dc:creator>Gregor</dc:creator>
				<category><![CDATA[visualizations]]></category>
		<category><![CDATA[geoip]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[piwik]]></category>

		<guid isPermaLink="false">http://vis4.net/blog/?p=1869</guid>
		<description><![CDATA[Ideas for the upcoming features for my Piwik Maps plugin.]]></description>
			<content:encoded><![CDATA[<p><img src='http://vis4.net/blog/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/blog/wp-content/thumbnails/1869.png&amp;w=200&amp;h=0&amp;zc=1&amp;ft=png' alt='post thumbnail' /></p>
<p>Here are my ideas for the next version of <a href="http://vis4.net/blog/2010/07/piwik-maps/">Piwik Maps</a>.</p>
<ul>
<li>The map has altogether four views: world, continent<sup class='footnote'><a href='#fn-1869-1' id='fnref-1869-1'>1</a></sup> and two new country views for provinces and cities.</li>
<li>In both country views there is one active country. All other countries are displayed in gray like the empty countries in world and continent view (the inactive country borders are missing in the following images, just imagine them for now).</li>
<li>Since we now have three different zoom levels it is not as easy to provide simple navigation through the views. Starting from the world view, the user can click on active regions to zoom into it<sup class='footnote'><a href='#fn-1869-2' id='fnref-1869-2'>2</a></sup>. At every time, clicking at the &#8220;sea&#8221; (the white space) leads to a zoom out to the previous level. After selecting a country the user can switch between province and city view using the icons in the bottom icon bar.</li>
<li>To improve the navigation between different countries, all inactive countries are labeled with their iso-code (or maybe the full country name). This way the user can easily jump between adjacent countries. Empty countries (= countries with no visitors coming from) are not clickable. The other country labels could be sized relativly to the number of visitors, but this may be to distractive.</li>
<li>On top of the map the user can see the total number of visits for the active country.</li>
</ul>
<h4>Province view</h4>
<p>Now we come to the first new country mode, which displays all sub-regions or provinces of a country. Since maintaining all provinces for nearly 300 countries means a lot of work, this feature may be limited to some countries at first. The tooltip displays the name (again a lot of work for the translators) and the selected metrics. I&#8217;m not quite sure about the percentage value, but I tend to relate it to the countries total value (and not the overall total value as in world view), which would mean &#8220;4% of the all site visitors of France came from Burgundy&#8221;.</p>
<p><img class="aligncenter size-full wp-image-1875" title="regions" src="http://vis4.net/blog/wp-content/uploads/2010/08/regions1.png" alt="" width="630" height="428" /></p>
<h4>City view</h4>
<p>The second country view displays all visitors city in the selected country. The concept should be familiar to most web analytics users, so I think it&#8217;s a good idea to adapt the bubble layout from GA. Note the change in the icon bar in the following mockup:</p>
<p><img class="aligncenter size-full wp-image-1876" title="cities" src="http://vis4.net/blog/wp-content/uploads/2010/08/cities2.png" alt="" width="630" height="428" /></p>
<p>If you have any comments or suggestions for the further development of the map widget, feel free to join the discussion in the comment section.
<div class='footnotes'>
<div class='footnotedivider'></div>
<ol>
<li id='fn-1869-1'>Some continents are divided into serveral regions for better zooming performance <span class='footnotereverse'><a href='#fnref-1869-1'>&#8617;</a></span></li>
<li id='fn-1869-2'>This is the first difficult point since the world map already provides tooltips for individual countries. Some users might get annoyed when they have to find and click their preferred country twice. On the other hand are users which might get confused when jumping from the world view to a (possibly wrong selected) country. <span class='footnotereverse'><a href='#fnref-1869-2'>&#8617;</a></span></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://vis4.net/blog/2010/08/piwik-maps-2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Hierarchical Pie Visualization for Piwik Browsers Stats</title>
		<link>http://vis4.net/blog/2010/08/piwik-browser-stats-visualization/</link>
		<comments>http://vis4.net/blog/2010/08/piwik-browser-stats-visualization/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 13:14:44 +0000</pubDate>
		<dc:creator>Gregor</dc:creator>
				<category><![CDATA[portfolio]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[visualizations]]></category>
		<category><![CDATA[chart]]></category>
		<category><![CDATA[pie]]></category>
		<category><![CDATA[piwik]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://vis4.net/blog/?p=1837</guid>
		<description><![CDATA[A new plugin for Piwik Analytics which improves the current browser stats visualization.]]></description>
			<content:encoded><![CDATA[<p><img src='http://vis4.net/blog/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/blog/wp-content/thumbnails/1837.png&amp;w=200&amp;h=0&amp;zc=1&amp;ft=png' alt='post thumbnail' /></p>
<p>After writing down <a href="http://vis4.net/blog/2010/08/piwik-vis-ideas/">my latest ideas</a> for better Piwik visualizations, I just couldn&#8217;t wait to see them in action. Since the Open Flash Chart library doesn&#8217;t support multi-level pie charts I decided to create the visualization from scratch. The initial version (0.1) took me about two hours coding.</p>
<p>In the following image you can compare the hierarchical pie visualization (top) with the current pie visualization (bottom).</p>
<p><img class="aligncenter size-full wp-image-1851" title="screenshot" src="http://vis4.net/blog/wp-content/uploads/2010/08/screenshot1.png" alt="" width="619" height="681" /></p>
<p>I named the plugin <em>UserSettingsExt</em> as it extends the current UserSettings plugin. You can download it from the <a href="http://dev.piwik.org/trac/raw-attachment/ticket/1558/UserSettingsExt.zip">Piwik Developer Zone</a> to test it on your own Piwik installation.</p>
<h3>Changelog</h3>
<ul>
<li><strong>0.1</strong> &#8211; basic pie chart drawing, label placement.</li>
<li><strong>0.2</strong> &#8211; added standard piwik tooltips</li>
<li><strong>0.3</strong> &#8211; added automatic resizing</li>
</ul>
<p>If you don&#8217;t want to miss any updates, you can subscribe to the plugins <a href="http://dev.piwik.org/trac/ticket/1558?format=rss">rss-feed</a> at the Piwik Developer Zone.</p>
<p>Feedback welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://vis4.net/blog/2010/08/piwik-browser-stats-visualization/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Further Ideas For Piwik Visualization Improvements</title>
		<link>http://vis4.net/blog/2010/08/piwik-vis-ideas/</link>
		<comments>http://vis4.net/blog/2010/08/piwik-vis-ideas/#comments</comments>
		<pubDate>Sun, 08 Aug 2010 22:54:35 +0000</pubDate>
		<dc:creator>Gregor</dc:creator>
				<category><![CDATA[visualizations]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[chart]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[pie]]></category>
		<category><![CDATA[piwik]]></category>

		<guid isPermaLink="false">http://vis4.net/blog/?p=1803</guid>
		<description><![CDATA[Concept for new visulizations of statistics of browsers and screen resolutions.]]></description>
			<content:encoded><![CDATA[<p><img src='http://vis4.net/blog/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/blog/wp-content/thumbnails/1803.png&amp;w=200&amp;h=0&amp;zc=1&amp;ft=png' alt='post thumbnail' /></p>
<p>In this post I want to present two ideas for improvements to the current <a href="http://www.piwik.org">Piwik</a> visualizations.</p>
<h3>Screen resolution stats</h3>
<p>The first idea is about improving the screen resolution charts. Here is an example for the current available visualizations in Piwik:</p>
<p><img class="aligncenter size-full wp-image-1807" title="scrres01" src="http://vis4.net/blog/wp-content/uploads/2010/08/scrres01.png" alt="" width="630" height="250" /></p>
<p>The current charts (pie,bar) aren&#8217;t quite applicable to get an useful overview about the visitors screen resolutions. Both charts are limited to a few big values and combine all other values in the &#8220;others&#8221; element. This can lead to wrong interpretation of the data, since there might be many different screen sizes. In the example nearly the half of the sites visitors have screen resolutions that arent&#8217; displayed in the charts.</p>
<p>The obvious reason is that pie and bar charts are made for simple, <em>one-dimensional</em> data sets but the number of visits per screen resolution is a perfect representative of <em>two-dimensional</em> data sets. The two dimensions are obviously the screen width and the screen height. One of the simplest yet best visualization type to display two-dimensional data sets is the <em>scatter plot</em>. You can see the difference in no time by looking at the following prototype. In my opinion, this is the only way to make the screen resolution stats usable.</p>
<p><img class="aligncenter size-full wp-image-1811" title="scr-res-plot" src="http://vis4.net/blog/wp-content/uploads/2010/08/scr-res-plot.png" alt="" width="462" height="261" /></p>
<h3>Browser statistics</h3>
<p>My second idea is about the browser statistic charts. Again, there is only limited use to the currently provided charts.</p>
<p><img class="aligncenter size-full wp-image-1814" title="browser-stats" src="http://vis4.net/blog/wp-content/uploads/2010/08/browser-stats.png" alt="" width="630" height="236" /></p>
<p>The chart shows data of multiple browsers in multiple versions. Each combination of browser and value is treated as a distinct value and hence is shown in a unique color. The main problem of the current visualizations is (again) that the data is treated as one-dimensional. The data is in fact a hierarchical data set: the first layer is the <em>browser </em>layer which contains the sub-layer <em>browser versions</em>. One way of making a visualization more useable is to decrease the complexity, which can be done by only showing the <em>browser </em>level.</p>
<p><img class="aligncenter size-full wp-image-1825" title="settings-browse2_lev1" src="http://vis4.net/blog/wp-content/uploads/2010/08/settings-browse2_lev1.png" alt="" width="627" height="252" /></p>
<p>The visualization now clearly shows the information that is asked by most of the Piwik users: Which browsers are used by the visitors of my website? Some users might also want to know more details about the different browser versions, so there is a link to an second view that shows all browser versions.</p>
<p><img class="aligncenter size-full wp-image-1826" title="settings-browse2_lev2" src="http://vis4.net/blog/wp-content/uploads/2010/08/settings-browse2_lev2.png" alt="" width="622" height="255" /></p>
<p>Feedback welcome..</p>
]]></content:encoded>
			<wfw:commentRss>http://vis4.net/blog/2010/08/piwik-vis-ideas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Map Visualization For Piwik Web Analytics</title>
		<link>http://vis4.net/blog/2010/07/piwik-maps/</link>
		<comments>http://vis4.net/blog/2010/07/piwik-maps/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 18:36:13 +0000</pubDate>
		<dc:creator>Gregor</dc:creator>
				<category><![CDATA[portfolio]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[visualizations]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[piwik]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://vis4.net/blog/?p=1762</guid>
		<description><![CDATA[My first Piwik plugin displays a simple world map of the visitors countries.]]></description>
			<content:encoded><![CDATA[<p><img src='http://vis4.net/blog/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/blog/wp-content/thumbnails/1762.png&amp;w=200&amp;h=0&amp;zc=1&amp;ft=png' alt='post thumbnail' /></p>
<p><img class="aligncenter size-full wp-image-1775" title="piwik-maps" src="http://vis4.net/blog/wp-content/uploads/2010/07/piwik-maps.png" alt="" width="630" height="200" /></p>
<p>If you&#8217;re using <a href="http://www.piwik.org">Piwik</a>, the open source web analytics tool, then you probably already missed a map visualization of your visitors location, which is a standard feature of all major web analytics tools. As I really like the idea of open source and decentral web analytics and also gained some experiences on <a href="http://vis4.net/blog/tags/map/">map visualizations</a>, I decided to contribute a map plugin to the Piwik community.</p>
<h3>Download</h3>
<p><span style="text-decoration: line-through;">You can download the plugin here: <a href="http://dev.piwik.org/trac/raw-attachment/ticket/1514/UserCountryMap.zip">UserCountryMap.zip</a></span></p>
<p><em>Update</em>: the current version of my plugin relies on features, that are not available in Piwik 0.6.4 yet, so it doesn&#8217;t work now. You have to either wait for the final release of Piwik 1.0, which will be released in August 2010 and will include the map plugin by default, or checkout the current development version <a href="http://dev.piwik.org/trac#SVNAccess">via svn</a>.</p>
<h3>Features</h3>
<p><strong>Interactive world map:</strong> The plugin provides a new dashboard widget showing an interactive world map. The countries are colored according to the selected data metric (like number of unique visitors). It is possible to zoom into certain regions to get a closer look at smaller countries. While moving the mouse over countries, tooltips show the exact value and its ratio.</p>
<p><strong>Piwik API integration:</strong> The map is fully integrated into the new Piwik report API, so there is no limitation on the displayed data metrics.</p>
<p><strong>Legend:</strong> Besides the map there is a small legend that helps to interpret the country colors. This is especially helpful, if you want to print out the map.</p>
<p><strong>Fullscreen:</strong> You can set the map into fullscreen mode. This is very handy if you&#8217;re working on a smaller screen.</p>
<p><strong>Image export:</strong> It is possible to download the current map view as PNG image, just like the other flash-based charts in Piwik. The exported map view will be resized to 1000px width. You can even export high-resolution images by using the image export while in fullscreen mode (accessible via context menu).</p>
<h3>Screenshot</h3>
<p>This is how the widget looks, after zooming into Europe:</p>
<p><img class="aligncenter size-full wp-image-1794" title="mapplugin" src="http://vis4.net/blog/wp-content/uploads/2010/07/mapplugin3.png" alt="" width="615" height="376" /></p>
<p>Here is an example for the new fullscreen mode (click image to enlarge):</p>
<p><a href="http://vis4.net/blog/wp-content/uploads/2010/07/fullscreen.png"><img class="aligncenter size-medium wp-image-1800" title="fullscreen" src="http://vis4.net/blog/wp-content/uploads/2010/07/fullscreen.png" alt="" width="630" /></a></p>
<h3>Current progress / Roadmap</h3>
<p><del datetime="2010-08-07T06:02:54+00:00">The plugin is ready and waits for the release of Piwik 1.0</del>.<br />
Update: Since Piwik 0.9 the map plugin is one of the core plugins that are also activated by default.</p>
<p><strong>Future versions</strong><br />
There are some more features, which I would like to implement in the future. One is to display vistitors cities as implemented in Google Analytics<strong>. </strong>This feature needs further improvement on the <a href="http://dev.piwik.org/trac/ticket/45">GeoIP plugin</a>, because by now Piwik does only store the visitors country but not the city. Once this features makes it into Piwik core I&#8217;ll update the map plugin.</p>
<h3>Donate</h3>
<p>If you like the plugin, please support the developer with a small donation via paypal or <a href="https://flattr.com/thing/40401/Map-Visualization-For-Piwik-Web-Analytics">flattr</a>.</p>
<p><a href="http://flattr.com/thing/40401/Map-Visualization-For-Piwik-Web-Analytics" target="_blank"><br />
<img style="border: 0;" title="Flattr this" src="http://api.flattr.com/button/button-compact-static-100x17.png" border="0" alt="Flattr this" /></a></p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="cmd" type="hidden" value="_s-xclick" />
<input name="hosted_button_id" type="hidden" value="TT7AGBLCC75TS" />
<input alt="PayPal - The safer, easier way to pay online!" name="submit" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" type="image" /> </form>
]]></content:encoded>
			<wfw:commentRss>http://vis4.net/blog/2010/07/piwik-maps/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Simplification of Country Outlines</title>
		<link>http://vis4.net/blog/2010/07/simplification-of-country-outlines/</link>
		<comments>http://vis4.net/blog/2010/07/simplification-of-country-outlines/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 10:19:17 +0000</pubDate>
		<dc:creator>Gregor</dc:creator>
				<category><![CDATA[basics]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[map]]></category>

		<guid isPermaLink="false">http://vis4.net/blog/?p=1705</guid>
		<description><![CDATA[This post shows how I implemented simple polygon outline simplification in AS3.]]></description>
			<content:encoded><![CDATA[<p><img src='http://vis4.net/blog/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/blog/wp-content/thumbnails/1705.png&amp;w=200&amp;h=0&amp;zc=1&amp;ft=png' alt='post thumbnail' /></p>
<p>Simplification is a common task in vector-based map visualization. In some situations you don&#8217;t want to display a map in its full resolution for reasons like the overall filesize and the rendering time. One major class of simplification algorithms works by removing some vertices without moving the remaining ones. While there are already some good tutorials for implementation of line simplification algorithms online<sup class='footnote'><a href='#fn-1705-1' id='fnref-1705-1'>1</a></sup>, none of them takes into account the special requirements of map data simplifications. This gap will be closed by this post.<span id="more-1705"></span></p>
<p>At first I want to introduce the used data set. It&#8217;s a very basic map of all european countries. The first image shows the output of the map rendering without simplification.</p>
<p style="text-align: center;"><a href="http://vis4.net/blog/wp-content/uploads/2010/07/full_res.png"><img class="size-full wp-image-1718 aligncenter" title="full_res__" src="http://vis4.net/blog/wp-content/uploads/2010/07/full_res__1.png" alt="" width="630" height="300" /></a></p>
<p>While there are many simplification algorithms out there, this tutorial uses a very simple one. It&#8217;s strategy is to remove certain points that are too close to the last kept point. This is not the smartest algorithm ever, but still one of the fastest, because it don&#8217;t needs recursion and runs in O(n).</p>

<div class="wp_syntax"><div class="actionscript"><pre class="de1">const minDistSq:<span class="kw3">Number</span> = <span class="nu0">100000</span> <span class="sy0">*</span> <span class="nu0">100000</span>; <span class="co1">// radius 100km</span>
<span class="kw2">var</span> countries:<span class="kw3">Array</span>, shapes:<span class="kw3">Array</span>, shape:<span class="kw3">Array</span>, pt:<span class="kw3">Object</span>, lastPt:<span class="kw3">Object</span>, distSq:<span class="kw3">Number</span>;
&nbsp;
<span class="kw1">for</span> <span class="kw1">each</span> <span class="br0">&#40;</span>shapes <span class="kw1">in</span> countries<span class="br0">&#41;</span> <span class="br0">&#123;</span>
	<span class="kw1">for</span> <span class="kw1">each</span> <span class="br0">&#40;</span>shape <span class="kw1">in</span> shapes<span class="br0">&#41;</span> <span class="br0">&#123;</span>
		lastPt = shape<span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span>;
		<span class="kw1">for</span> <span class="kw1">each</span> <span class="br0">&#40;</span>pt <span class="kw1">in</span> shape<span class="br0">&#41;</span> <span class="br0">&#123;</span>
			<span class="kw1">if</span> <span class="br0">&#40;</span>pt == shape<span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span><span class="br0">&#41;</span> <span class="kw1">continue</span>; <span class="co1">// skip first point</span>
			distSq = <span class="br0">&#40;</span>lastPt.<span class="me1">x</span> <span class="sy0">*</span> lastPt.<span class="me1">x</span> - pt.<span class="me1">x</span> <span class="sy0">*</span> pt.<span class="me1">x</span><span class="br0">&#41;</span> + <span class="br0">&#40;</span>lastPt.<span class="me1">y</span> <span class="sy0">*</span> lastPt.<span class="me1">y</span> - pt.<span class="me1">y</span> <span class="sy0">*</span> pt.<span class="me1">y</span><span class="br0">&#41;</span>;
			<span class="kw1">if</span> <span class="br0">&#40;</span>distSq <span class="sy0">&amp;</span>lt; minDistSq<span class="br0">&#41;</span> pt.<span class="me1">deleted</span> = <span class="kw2">true</span>;
			<span class="kw1">else</span> lastPt = pt;
		<span class="br0">&#125;</span>
	<span class="br0">&#125;</span>
<span class="br0">&#125;</span></pre></div></div>

<p>This algorithm works perfect on single polygons, but there are some drawbacks when using it for simplication of country outlines. As you can see in the next image, the simplification introduced overlappings and gaps between the countries.</p>
<p><a href="http://vis4.net/blog/wp-content/uploads/2010/07/step1.png"><img class="aligncenter size-full wp-image-1720" title="step1__" src="http://vis4.net/blog/wp-content/uploads/2010/07/step1__.png" alt="" width="630" height="300" /></a></p>
<p>The problem here is that different polygons that share the same boundary were treated seperately. To fix this we need to refine the current map topology (CONTINENT &gt; COUNTRY &gt; SHAPES) in a way, that the &#8220;shared vertices&#8221; were stored only once.  The algorithm simply iterates over all points and stores them into a global point register. Every new point will then be checked for equality (same x and y coordinates) with any of the previously saved points. If the algorithm finds an equal point, the reference to the duplicate point will be replaced and the custom property <tt>inner</tt> will be set to true (which means that this point lays on more than one country border). Incidentally this will also decrease the map file size and gives us a classification of  &#8220;inner&#8221; and &#8220;outer&#8221; points for free.</p>
<p>When we run the algorithm again, we need to remeber wether the simplification already visited point, to avoid double removal. The results look much better than before, but still need some improvements:</p>
<p><a href="http://vis4.net/blog/wp-content/uploads/2010/07/step2.png"><img class="aligncenter size-full wp-image-1722" title="step2__" src="http://vis4.net/blog/wp-content/uploads/2010/07/step2__.png" alt="" width="630" height="300" /></a></p>
<p>Obviously, there is one case we forgot, which I call <em>three-country-crossings</em>, which means all points that lay on more than <em>two</em> country borders. Removing one of these points leads to triangle shaped holes inside the continent area. To avoid those holes, we got to mark all three-country-crossings as undeletable. We can find three-country-crossings by counting how often we visit a single point during the topology initialization.</p>
<p><a href="http://vis4.net/blog/wp-content/uploads/2010/07/step3.png"><img class="aligncenter size-full wp-image-1724" title="step3__" src="http://vis4.net/blog/wp-content/uploads/2010/07/step3__.png" alt="" width="630" height="300" /></a></p>
<p>Now we are nearly finished. It took me a few days to notice that there is another case, we have to consider. If you compare at the crossover between Spain and France at the Mediterranean  Sea side, then you note the tiny cut into the landscape, that is introduced by the simplification.</p>
<p><img class="aligncenter size-full wp-image-1730" title="cut" src="http://vis4.net/blog/wp-content/uploads/2010/07/cut.png" alt="" width="621" height="239" /></p>
<p>To avoid those cuts we must identify all vertices that connects two countries and lay on the outside of a continent area. We can do so by comparing the current visited point with the last visited point, and if one lays on two countries and the other only on one, we mark the one on two countries as undeletable. The last picture shows the final output of the simplification:</p>
<p><a href="http://vis4.net/blog/wp-content/uploads/2010/07/map-4.png"><img class="aligncenter size-full wp-image-1733" title="map-4p" src="http://vis4.net/blog/wp-content/uploads/2010/07/map-4p.png" alt="" width="630" height="300" /></a></p>
<p>I hope this tutorial was useful to you, if anyone needs more code examples on this topic, let me know via comment.
<div class='footnotes'>
<div class='footnotedivider'></div>
<ol>
<li id='fn-1705-1'>for instance the <a href="http://www.lostinactionscript.com/blog/index.php/2007/07/11/douglas-peuker-line-generalization/">Douglas Peuker Line Generalization</a> or <a href="http://motiondraw.com/md/as_samples/t/LineGeneralization/demo.html">Lang Simplification and McMaster&#8217;s Slide Averaging Algorithm</a> <span class='footnotereverse'><a href='#fnref-1705-1'>&#8617;</a></span></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://vis4.net/blog/2010/07/simplification-of-country-outlines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Helper Class For Delayed Code Execution In AS3</title>
		<link>http://vis4.net/blog/2010/07/helper-class-for-delayed-code-execution-in-as3/</link>
		<comments>http://vis4.net/blog/2010/07/helper-class-for-delayed-code-execution-in-as3/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 15:42:27 +0000</pubDate>
		<dc:creator>Gregor</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[actionscript]]></category>

		<guid isPermaLink="false">http://vis4.net/blog/?p=1689</guid>
		<description><![CDATA[This is a convenient wrapper class for flash.utils.Timer]]></description>
			<content:encoded><![CDATA[<p><img src='http://vis4.net/blog/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/blog/wp-content/thumbnails/1689.png&amp;w=200&amp;h=0&amp;zc=1&amp;ft=png' alt='post thumbnail' /></p>
<p>This is a small class that I use very often. Its purpose is to simplify the execution of methods after a specific delay. Normally you would have to create a new Timer instance, attach an event listener for the TimerEvent.TIMER event and find a way to store the arguments that you want to pass to the event handler. Using the <tt>DelayedExecution</tt> class, this whole process goes in one line of code:</p>

<div class="wp_syntax"><div class="actionscript"><pre class="de1"><span class="kw2">function</span> helloWorld<span class="br0">&#40;</span><span class="kw3">name</span>:<span class="kw3">String</span>, <span class="kw3">message</span>:<span class="kw3">String</span><span class="br0">&#41;</span>:<span class="kw3">void</span> <span class="br0">&#123;</span>
	<span class="kw3">trace</span><span class="br0">&#40;</span> <span class="kw3">name</span> + <span class="st0">' says &quot;'</span> + <span class="kw3">message</span> +<span class="st0">'&quot;'</span> <span class="br0">&#41;</span>;
<span class="br0">&#125;</span>
&nbsp;
<span class="kw2">new</span> DelayedExecution<span class="br0">&#40;</span><span class="nu0">4000</span>, <span class="kw3">this</span>, helloWorld, <span class="st0">&quot;john&quot;</span>, <span class="st0">&quot;hello world&quot;</span><span class="br0">&#41;</span>;
<span class="co1">// will result in a 'john says &quot;hello world&quot;' trace after 4 seconds</span></pre></div></div>

<p>That&#8217;s all. First parameter is the delay in milliseconds, second is the object on which you want to call the method, third is the method itself and any following parameters will be passed to the method. Here you can grep the source of the DelayedExecution class. Feel free to use it for whatever you like.</p>

<div class="wp_syntax"><div class="actionscript"><pre class="de1">package net.<span class="me1">vis4</span>.<span class="me1">utils</span>
<span class="br0">&#123;</span>
	<span class="kw3">import</span> flash.<span class="me1">events</span>.<span class="me1">Event</span>;
	<span class="kw3">import</span> flash.<span class="me1">events</span>.<span class="me1">TimerEvent</span>;
	<span class="kw3">import</span> flash.<span class="me1">utils</span>.<span class="me1">Timer</span>;
&nbsp;
	<span class="kw3">public</span> <span class="kw2">class</span> DelayedExecution
	<span class="br0">&#123;</span>
		<span class="kw3">private</span> <span class="kw2">var</span>
			_obj:<span class="kw3">Object</span>,
			_func:<span class="kw2">Function</span>,
			_args:<span class="kw3">Array</span>;
		<span class="coMULTI">/*
		 *  new DelayedExecution(100, Math, round, 4.5);
		 *
		 *  parameters:
		 *  - delay
		 *  - object
		 *  - function
		 *  - parameters
		 */</span>
		<span class="kw3">public</span> <span class="kw2">function</span> DelayedExecution<span class="br0">&#40;</span>... <span class="kw3">arguments</span><span class="br0">&#41;</span>
		<span class="br0">&#123;</span>
			<span class="kw1">if</span> <span class="br0">&#40;</span><span class="kw3">arguments</span>.<span class="kw3">length</span> <span class="sy0">&amp;</span>lt; <span class="nu0">3</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
				<span class="kw3">trace</span><span class="br0">&#40;</span><span class="st0">'DelayedExecution-Error: missing arguments'</span><span class="br0">&#41;</span>;
			<span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span>
				<span class="kw1">if</span> <span class="br0">&#40;</span><span class="kw3">arguments</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span> is uint <span class="sy0">||</span> <span class="kw3">arguments</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span> is <span class="kw3">Number</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
					<span class="kw1">if</span> <span class="br0">&#40;</span><span class="kw3">arguments</span><span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span> is <span class="kw3">Object</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
						<span class="kw1">if</span> <span class="br0">&#40;</span><span class="kw3">arguments</span><span class="br0">&#91;</span><span class="nu0">2</span><span class="br0">&#93;</span> is <span class="kw2">Function</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
							_obj = <span class="kw3">arguments</span><span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span>;
							_func = <span class="kw3">arguments</span><span class="br0">&#91;</span><span class="nu0">2</span><span class="br0">&#93;</span>;
							_args = <span class="br0">&#91;</span><span class="br0">&#93;</span>;
							<span class="kw1">if</span> <span class="br0">&#40;</span><span class="kw3">arguments</span>.<span class="kw3">length</span> <span class="sy0">&amp;</span>gt; <span class="nu0">3</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
								<span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> i:uint = <span class="nu0">3</span>; i <span class="sy0">&amp;</span>lt; <span class="kw3">arguments</span>.<span class="kw3">length</span>; i++<span class="br0">&#41;</span> <span class="br0">&#123;</span>
									_args.<span class="kw3">push</span><span class="br0">&#40;</span><span class="kw3">arguments</span><span class="br0">&#91;</span>i<span class="br0">&#93;</span><span class="br0">&#41;</span>;
								<span class="br0">&#125;</span>
							<span class="br0">&#125;</span>
							<span class="kw2">var</span> t:Timer = <span class="kw2">new</span> Timer<span class="br0">&#40;</span><span class="kw3">arguments</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span> as <span class="kw3">Number</span>, <span class="nu0">1</span><span class="br0">&#41;</span>;
							t.<span class="me1">addEventListener</span><span class="br0">&#40;</span>TimerEvent.<span class="me1">TIMER</span>, exec<span class="br0">&#41;</span>;
							t.<span class="kw3">start</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;
						<span class="br0">&#125;</span> <span class="kw1">else</span> <span class="kw3">trace</span><span class="br0">&#40;</span><span class="st0">'DelayedExecution-Error: third argument should be a function'</span><span class="br0">&#41;</span>;
					<span class="br0">&#125;</span> <span class="kw1">else</span> <span class="kw3">trace</span><span class="br0">&#40;</span><span class="st0">'DelayedExecution-Error: seconds argument should be an object (this-context of function)'</span><span class="br0">&#41;</span>;
				<span class="br0">&#125;</span> <span class="kw1">else</span> <span class="kw3">trace</span><span class="br0">&#40;</span><span class="st0">'DelayedExecution-Error: first argument should be a number (milliseconds delay)'</span><span class="br0">&#41;</span>;
			<span class="br0">&#125;</span>
		<span class="br0">&#125;</span>
&nbsp;
		<span class="kw3">private</span> <span class="kw2">function</span> exec<span class="br0">&#40;</span><span class="kw3">e</span>:Event = <span class="kw2">null</span><span class="br0">&#41;</span>:<span class="kw3">void</span>
		<span class="br0">&#123;</span>
			_func.<span class="kw3">apply</span><span class="br0">&#40;</span>_obj, _args<span class="br0">&#41;</span>;
		<span class="br0">&#125;</span>
	<span class="br0">&#125;</span>
<span class="br0">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://vis4.net/blog/2010/07/helper-class-for-delayed-code-execution-in-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Touch Interface for an Imaginary Video Rental Store</title>
		<link>http://vis4.net/blog/2010/06/simple-touch-interface-for-an-imaginary-video-rental-store/</link>
		<comments>http://vis4.net/blog/2010/06/simple-touch-interface-for-an-imaginary-video-rental-store/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 16:18:47 +0000</pubDate>
		<dc:creator>Gregor</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[portfolio]]></category>
		<category><![CDATA[visualizations]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[movie]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://vis4.net/blog/2010/06/simple-touch-interface-for-an-imaginary-video-rental-store/</guid>
		<description><![CDATA[This is an AIR application I recently built for an assignment in the course Interactive Systems at the university. ]]></description>
			<content:encoded><![CDATA[<p><img src='http://vis4.net/blog/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/blog/wp-content/thumbnails/1682.png&amp;w=200&amp;h=0&amp;zc=1&amp;ft=png' alt='post thumbnail' /></p>
<p>This is an <a href="http://www.adobe.com/products/air/">AIR</a> application I built for an assignment in the course <a href="http://wwwisg.cs.uni-magdeburg.de/visualisierung/wiki/doku.php?id=teaching:interactivesystems">Interactive Systems</a> at the university. This video demonstrates all features like touch guestures and filtering. Since I don&#8217;t own a touchscreen, this is only a &#8220;fake&#8221; touch video. I&#8217;d love to try this out on a real touchscreen.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="480" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=12732705&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="480" src="http://vimeo.com/moogaloop.swf?clip_id=12732705&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://vis4.net/blog/2010/06/simple-touch-interface-for-an-imaginary-video-rental-store/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improving WordPress Stats Charts (2/2)</title>
		<link>http://vis4.net/blog/2010/06/improving-wordpress-com-stats-charts-22/</link>
		<comments>http://vis4.net/blog/2010/06/improving-wordpress-com-stats-charts-22/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 15:44:15 +0000</pubDate>
		<dc:creator>Gregor</dc:creator>
				<category><![CDATA[criticism]]></category>
		<category><![CDATA[visualizations]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://vis4.net/blog/?p=1632</guid>
		<description><![CDATA[Three-in-one chart for Wordpress Stats]]></description>
			<content:encoded><![CDATA[<p><img src='http://vis4.net/blog/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/blog/wp-content/thumbnails/1632.png&amp;w=200&amp;h=0&amp;zc=1&amp;ft=png' alt='post thumbnail' /></p>
<p>In the <a href="http://vis4.net/blog/2010/06/ten-steps-for-improving-wordpress-stats-charts/">last part</a> I gave five improvements to the charts that are shown in the <a href="http://wordpress.org/extend/plugins/stats/">WordPress.com Stats</a> plugin. I ended with the weekly visits chart, so now I conclude with improvements for the monthly visits chart and presenting the idea of putting all the three into one chart.<br />
<span id="more-1632"></span></p>
<h3>Improving The Monthly Visits Chart</h3>
<p><img class="aligncenter size-full wp-image-1609" title="wordpress-stats-month" src="http://vis4.net/blog/wp-content/uploads/2010/06/wordpress-stats-month.png" alt="" width="630" height="242" /></p>
<h4>6. Dealing With Different Month Lengths</h4>
<p>It&#8217;s easy to understand that comparing monthly visits of january and february is a bit like comparing apples and oranges since all months have different number of days. One way to get over this is to normalize the monthly visits according to the month length. This is simply done by dividing the monthly visits by the number of days in the month. You can see the difference if you compare the ratio of january and february in the normalized chart with the same values in the version above.</p>
<p><img class="aligncenter size-full wp-image-1610" title="wordpress-stats-month-avg" src="http://vis4.net/blog/wp-content/uploads/2010/06/wordpress-stats-month-avg.png" alt="" width="630" height="242" /></p>
<h4>7. Avoiding Misinterpretation Of The Last Month</h4>
<p>As the chart simply plots the number of visits per month it can cause some misinterpretation of the current month. So, instead of normalizing the months visits by the total number of days we just consider the number of already passed days. This results in an approximated value so it might be a good idea to visually indicate the approximation, for instance by using a dashed line as shown in the following example.</p>
<p><img class="aligncenter size-full wp-image-1626" title="wordpress-stats-month-estimated" src="http://vis4.net/blog/wp-content/uploads/2010/06/wordpress-stats-month-estimated.png" alt="" width="630" height="242" /></p>
<h3>Putting It All Together</h3>
<h4>8. Integrating All Data Into One Chart</h4>
<p>While experimenting with the wordpress statistic charts I got the idea of putting all three charts into one single chart. Therefore the weekly and monthly visit data had be normalized to daily averages as already shown in step 6. I chose a light color for the bar chart that again shows the total number of daily visits. The two line charts were put in front, one showing the average daily visits of a week and the other showing the average daily visits of a month. The lines are drawn in different line width so they can be easily seperated. The color indication for the weekends was replaced by vertical grid lines which helps to identify weeks. The now missing numbers of total visits per week and month were put into tooltips which popup when the user points over the line charts.</p>
<p><img class="aligncenter size-full wp-image-1654" title="wordpress-stats-all-new" src="http://vis4.net/blog/wp-content/uploads/2010/06/wordpress-stats-all-new1.png" alt="" width="630" height="242" /></p>
<h4>9. Smoothing The Line Charts</h4>
<p>The purpose of the line charts for average daily visits is to give the user an aproximate image of the visit trends in his blog. To underpin this character of aproximation I smoothed the line charts by replacing the straight lines with cubic bezier splines. This also gives the chart a nicer appearance.</p>
<p><img class="aligncenter size-full wp-image-1655" title="wordpress-stats-all-new-smooth" src="http://vis4.net/blog/wp-content/uploads/2010/06/wordpress-stats-all-new-smooth.png" alt="" width="630" height="242" /></p>
<h4>10. Adding Contextual Information To The Chart</h4>
<p>As the wordpress stats plugin also stores the number visits for each post and day, the idea came up to integrate information about blog posts in the chart. I decide to introduce another bar chart, that shows one bar for each post. The bar height is calculated using the average daily post visits. The time period considered for this calculation is limited to 45 days to take account of the fact that all posts are losing relevance over time.</p>
<p><img class="aligncenter size-full wp-image-1656" title="wordpress-stats-all-new-context" src="http://vis4.net/blog/wp-content/uploads/2010/06/wordpress-stats-all-new-context.png" alt="" width="630" height="242" /></p>
<p>To help the user identifing the blog posts I added a small tooltip which appears after hovering over the post bars. Since pointing the mouse to a certain item means that the user shows a special interest in that item, I decided to go one step further and also display the complete post visit statistics. To avoid mix-ups, the other post bars are hidden until the user moves the mouse to a &#8220;neutral&#8221; part of the chart.</p>
<p><a href="http://vis4.net/experiments/wpstats/"><img class="aligncenter size-full wp-image-1657" title="wordpress-stats-all-new-context-hover" src="http://vis4.net/blog/wp-content/uploads/2010/06/wordpress-stats-all-new-context-hover.png" alt="" width="630" height="242" /></a></p>
<h3>Live-Demo (beta)</h3>
<p>You can see the complete visualization in action by looking at the <a href="http://vis4.net/experiments/wpstats/">live-demo</a>. If you like to use this visualization for your own blog, please be patient a few days until I fixed all remaining bugs and wrote a tiny documentation for all possible flash variables.</p>
]]></content:encoded>
			<wfw:commentRss>http://vis4.net/blog/2010/06/improving-wordpress-com-stats-charts-22/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Improving WordPress Stats Charts (1/2)</title>
		<link>http://vis4.net/blog/2010/06/ten-steps-for-improving-wordpress-stats-charts/</link>
		<comments>http://vis4.net/blog/2010/06/ten-steps-for-improving-wordpress-stats-charts/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 15:43:44 +0000</pubDate>
		<dc:creator>Gregor</dc:creator>
				<category><![CDATA[criticism]]></category>
		<category><![CDATA[visualizations]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://vis4.net/blog/?p=1582</guid>
		<description><![CDATA[People deserve better charts than this.]]></description>
			<content:encoded><![CDATA[<p><img src='http://vis4.net/blog/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/blog/wp-content/thumbnails/1582.png&amp;w=200&amp;h=0&amp;zc=1&amp;ft=png' alt='post thumbnail' /></p>
<p><img class="aligncenter size-full wp-image-1666" title="total" src="http://vis4.net/blog/wp-content/uploads/2010/06/total.png" alt="" width="630" height="243" /><br />
<a href="http://wordpress.org/extend/plugins/stats/">WordPress.com Stats</a> is the most used statistic plugin for wordpress (with over <a href="http://wordpress.org/extend/plugins/stats/stats/">1.5 mio downloads</a> so far). It offers a very simple way of collecting anonymous visit statistics and has a nice backend that lets you explore the data using line charts and tables. I keep using this plugin since the very beginning of this blog and I must admit that I&#8217;m looking at it every day. But in doing so I recently started getting bugged of the charts. This post series shows ten ways for improving them.<span id="more-1582"></span></p>
<p><em>Hint:</em> if you want to skip all the boring talk about charts, you can jump directly to the <a href="http://vis4.net/experiments/wpstats/">live-demo</a> of the improved wordpress.com stats chart.</p>
<h3>Improving The Daily Visits Chart</h3>
<p>Here is the original line chart that shows the total number of daily visits:</p>
<p><img class="aligncenter size-full wp-image-1594" title="wordpress-stats-daily-orig" src="http://vis4.net/blog/wp-content/uploads/2010/06/wordpress-stats-daily-orig2.png" alt="" width="630" height="242" /></p>
<h4>1. Chosing The Right Chart For The Right Data</h4>
<p>Originally, the daily visits are visualized in a line chart. <a href="http://en.wikipedia.org/wiki/Line_chart">Line charts</a> are good and commonly used to show trends in data over continuous time series. But in the case of our daily visit chart we have a non-continuous time axis. If there were 100 visits on monday and 50 visits on tuesday, we cannot expect 75 visits in the night between monday and tuesday, but this is exactly what the line chart shows us. In cases of discontinuous (or discrete) data, a simple <a href="http://en.wikipedia.org/wiki/Bar_chart">bar chart</a> is the better choice.</p>
<p><img class="aligncenter size-full wp-image-1595" title="wordpress-stats-daily-bar" src="http://vis4.net/blog/wp-content/uploads/2010/06/wordpress-stats-daily-bar1.png" alt="" width="630" height="242" /></p>
<h4>2. Showing Indicators For Weekends</h4>
<p>Obviously, the number of daily visits follows certain patterns every week. Since there are less people surfing the web on weekends, the number decreases each saturday and sunday. This pattern has a greater influence on the visit  number than any of my posts, so it makes sense to introduce an indicator for weekends. In the following example, I changed the bar colors for saturdays and sundays.</p>
<p><img class="aligncenter size-full wp-image-1596" title="wordpress-stats-daily-bar-weekends" src="http://vis4.net/blog/wp-content/uploads/2010/06/wordpress-stats-daily-bar-weekends.png" alt="" width="630" height="242" /></p>
<h4>3. Enhancing The Contrast Between Background And Grid</h4>
<p>A gradient background from gray to white might be a crucial feature to someone, but for most people this just causes that one cannot perceive the grid. In the next version I changed the color of the background and the grid, which makes the grid a lot more useful.</p>
<p><img class="aligncenter size-full wp-image-1598" title="wordpress-stats-daily-bar-grid" src="http://vis4.net/blog/wp-content/uploads/2010/06/wordpress-stats-daily-bar-grid.png" alt="" width="630" height="242" /></p>
<h3>Improving The Weekly Visits Chart</h3>
<p>Now we start looking at the chart for the weekly visits. Again, this is the original line chart that is showed in the wordpress stats plugin.</p>
<p><img class="aligncenter size-full wp-image-1600" title="wordpress-stats-week" src="http://vis4.net/blog/wp-content/uploads/2010/06/wordpress-stats-week.png" alt="" width="630" height="242" /></p>
<h4>4. Introducing A More Usable Labeling Of The Time Axis</h4>
<p>The time axis is labeled with the week numbers. If you have no calendar next to you, I bet that you don&#8217;t know the exact date of the 14th week of 2010, even guessing the right month is difficult. In the next version I labeled the weeks with the date of the first day of the week and put the name of the month below.</p>
<p><img class="aligncenter size-full wp-image-1602" title="wordpress-stats-week-label" src="http://vis4.net/blog/wp-content/uploads/2010/06/wordpress-stats-week-label.png" alt="" width="630" height="242" /></p>
<h4>5. Using Rounded Values For The Visit Axis</h4>
<p>As you can see in the above image, the chart for the weekly visits introduces labels like &#8220;344&#8243; or &#8220;258&#8243;. This might be a little more comfortable for the developer, but it makes the chart less readable. Instead, rounded values like 300 and 400 are more easy to remember and help the viewer interpreting the chart.</p>
<p><img class="aligncenter size-full wp-image-1640" title="wordpress-stats-week-rounded" src="http://vis4.net/blog/wp-content/uploads/2010/06/wordpress-stats-week-rounded.png" alt="" width="630" height="242" /></p>
<p>In the next part I&#8217;ll continue with five more improvements like dealing with different month lengths or adding contextual information to the charts. Do you have any remarks so far? Feel free to post them in the comment section below.</p>
]]></content:encoded>
			<wfw:commentRss>http://vis4.net/blog/2010/06/ten-steps-for-improving-wordpress-stats-charts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching using disk

Served from: vis4.net @ 2010-09-09 18:53:42 -->