<?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>writing &#124; ben fry &#187; zipdecode</title>
	<atom:link href="http://benfry.com/writing/archives/category/zipdecode/feed" rel="self" type="application/rss+xml" />
	<link>http://benfry.com/writing</link>
	<description>Visualizing Data</description>
	<lastBuildDate>Sat, 04 Sep 2010 18:50:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Shirts with Zips</title>
		<link>http://benfry.com/writing/archives/622</link>
		<comments>http://benfry.com/writing/archives/622#comments</comments>
		<pubDate>Tue, 23 Mar 2010 20:26:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[adaptation]]></category>
		<category><![CDATA[zipdecode]]></category>

		<guid isPermaLink="false">http://benfry.com/writing/?p=622</guid>
		<description><![CDATA[Got a note during SXSW from Marc Cull at CafePress to tell me that they were doing real-time order visualization using an adaptation of zipdecode (explained in Visualizing Data). Fun! Gave me a giggle, at any rate:

]]></description>
			<content:encoded><![CDATA[<p>Got a note during SXSW from Marc Cull at <a href="http://www.cafepress.com/">CafePress</a> to tell me that they were doing real-time order visualization using an adaptation of <a href="http://benfry.com/zipdecode/">zipdecode</a> (explained in <a href="http://www.amazon.com/exec/obidos/ASIN/0596514557/ref=nosim/benfrycom-20"><em>Visualizing Data</em></a>). Fun! Gave me a giggle, at any rate:</p>
<p><img class="alignnone size-full wp-image-623" title="the united states, before being ironed or air-fluffed" src="http://benfry.com/wp/wp-content/uploads/2010/03/cafepress.jpg" alt="the united states, before being ironed or air-fluffed" width="500" height="375" /></p>
]]></content:encoded>
			<wfw:commentRss>http://benfry.com/writing/archives/622/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postleitzahlen in Deutschland</title>
		<link>http://benfry.com/writing/archives/144</link>
		<comments>http://benfry.com/writing/archives/144#comments</comments>
		<pubDate>Tue, 15 Jul 2008 21:33:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[adaptation]]></category>
		<category><![CDATA[vida]]></category>
		<category><![CDATA[zipdecode]]></category>

		<guid isPermaLink="false">http://benfry.com/writing/archives/144</guid>
		<description><![CDATA[Maximillian Dornseif has adapted Zipdecode from Chapter 6 of Visualizing Data to handle German postal codes. I&#8217;ve wanted to do this myself since hearing about the OpenGeoDB data set which includes the data, but thankfully he&#8217;s taken care of it first and is sharing it with the rest of us along with his modified code.
(The [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://benfry.com/wp/wp-content/uploads/2008/07/germany-contrast-small.png" alt="germany-contrast-small.png" align="right" hspace="13" vspace="0" />Maximillian Dornseif has adapted <a href="http://benfry.com/zipdecode/">Zipdecode</a> from Chapter 6 of <a href="http://www.amazon.com/exec/obidos/ASIN/0596514557/ref=nosim/benfrycom-20"><em>Visualizing Data</em></a> to handle <a href="http://md.hudora.de/c0de/zipdecodeDE/">German postal codes</a>. I&#8217;ve wanted to do this myself since hearing about the <a href="http://opengeodb.hoppe-media.com/">OpenGeoDB</a> data set which includes the data, but thankfully he&#8217;s taken care of it first and is sharing it with the rest of us along with his modified code.</p>
<p>(The site is in German&#8230;I&#8217;ll trust any of you German readers to let me know if the site actually says that <em>Visualizing Data</em> is the dumbest book he&#8217;s ever read.)</p>
<p>Also helpful to note that he used Python for preprocessing the data. He doesn&#8217;t bother implementing a map projection, as done in the book, but the Python code is a useful example of using another language when appropriate, and how the syntax differs from Processing:</p>
<pre># Convert opengeodb data for zipdecode
fd = open('PLZ.tab')
out = []
minlat = minlon = 180
maxlat = maxlon = 0

for line in fd:
    line = line.strip()
    if not line or line.startswith('#'):
        continue
    parts = line.split('\t')
    dummy, plz, lat, lon, name = parts
    out.append([plz, lat, lon, name])
    minlat = min([float(lat), minlat])
    minlon = min([float(lon), minlon])
    maxlat = max([float(lat), maxlat])
    maxlon = max([float(lon), maxlon])

print "# %d,%f,%f,%f,%f" % (len(out), minlat, maxlat, minlon, maxlon)
for data in out:
    plz, lat, lon, name = data
    print '\t'.join([plz, str(float(lat)), str(float(lon)), name])</pre>
<p>In the book, I used Processing for most of the examples (with a little bit of Perl) for sake of simplicity. (The book is already introducing a lot of new material, why hurt people and introduce multiple languages while I&#8217;m at it?) However that&#8217;s one place where the book diverges from my own process a bit, since I tend to use a lot of Perl when dealing with large volumes of text data. Python is also a good choice (or Ruby if that&#8217;s your thing), but I&#8217;m tainted since I learned Perl first, while a wee intern at Sun.</p>
]]></content:encoded>
			<wfw:commentRss>http://benfry.com/writing/archives/144/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zipdecode in der Schweiz</title>
		<link>http://benfry.com/writing/archives/28</link>
		<comments>http://benfry.com/writing/archives/28#comments</comments>
		<pubDate>Thu, 06 Mar 2008 05:52:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[adaptation]]></category>
		<category><![CDATA[vida]]></category>
		<category><![CDATA[zipdecode]]></category>

		<guid isPermaLink="false">http://benfry.com/writing/archives/28</guid>
		<description><![CDATA[Dominic Allemann has developed a Swiss version of the zipdecode example from chapter six of Visualizing Data. This is the whole point of the book—to actually try things out and adapt them in different ways and see what you can learn from it.
Switzerland makes an interesting example because it has far fewer postal codes than [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://benfry.com/wp/wp-content/uploads/2008/03/gossau.png" alt="gossau.png" align="right" hspace="10" vspace="5" /><a href="http://homepage.mac.com/dominic.allemann/">Dominic Allemann</a> has developed a <a href="http://homepage.mac.com/dominic.allemann/switzerland/">Swiss version</a> of the zipdecode example from chapter six of <em>Visualizing Data</em>. This is the whole point of the book—to actually try things out and adapt them in different ways and see what you can learn from it.</p>
<p>Switzerland makes an interesting example because it has far fewer postal codes than the U.S., though the dots are quite elegant on their own. With fewer data points, I&#8217;d be inclined to 1) change the size of the individual points to make them larger without making them overwhelming, 2) or work with the colors to make the contrast more striking, since changing the point size is likely to be too much), and 3) get the text into mixed case (in this example, Gossau SG instead of GOSSAU SG). Something as minor as avoiding ALL CAPS helps get us away from the representation looking too much like COMPUTERS and DATABASES, and instead into something meant for regular humans. Finally, 4) with the smaller (and far more regular) data set, it&#8217;s not clear if the zoom even helps—could even be better off without it.</p>
<p>Thanks to Dominic for passing this along; it&#8217;s great to see!</p>
]]></content:encoded>
			<wfw:commentRss>http://benfry.com/writing/archives/28/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
