<?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>Well-formed data &#187; survey</title>
	<atom:link href="http://well-formed-data.net/archives/tag/survey/feed" rel="self" type="application/rss+xml" />
	<link>http://well-formed-data.net</link>
	<description>Moritz Stefaner / Visualization</description>
	<lastBuildDate>Wed, 11 Jan 2012 20:44:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Visualizing survey results</title>
		<link>http://well-formed-data.net/archives/426/visualizing-survey-results</link>
		<comments>http://well-formed-data.net/archives/426/visualizing-survey-results#comments</comments>
		<pubDate>Mon, 11 Jan 2010 20:22:34 +0000</pubDate>
		<dc:creator>Moritz Stefaner</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[protovis]]></category>
		<category><![CDATA[survey]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://well-formed-data.net/?p=426</guid>
		<description><![CDATA[In November 2009, I did a mini-project together with Boris Müller and the boys from raureif. My task was to create a visualization of the survey results of an event. The participants were asked to rate the events with respect to 9 questions on a scale from 1–10. As we did not have much time [...]]]></description>
			<content:encoded><![CDATA[<p>In November 2009, I did a mini-project together with <a href="http://esono.com">Boris Müller</a> and the boys from <a href="http://www.raureif.net/">raureif</a>. My task was to create a visualization of the survey results of an event. The participants were asked to rate the events with respect to 9 questions on a scale from 1–10. As we did not have much time (nor budget), we went for the first good-looking idea available. What could that be? Right, a radial visualization (be damned, circles for non-circular data!). Anyways, I produced a quick funky mockup with random data:
<img style="border:none;" src="http://well-formed-data.net/wp-content/uploads/2010/01/survey_mock_small.png" alt="" title="survey_mock_small" width="480" height="333" class="size-full wp-image-428" />
Each circle sector stands for one person’s ratings, and these are ordered by their average rating. For each single rating, I draw a semi-transparent wedge, with distance from center as well as color indicating the rating’s value. Special treatment is provided for the overall event rating (a more opaque, smaller wedge). For visual spice, a black spline connects all the average values of the ratings. </p>

<p>So, we agreed on it and shipped it. Seeing it with the real data, however, made me wonder if I should have looked into typical rating statistics a bit more :)
<a href="http://well-formed-data.net/wp-content/uploads/2010/01/survey-_-real-data.png"><img style="border:none;" src="http://well-formed-data.net/wp-content/uploads/2010/01/survey-_-real-data_small.png" alt="" title="survey-_-real-data_small" width="480" height="481" class="size-full wp-image-427" /></a></p>

<p>Well. Lesson learnt. It is a nice little visualization nevertheless.</p>

<p>Which reminds me of an <a href="http://blog.steepster.com/post/226679106/better-rating-system">excellent article</a> about how to prevent to uniform votes already in the interface.</p>

<p>As a bonus, here is a little remake using <a href="http://vis.stanford.edu/protovis/">protovis</a> with again, ridiculously few lines of code:
<span id="more-426"></span></p>

<script type="text/javascript" src="http://well-formed-data.net/lib/protovis-r3.1.js"></script> 

<script type="text/javascript+protovis">
    var data=[
    ["05.11.09 17:01",  10, 10, 10, 10, 10, 10, 10, 10, 10],
    ["05.11.09 17:03",  10, 9,  5,  10, 3,  3,  8,  8,  9],
    ["05.11.09 17:04",  10, 10, 9,  10, 9,  7,  10, 10, 8],
    ["05.11.09 17:04",  9,  10, 10, 10, 9,  9,  7,  10, 9],
    ["05.11.09 17:06",  8,  10, 8,  7,  7,  8,  6,  8,  7],
    ["05.11.09 17:14",  10, 10, 5,  10, 10, 7,  7,  8,  9],
    ["05.11.09 17:20",  9,  9,  9,  10, 9,  9,  9,  9,  8],
    ["05.11.09 17:36",  10, 10, 10, 10, 7,  8,  9,  10, 9],
    ["05.11.09 17:42",  10, 10, 8,  8,  9,  9,  10, 10, 10],
    ["05.11.09 19:54",  10, 9,  9,  9,  10, 10, 10, 10, 9],
    ["05.11.09 20:22",  10, 10, 10, 10, 8,  9,  10, 10, 9],
    ["06.11.09 00:26",  8,  8,  8,  8,  4,  8,  7,  7,  8],
    ["06.11.09 03:35",  10, 10, 9,  9,  9,  9,  10, 10, 9],
    ["06.11.09 03:39",  10, 10, 10, 10, 10, 10, 10, 10, 9],
    ["06.11.09 08:41",  10, 10, 9,  10, 8,  7,  9,  9,  9],
    ["06.11.09 08:59",  9,  10, 7,  10, 8,  7,  7,  9,  7],
    ["06.11.09 09:21",  10, 10, 8,  8,  10, 9,  5,  10, 9],
    ["06.11.09 10:17",  7,  9,  9,  9,  9,  8,  8,  9,  7],
    ["06.11.09 14:11",  10, 10, 10, 10, 10, 10, 10, 10, 10],
    ["06.11.09 14:12",  10, 10, 10, 10, 10, 10, 10, 10, 10],
    ["06.11.09 16:57",  9,  8,  9,  10, 9,  10, 9,  9,  9],
    ["07.11.09 04:29",  10, 10, 10, 10, 10, 10, 10, 10, 10],
    ["07.11.09 10:36",  10, 10, 10, 10, 9,  8,  9,  10, 10],
    ["07.11.09 10:43",  10, 10, 10, 10, 8,  10, 10, 10, 10],
    ["09.11.09 07:51",  10, 10, 10, 10, 10, 10, 8,  10, 9],
    ["09.11.09 11:09",  10, 10, 10, 10, 10, 10, 10, 10, 9],
    ["09.11.09 11:41",  8,  10, 9,  10, 8,  7,  7,  10, 8],
    ["09.11.09 11:51",  9,  9,  9,  9,  7,  7,  8,  9,  8],
    ["09.11.09 12:59",  10, 10, 10, 10, 10, 9,  10, 10, 10],
    ["09.11.09 14:03",  10, 8,  7,  8,  10, 9,  8,  10, 8],
    ["09.11.09 14:38",  8,  8,  9,  10, 3,  4,  5,  8,  8],
    ["10.11.09 09:38",  10, 10, 10, 10, 10, 10, 10, 10, 8],
    ["10.11.09 12:50",  10, 6,  10, 9,  8,  8,  7,  7,  9],
    ["10.11.09 14:49",  10, 10, 10, 10, 9,  9,  9,  10, 9],
    ["10.11.09 14:52",  9,  9,  10, 9,  8,  8,  8,  8,  9],
    ["10.11.09 15:31",  10, 9,  9,  10, 9,  8,  10, 10, 10],
    ["12.11.09 16:09",  9,  8,  9,  8,  8,  8,  8,  8,  8],
    ["18.11.09 11:41",  10, 9,  10, 10, 9,  10, 9,  10, 9],
    ["18.11.09 14:51",  10, 10, 9,  9,  10, 10, 10, 10, 10],
    ["18.11.09 16:36",  8,  8,  7,  8,  6,  9,  7,  8,  8],
    ["18.11.09 16:54",  5,  6,  4,  7,  6,  6,  4,  6,  6],
    ["19.11.09 17:31",  7,  8,  9,  10, 9,  10, 6,  10, 8],
    ["20.11.09 12:13",  9,  10, 10, 9,  9,  9,  9,  10, 9],
    ["22.11.09 19:05",  10, 10, 10, 10, 10, 9,  10, 10, 10]
];
    // pre-process data 
    var processedData = [];
    data.forEach(function(d) {
        var o={};
        o.date = Date.parse(d[0], "%d.%m.%y %H:%M");
        o.dayDate = new Date(o.date.getFullYear(), o.date.getMonth(), o.date.getDate());
        o.dayTime = o.date.getHours();
        d.shift();
        o.ratings = d;
        o.mean = pv.mean(d);
        processedData.push(o);
    });
    // nach rating sortieren
    processedData = processedData.sort(function(a,b) a.mean - b.mean);
    // result:
    // [{date:..., ratings:[10,2,3,4...], mean:6.7}, ...
    // set up visualization 
    var w = 440, h =440;
    var vis = new pv.Panel()
        .width(w)
        .height(h)
        .left(20)
        .top(20)
    ;
        vis.canvas="protovisDiv";
    // encoders
    var color = pv.Scale.linear(0, 5, 10).range("rgba(255,0,0,.3)", "rgba(200,200,0,.3)", "rgba(0,90,0,.3)");
    var angle = pv.Scale.linear(0, processedData.length).range(Math.PI*1.5, Math.PI*3.5);
    var radius = pv.Scale.linear(0, 10).range(100, 200); 
    // A panel for each rating event
    var panel = vis.add(pv.Panel)
        .data(processedData)
        .left(function() w*.5)  
        .top(function() h*.5)
    ;
    // a wedge for each rating value
    panel.add(pv.Wedge)
        .data(function(d) d.ratings)
        .startAngle(function() angle(this.parent.index))
        .endAngle (function() angle(this.parent.index+1))
        .innerRadius(function(d) radius(d) )
        .outerRadius(function(d) radius(d+1))
        .fillStyle(function(d) color(d))
    ;
    panel.add(pv.Wedge)
        .data(function(d) [d.mean])
        .startAngle(function() angle(this.parent.index))
        .endAngle (function() angle(this.parent.index+1))
        .innerRadius(function(d) radius(d+.5) )
        .outerRadius(function(d) radius(d+.7))
        .fillStyle(function(d) "#000")
    ;
    vis.render();
    </script>

<p><code>
var data=[
["05.11.09 17:01",  10, 10, 10, 10, 10, 10, 10, 10, 10]
// .. etc .., see page source for full data
];
// pre-process data 
var processedData = [];
data.forEach(function(d) {
    var o={};
    o.date = Date.parse(d[0], "%d.%m.%y %H:%M");
    o.dayDate = new Date(o.date.getFullYear(), o.date.getMonth(), o.date.getDate());
    o.dayTime = o.date.getHours();
    d.shift();
    o.ratings = d;
    o.mean = pv.mean(d);
    processedData.push(o);
});
// sort by rating
processedData = processedData.sort(function(a,b) a.mean - b.mean);
// result:
// [{date:..., ratings:[10,2,3,4...], mean:6.7}, ...
// set up visualization 
var w = 440, h =440;
var vis = new pv.Panel()
    .width(w)
    .height(h)
    .left(20)
    .top(20)
;
// encoders
var color = pv.Scale.linear(0, 5, 10).range("rgba(255,0,0,.3)", "rgba(200,200,0,.3)", 
                  "rgba(0,90,0,.3)");
var angle = pv.Scale.linear(0, processedData.length).range(Math.PI<em>1.5, Math.PI</em>3.5);
var radius = pv.Scale.linear(0, 10).range(100, 200); 
// A panel for each rating event
var panel = vis.add(pv.Panel)
    .data(processedData)
    .left(function() w<em>.5)<br />
    .top(function() h</em>.5)
;
// a wedge for each rating value
panel.add(pv.Wedge)
    .data(function(d) d.ratings)
    .startAngle(function() angle(this.parent.index))
    .endAngle (function() angle(this.parent.index+1))
    .innerRadius(function(d) radius(d) )
    .outerRadius(function(d) radius(d+1))
    .fillStyle(function(d) color(d))
;
panel.add(pv.Wedge)
    .data(function(d) [d.mean])
    .startAngle(function() angle(this.parent.index))
    .endAngle (function() angle(this.parent.index+1))
    .innerRadius(function(d) radius(d+.5) )
    .outerRadius(function(d) radius(d+.7))
    .fillStyle(function(d) "#000")
;
vis.render();
</code></p>
<img src="http://well-formed-data.net/?ak_action=api_record_view&id=426&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://well-formed-data.net/archives/426/visualizing-survey-results/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

