<?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>Arne Hendrik Schulz &#187; R</title>
	<atom:link href="http://www.ahschulz.de/category/r/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ahschulz.de</link>
	<description></description>
	<lastBuildDate>Thu, 26 Jan 2012 19:02:26 +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>Plotting German municipalities using Twitter</title>
		<link>http://www.ahschulz.de/2011/08/12/plotting-german-municipalities-using-twitter/</link>
		<comments>http://www.ahschulz.de/2011/08/12/plotting-german-municipalities-using-twitter/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 10:03:29 +0000</pubDate>
		<dc:creator>Arne</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[Visualisierung]]></category>

		<guid isPermaLink="false">http://www.arnehendrikschulz.de/?p=162</guid>
		<description><![CDATA[More and more institutions do use social networks in Germany, including Twitter. This belongs to municipalities, too. Getting back to a idea of Claas Hanken (a ex-collegue of mine), wanted to visualize these ones. The result can be seen in &#8230; <a href="http://www.ahschulz.de/2011/08/12/plotting-german-municipalities-using-twitter/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>More and more institutions do use social networks in Germany, including Twitter. This belongs to municipalities, too. Getting back to a idea of <a href="http://www.telefreizeit.de/" target="_blank">Claas Hanken</a> (a ex-collegue of mine), wanted to visualize these ones. The result can be seen in <a href="http://www.ifib.de/blog/index.php/site/comments/twitternde_kommunen_auf_der_karte/" target="_blank">German</a> and in <a href="http://www.govloop.com/profiles/blogs/putting-german-municipalities" target="_blank">Englisch</a>. The plot is completely done in R and I will show how it&#8217;s done.</p>
<p>As mentioned in the German post was mentioned that the raw data came from a simple tab-delimerted table with the Twittername, Homepage-URL and latitude and longitude information. A example for Berlin:</p>
<blockquote><p>@berlin_de_news    http://www.berlin.de    52.51, 13.40</p></blockquote>
<p>The full data can be accessed <a href="http://www.arnehendrikschulz.de/wp-content/uploads/2011/04/verwaltungen.txt">here</a>. So we load the data into R and do some data-management. Latitude and longitude are comma-seperated and there are no variable names given.</p>

<div class="wp_codebox"><table><tr id="p1625"><td class="code" id="p162code5"><pre class="rsplus" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">data</span> <span style="color: #080;">&lt;</span> <span style="color: #080;">-</span> <span style="color: #0000FF; font-weight: bold;">read.<span style="">delim</span></span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">&quot;verwaltungen.txt&quot;</span>, header <span style="color: #080;">=</span> <a href="http://astrostatistics.psu.edu/su07/R/html/graphics/html/F.html"><span style="color: #0000FF; font-weight: bold;">F</span></a><span style="color: #080;">&#41;</span>
lat_lon <span style="color: #080;">&lt;-</span> <a href="http://astrostatistics.psu.edu/su07/R/html/graphics/html/as.numeric.html"><span style="color: #0000FF; font-weight: bold;">as.<span style="">numeric</span></span></a><span style="color: #080;">&#40;</span><a href="http://astrostatistics.psu.edu/su07/R/html/graphics/html/do.call.html"><span style="color: #0000FF; font-weight: bold;">do.<span style="">call</span></span></a><span style="color: #080;">&#40;</span><span style="color: #ff0000;">&quot;rbind&quot;</span>, str_split<span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">data</span>$V3, <span style="color: #ff0000;">&quot;, &quot;</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>
data2 <span style="color: #080;">&lt;-</span> <a href="http://astrostatistics.psu.edu/su07/R/html/graphics/html/cbind.html"><span style="color: #0000FF; font-weight: bold;">cbind</span></a><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">data</span><span style="color: #080;">&#91;</span>, <span style="color: #ff0000;">1</span><span style="color: #080;">:</span><span style="color: #ff0000;">2</span><span style="color: #080;">&#93;</span>, lat_lon<span style="color: #080;">&#91;</span><span style="color: #ff0000;">1</span><span style="color: #080;">:</span><span style="color: #ff0000;">68</span><span style="color: #080;">&#93;</span>, lat_lon<span style="color: #080;">&#91;</span><span style="color: #ff0000;">69</span><span style="color: #080;">:</span><span style="color: #ff0000;">136</span><span style="color: #080;">&#93;</span><span style="color: #080;">&#41;</span>
<a href="http://astrostatistics.psu.edu/su07/R/html/graphics/html/names.html"><span style="color: #0000FF; font-weight: bold;">names</span></a><span style="color: #080;">&#40;</span>data2<span style="color: #080;">&#41;</span> <span style="color: #080;">&lt;-</span> <a href="http://astrostatistics.psu.edu/su07/R/html/graphics/html/c.html"><span style="color: #0000FF; font-weight: bold;">c</span></a><span style="color: #080;">&#40;</span><span style="color: #ff0000;">&quot;tw_name&quot;</span>, <span style="color: #ff0000;">&quot;url&quot;</span>, <span style="color: #ff0000;">&quot;lat&quot;</span>, <span style="color: #ff0000;">&quot;lon&quot;</span><span style="color: #080;">&#41;</span></pre></td></tr></table></div>

<p>Using the great <a href="http://cran.r-project.org/web/packages/twitteR/" target="_blank">twitteR-package</a> from Jeff Gentry we can get the total tweets ever send and the actual follower. A little for-loop does some automatation for us.
</pre>

<div class="wp_codebox"><table><tr id="p1626"><td class="code" id="p162code6"><pre class="rsplus" style="font-family:monospace;"><a href="http://astrostatistics.psu.edu/su07/R/html/graphics/html/for.html"><span style="color: #0000FF; font-weight: bold;">for</span></a> <span style="color: #080;">&#40;</span>i <span style="color: #0000FF; font-weight: bold;">in</span> data2$tw_name<span style="color: #080;">&#41;</span> <span style="color: #080;">&#123;</span>
  temp <span style="color: #080;">&lt;</span> <span style="color: #080;">-</span> statusesCount<span style="color: #080;">&#40;</span>getUser<span style="color: #080;">&#40;</span>i<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>
  temp2 <span style="color: #080;">&lt;-</span> followersCount<span style="color: #080;">&#40;</span>getUser<span style="color: #080;">&#40;</span>i<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>
  <a href="http://astrostatistics.psu.edu/su07/R/html/graphics/html/if.html"><span style="color: #0000FF; font-weight: bold;">if</span></a> <span style="color: #080;">&#40;</span>i <span style="color: #080;">==</span> <span style="color: #ff0000;">&quot;@ahlen_de&quot;</span><span style="color: #080;">&#41;</span> <span style="color: #080;">&#123;</span>
    count_tweets <span style="color: #080;">&lt;-</span> temp
    follower <span style="color: #080;">&lt;-</span> temp2
  <span style="color: #080;">&#125;</span> <span style="color: #0000FF; font-weight: bold;">else</span> <span style="color: #080;">&#123;</span>
    count_tweets <span style="color: #080;">&lt;-</span> <a href="http://astrostatistics.psu.edu/su07/R/html/graphics/html/append.html"><span style="color: #0000FF; font-weight: bold;">append</span></a><span style="color: #080;">&#40;</span>count_tweets, temp<span style="color: #080;">&#41;</span>
    follower <span style="color: #080;">&lt;-</span> <a href="http://astrostatistics.psu.edu/su07/R/html/graphics/html/append.html"><span style="color: #0000FF; font-weight: bold;">append</span></a><span style="color: #080;">&#40;</span>follower, temp2<span style="color: #080;">&#41;</span>
  <span style="color: #080;">&#125;</span>
<span style="color: #080;">&#125;</span>
&nbsp;
data2 <span style="color: #080;">&lt;-</span> <a href="http://astrostatistics.psu.edu/su07/R/html/graphics/html/cbind.html"><span style="color: #0000FF; font-weight: bold;">cbind</span></a><span style="color: #080;">&#40;</span>data2, count_tweets, follower<span style="color: #080;">&#41;</span></pre></td></tr></table></div>

<p>Having the data prepared we only need a little spatial data from the <a href="http://www.gadm.org/" target="_blank">GADM database of Global Administrative Areas</a>. One could download the data by hand or using the <a href="http://cran.r-project.org/web/packages/raster/" target="_blank">raster-package</a> (as I will do).  <a href="http://had.co.nz/ggplot2/" target="_blank">Ggplot2</a>'s fortify will then prepare the borders for plotting.  If you get an Error from fortify try executing <em>gpclibPermit()</em>.
</pre>

<div class="wp_codebox"><table><tr id="p1627"><td class="code" id="p162code7"><pre class="rsplus" style="font-family:monospace;">de_map <span style="color: #080;">&lt;</span> <span style="color: #080;">-</span> getData<span style="color: #080;">&#40;</span><span style="color: #ff0000;">'GADM'</span>, country<span style="color: #080;">=</span><span style="color: #ff0000;">&quot;DE&quot;</span>, level<span style="color: #080;">=</span><span style="color: #ff0000;">1</span><span style="color: #080;">&#41;</span>
de_map_2 <span style="color: #080;">&lt;-</span> fortify<span style="color: #080;">&#40;</span>de_map, region <span style="color: #080;">=</span> <span style="color: #ff0000;">&quot;NAME_1&quot;</span><span style="color: #080;">&#41;</span></pre></td></tr></table></div>

<p>Now it's time to start the show! The plotting should take some time: The spacial data consists about 100k points. You could reduce the size by for example just taking every 5th point but that can cause double borders instead of one in some mapparts.<br />
Usually one would start plotting the points (<em>geom_point()</em>). In this case it would cause the borders to overlap the municipalities. <em>Scale_area()</em> is very helpful because there is a gap between Berlin and the other cities. I also adjusted the <em>limits</em> of the Follower count. The rest should speak for itself.
</pre>

<div class="wp_codebox"><table><tr id="p1628"><td class="code" id="p162code8"><pre class="rsplus" style="font-family:monospace;">tw <span style="color: #080;">&lt;</span> <span style="color: #080;">-</span> ggplot<span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">data</span><span style="color: #080;">=</span> data2<span style="color: #080;">&#41;</span> <span style="color: #080;">+</span> geom_path<span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">data</span> <span style="color: #080;">=</span> de_map_2, aes<span style="color: #080;">&#40;</span>x <span style="color: #080;">=</span> long, y <span style="color: #080;">=</span> lat, group <span style="color: #080;">=</span> group<span style="color: #080;">&#41;</span>, colour <span style="color: #080;">=</span> <span style="color: #ff0000;">&quot;#8D8D8D&quot;</span>, linetype <span style="color: #080;">=</span> <span style="color: #ff0000;">2</span><span style="color: #080;">&#41;</span>
tw <span style="color: #080;">&lt;-</span> tw <span style="color: #080;">+</span> geom_point<span style="color: #080;">&#40;</span>aes<span style="color: #080;">&#40;</span>x <span style="color: #080;">=</span> lon, y <span style="color: #080;">=</span> lat, colour <span style="color: #080;">=</span> follower, size <span style="color: #080;">=</span> count_tweets<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span> <span style="color: #080;">+</span> scale_area<span style="color: #080;">&#40;</span><span style="color: #ff0000;">&quot;Tweet count&quot;</span><span style="color: #080;">&#41;</span>
tw <span style="color: #080;">&lt;-</span> tw <span style="color: #080;">+</span> theme_bw<span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span> <span style="color: #080;">+</span> labs<span style="color: #080;">&#40;</span>x <span style="color: #080;">=</span> NULL, y <span style="color: #080;">=</span> NULL<span style="color: #080;">&#41;</span> <span style="color: #080;">+</span>  scale_colour_gradient<span style="color: #080;">&#40;</span>low <span style="color: #080;">=</span> <span style="color: #ff0000;">&quot;#9D9D9D&quot;</span>, high <span style="color: #080;">=</span> <span style="color: #ff0000;">&quot;#242424&quot;</span>, name <span style="color: #080;">=</span> <span style="color: #ff0000;">&quot;Follower count&quot;</span>, limits <span style="color: #080;">=</span> <a href="http://astrostatistics.psu.edu/su07/R/html/graphics/html/c.html"><span style="color: #0000FF; font-weight: bold;">c</span></a><span style="color: #080;">&#40;</span><span style="color: #ff0000;">0</span>, <span style="color: #ff0000;">12000</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>
tw <span style="color: #080;">&lt;-</span> tw <span style="color: #080;">+</span> scale_x_continuous<span style="color: #080;">&#40;</span>breaks <span style="color: #080;">=</span> NA<span style="color: #080;">&#41;</span> <span style="color: #080;">+</span> scale_y_continuous<span style="color: #080;">&#40;</span>breaks <span style="color: #080;">=</span> NA<span style="color: #080;">&#41;</span>
tw <span style="color: #080;">&lt;-</span> tw <span style="color: #080;">+</span> opts<span style="color: #080;">&#40;</span><a href="http://astrostatistics.psu.edu/su07/R/html/stats/html/title.html"><span style="color: #0000FF; font-weight: bold;">title</span></a> <span style="color: #080;">=</span> <span style="color: #ff0000;">&quot;Municipalities using Twitter&quot;</span><span style="color: #080;">&#41;</span>
tw</pre></td></tr></table></div>

<p>An this is how it looks like:</p>
<p><img class="aligncenter size-medium wp-image-186" title="plot_blog" src="http://www.arnehendrikschulz.de/wp-content/uploads/2011/04/plot_blog-500x500.png" alt="" width="500" height="500" /></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ahschulz.de/2011/08/12/plotting-german-municipalities-using-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postleitzahlen visualisiert, Teil 2</title>
		<link>http://www.ahschulz.de/2011/03/21/postleitzahlen-visualisiert-teil-2/</link>
		<comments>http://www.ahschulz.de/2011/03/21/postleitzahlen-visualisiert-teil-2/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 20:43:17 +0000</pubDate>
		<dc:creator>Arne</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[Visualisierung]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Map]]></category>
		<category><![CDATA[Package]]></category>
		<category><![CDATA[Postleitzahl]]></category>

		<guid isPermaLink="false">http://www.arnehendrikschulz.de/?p=153</guid>
		<description><![CDATA[Im vorherigen Beitrag habe ich die deutschen Postleitzahlen visualisiert. Sort konnte man bereits sehr schön sehen, wie sich nur aus den Geo-Koordinaten die Deutschlandkarte abgebildet hat. Mit einer farblichen Unterleung fiel zudem auf, die Postleitzahlen sich nicht an den Längergrenzen &#8230; <a href="http://www.ahschulz.de/2011/03/21/postleitzahlen-visualisiert-teil-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.arnehendrikschulz.de/2011/01/06/postleitzahlen-visualisiert/">Im vorherigen Beitrag</a> habe ich die deutschen Postleitzahlen visualisiert. Sort konnte man bereits sehr schön sehen, wie sich nur aus den Geo-Koordinaten die Deutschlandkarte abgebildet hat. Mit einer farblichen Unterleung fiel zudem auf, die Postleitzahlen sich nicht an den Längergrenzen orientieren. Um dies weiter zu verdeutlichen habe ich die Ländergrenzen mit eingezeichnet.</p>
<p>Dazu nehmen wir erneut die Daten aus dem vorherigen Beitrag (&#8220;plz&#8221;). Das <a href="http://cran.r-project.org/web/packages/raster/index.html" target="_blank">raster</a>-Package ist so nett und gibt uns Zugriff auf die <a href="http://www.gadm.org/" target="_blank">GADM-Datenbank</a>, in welcher alle Grenzen Deutschlands (und natürlich noch die vieler weiterer Staaten) hinterlegt sind.</p>
<pre>library(raster)

de_map &lt;- getData('GADM', country="DE", level=1)
de_map_2 &lt;- fortify(de_map, region = "NAME_1")
</pre>
<p>Die Level-Angabe im ersten Befehl gibt an, wie detailliert die Daten sein sollen: Level 0 beinhaltet nur die Ländergrenzen, Level 1 auch die Grenzen der Ländergrenzen usw. Sollte <em>fortify</em> nicht sofort klappen, muss einmal der folgende Befehl ausgeführt werden:</p>
<pre>gpclibPermit()
</pre>
<p>Danach kann die Map mittels des folgenden Befehls geplottet werden, natürlich wieder mit ggplot2:</p>
<pre>p2 &lt;- ggplot(data= plz) + geom_point(aes(x = lon, y = lat, colour = region), //
   alpha = 0.8, shape = 19, size = 2)
p2 &lt;- p2 + geom_path(data = de_map_2, aes(x = long, y = lat, group = group), //
   colour = "grey20")
p2 &lt;- p2 + theme_bw() + labs(x = NULL, y = NULL) + //
   scale_colour_brewer(palette = "RdYlGn", name = "PLZ")
p2 &lt;- p2 + scale_x_continuous(breaks = NA) + scale_y_continuous(breaks = NA)
p2
</pre>
<p>Das Ergebnis sieht dann wie folgt aus:</p>
<p style="text-align: center;"><img class="size-full wp-image-138  aligncenter" title="PLZ Deutschland 3" src="http://www.arnehendrikschulz.de/wp-content/uploads/2011/01/plz_de_3.png" alt="" width="450" height="616" /></p>
<p>Hier wird noch deutlicher, dass die Postleitzahlen nicht nach Ländern vergeben wurden.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ahschulz.de/2011/03/21/postleitzahlen-visualisiert-teil-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postleitzahlen visualisiert</title>
		<link>http://www.ahschulz.de/2011/01/06/postleitzahlen-visualisiert/</link>
		<comments>http://www.ahschulz.de/2011/01/06/postleitzahlen-visualisiert/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 18:16:32 +0000</pubDate>
		<dc:creator>Arne</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[Visualisierung]]></category>
		<category><![CDATA[Deutschland]]></category>
		<category><![CDATA[Map]]></category>
		<category><![CDATA[Package]]></category>
		<category><![CDATA[Postleitzahl]]></category>

		<guid isPermaLink="false">http://www.arnehendrikschulz.de/?p=124</guid>
		<description><![CDATA[Seit neuestem gibt es ein neues R-Package von Jeffrey Brenn in welchem sämtliche Postleitzahlen und Koordinaten der USA hinterlegt sind. Passend dazu findet sich in eine nette kleine Visualisierung. Sowas müsste sich doch auch für Deutschland realisieren lassen. Und siehe &#8230; <a href="http://www.ahschulz.de/2011/01/06/postleitzahlen-visualisiert/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Seit neuestem gibt es ein neues <a href="http://jeffreybreen.wordpress.com" target="_blank">R-Package von Jeffrey Brenn</a> in welchem sämtliche Postleitzahlen und Koordinaten der USA hinterlegt sind. Passend dazu findet sich in eine <a href="http://jeffreybreen.wordpress.com/2011/01/05/cran-zipcode/" target="_blank">nette kleine Visualisierung</a>. Sowas müsste sich doch auch für Deutschland realisieren lassen. Und siehe da: Es geht!<br />
Die <a href="http://opengeodb.giswiki.org/wiki/OpenGeoDB" target="_blank">OpenGeoDB</a> hat es sich zur Aufgabe gemacht, eine umfangreiche Datenbank mit GeoDaten und Postleitzahlen aufzubauen. Der große Unterschied hierzu ist, dass die Daten in den USA aus amtlichen Quellen stammen und daher auch mehr Informationen enthalten. Aber für meine Zwecke sind die deutschen Daten vollkommen ausreichend. Darüber hinaus bestehen Bestrebungen, die Datenbank stetig zu erweitern.</p>
<p>Die Daten liegen sowohl tabulatorgestrennt als auch in reiner Datenbankform (sehr löblich) vor. Für unsere Zwecke reichen aber erstmal die Daten mit Postleitzahlen und Koordinaten: <a href="http://fa-technik.adfc.de/code/opengeodb/PLZ.tab" target="_blank">http://fa-technik.adfc.de/code/opengeodb/PLZ.tab</a></p>
<p>Mit der Datei machen wir uns dann ans Werk. Vorher laden wir noch das entsprechende <a href="http://cran.r-project.org/web/packages/zipcode/" target="_blank">zipcode</a>-Package und das <a href="http://cran.r-project.org/web/packages/ggplot2/" target="_blank">ggplot2</a>-Package. Ersteres kommt mit der netten Funktion clean.zipcode(), die unter anderem dafür sorgt, dass Postleitzahlen, die mit &#8220;0&#8243; beginnen, diese auch behalten. Ggplot2 verwenden wir, um die Daten zu visualisieren.</p>
<pre>library(ggplot2)
library(zipcode)

# Daten laden
plz &lt;- read.delim("Data/PLZ.tab")

# Postleitzahlen mit 0 erhalten
plz$plz_2 &lt;- clean.zipcodes(plz$plz)

# Plotten
p &lt;- ggplot(data= plz) + geom_point(aes(x = lon, y = lat))
</pre>
<p>Aussehen tut das Ganze dann wie folgt:</p>
<p style="text-align: center;"><img class="size-full wp-image-136  aligncenter" title="PLZ Deutschland 1" src="http://www.arnehendrikschulz.de/wp-content/uploads/2011/01/plz_de_1.png" alt="" width="450" height="602" /></p>
<p>Hier lässt sich bereits die Kontur Deutschlands sehr gut erkennen. Auffällig ist zudem, dass es in Brandenburg und Mecklenburg-Vorpommern recht &#8220;wenig&#8221; Postleitzahlen gibt. Vor allem im Süden, Süedwesten, Ruhrgebiet und im Norden kommt es dagegen zu einer deutlichen Häufig in den Verteilungen.</p>
<p>Noch interessanter wird die Karte, wenn man sich die erste Ziffer der Postleitzahl mit anzeigen lässt. Zudem kann man die Grafik noch ein wenig aufhübschen.</p>
<pre># Erste PLZ-Stelle als neue Variable einfügen
plz$region &lt;- (substr(plz$plz_2, 1, 1))

# Plotten
p &lt;- ggplot(data= plz) + geom_point(aes(x = lon, y = lat, colour = region),//
   shape = 19, size = 2)
p &lt;- p + theme_bw() + labs(x = NULL, y = NULL)
p &lt;- p + scale_colour_brewer(palette = "RdYlGn", name = "PLZ")
p &lt;- p + scale_x_continuous(breaks = NA) + scale_y_continuous(breaks = NA)
p
</pre>
<p style="text-align: center;"><img class="size-full wp-image-137  aligncenter" title="PLZ Deutschland 2" src="http://www.arnehendrikschulz.de/wp-content/uploads/2011/01/plz_de_2.png" alt="" width="450" height="616" /></p>
<p>Die verschiedenen PLZ-Bereiche sind nicht an die Grenzen der Bundesländer gebunden. Vielleicht sollte ich noch die Ländergrenzen mit einzeichnen lassen. Aber dazu später mehr&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ahschulz.de/2011/01/06/postleitzahlen-visualisiert/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Kasseler useR! Group</title>
		<link>http://www.ahschulz.de/2010/06/20/kasseler-user-group/</link>
		<comments>http://www.ahschulz.de/2010/06/20/kasseler-user-group/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 11:44:56 +0000</pubDate>
		<dc:creator>Arne</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[Kassel]]></category>
		<category><![CDATA[useR! Group]]></category>

		<guid isPermaLink="false">http://www.arnehendrikschulz.de/?p=99</guid>
		<description><![CDATA[Seit neuestem gibt es eine useR!-Gruppe in Kassel. Das erste Treffen ist für den 24.06.2010 im Technologie- und Gründungszentrum (FiDT) geplant. Neben einer kurzen Einführung wird es um GUIs, Pakete und und &#8220;R Scene&#8221; gehen, eher allgemeien Themen eben. Darüber &#8230; <a href="http://www.ahschulz.de/2010/06/20/kasseler-user-group/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-28" title="Rlogo" src="http://www.arnehendrikschulz.de/wp-content/uploads/2010/02/Rlogo-300x227.png" alt="" width="108" height="82" />Seit neuestem gibt es eine <a href="http://www.meetup.com/Kassel-useR-Group/" target="_blank">useR!-Gruppe</a> in Kassel. Das erste Treffen ist für den 24.06.2010 im Technologie- und Gründungszentrum (<a href="http://www.fidt.de/" target="_blank">FiDT</a>) geplant.</p>
<p>Neben einer kurzen Einführung wird es um GUIs, Pakete und und &#8220;R Scene&#8221; gehen, eher allgemeien Themen eben. Darüber hinaus wüird vor allem auch organisatorisches angesprochen werden.</p>
<p>Wer Interesse hat, ist herzlich willkommen: <a href="http://www.meetup.com/Kassel-useR-Group/" target="_blank">http://www.meetup.com/Kassel-useR-Group/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ahschulz.de/2010/06/20/kasseler-user-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>R Variablensystem</title>
		<link>http://www.ahschulz.de/2010/03/04/r-variablensystem/</link>
		<comments>http://www.ahschulz.de/2010/03/04/r-variablensystem/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 20:27:27 +0000</pubDate>
		<dc:creator>Arne</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[Manual]]></category>
		<category><![CDATA[Variablen]]></category>

		<guid isPermaLink="false">http://www.arnehendrikschulz.de/?p=37</guid>
		<description><![CDATA[R verfügt, im Gegensatz zu anderen Statistikprogrammen über mehrere Variablentypen. Während in der Regel mit einer Excel-ähnlichen Ansicht gearbeitet wird, sind in R auch Vektoren, Matrizen, Listen, Faktoren und mehr. Als Neu-/Umsteiger kann dies durchaus verwirrend sein. Christopher Bare hat &#8230; <a href="http://www.ahschulz.de/2010/03/04/r-variablensystem/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>R verfügt, im Gegensatz zu anderen Statistikprogrammen über mehrere Variablentypen. Während in der Regel mit einer Excel-ähnlichen Ansicht gearbeitet wird, sind in R auch Vektoren, Matrizen, Listen, Faktoren und mehr. Als Neu-/Umsteiger kann dies durchaus verwirrend sein. Christopher Bare hat in seinem Blog einen <a href="http://digitheadslabnotebook.blogspot.com/2010/01/r-type-system.html" target="_blank">kleinen Beitrag</a> über die verschiedenen Variablentypen geschrieben. Sehr empfehlenswert!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ahschulz.de/2010/03/04/r-variablensystem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>R GUI</title>
		<link>http://www.ahschulz.de/2010/02/22/r-gui/</link>
		<comments>http://www.ahschulz.de/2010/02/22/r-gui/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 18:49:10 +0000</pubDate>
		<dc:creator>Arne</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[SPSS]]></category>

		<guid isPermaLink="false">http://www.arnehendrikschulz.de/?p=32</guid>
		<description><![CDATA[Die vielleicht größte Umstellung für jemanden, der von SPSS oder Stata zu R kommt, ist sicherlich die grafische Oberfläche (GUI). Gerade von SPSS ist man ja gewohnt, dass viele Sachen über Menüs erledigt werden können. Das trifft sowohl für Datenmanipulation &#8230; <a href="http://www.ahschulz.de/2010/02/22/r-gui/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Die vielleicht größte Umstellung für jemanden, der von SPSS oder Stata zu R kommt, ist sicherlich die grafische Oberfläche (GUI). Gerade von SPSS ist man ja gewohnt, dass viele Sachen über Menüs erledigt werden können. Das trifft sowohl für Datenmanipulation als auch für Analysen zu. Zwar bietet die Syntax in beiden Programmen meiner Meinung nach besonders bei Analysen einen großen Vorteil, die Datenübersicht ist damit aber natürlich nicht in gleichem Maße gegeben. Also bieten die beiden kommerziellen Programme einen Vorteil bei der Datenansicht. Die reine R-GUI ist dagegen im Vergleich recht &#8220;asketisch&#8221; gehalten.</p>
<p>Aber R wäre nicht R, wenn sich das Problem nicht lösen ließe. Ich habe bereits <a href="http://www.keepnet.de/blog/2009/11/07/r-frontendgui/index.html" target="_blank">früher</a> einige verfügbare GUIs verglichen und damals <a href="http://www.walware.de/goto/statet" target="_blank">StatET </a>meinen Segen gegeben. Mitlerweile bin ich von der Entscheidung wieder etwas abgewichen (vielleicht bin ich einfach auch nur zu sprunghaft <img src='http://www.ahschulz.de/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ). Mein aktueller Favorit ist aktuell ganz klar <a href="http://jgr.markushelbig.org/JGR.html" target="_blank">JGR</a> &#8211; allerdings nur in Verbindung mit dem <a href="http://ifellows.ucsd.edu/pmwiki/index.php?n=Main.DeducerManual" target="_blank">Deducer</a>-Paket. JGR an sich ist ja bereits ganz nett, wird meiner Meinung nach aber erst mit Deducer wirklich herausragend. Im Grunde wird JGR nur um einige Befehle erweitert: So lassen sich einige statistische Tests durchführen (Deskriptive Analysen, Kreuztabellen, diverse Signifikanztests und Regressionsmodelle). Allerdings bringt das Paket auch einen wunderbaren &#8220;Data Viewer&#8221; mit. Dies bietet einen wunderbaren Überblick über die Daten. Zudem stehen einige Tools zur Datenmanipulation zur Verfügung. Das Aussehen und die Haptik ist dabei eng an SPSS angeleht.</p>
<p>Für mich im Moment die beste GUI und sehr empfehlenswert&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ahschulz.de/2010/02/22/r-gui/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Was ist R?</title>
		<link>http://www.ahschulz.de/2010/02/16/was-ist-r/</link>
		<comments>http://www.ahschulz.de/2010/02/16/was-ist-r/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 21:24:33 +0000</pubDate>
		<dc:creator>Arne</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.arnehendrikschulz.de/?p=25</guid>
		<description><![CDATA[Da ich hier in Zukunft öfter mal die Programmiersprache R ansprechen bzw. verwenden werde, möchte ich an dieser Stelle (und am Anfang des Blogs) eine kurze Vorstellung vornehmen. Bei R handelt es sich im Grunde um eine frei verfügbare Programmiersprache &#8230; <a href="http://www.ahschulz.de/2010/02/16/was-ist-r/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-28" title="Rlogo" src="http://www.arnehendrikschulz.de/wp-content/uploads/2010/02/Rlogo-150x113.png" alt="" width="150" height="113" />Da ich hier in Zukunft öfter mal die Programmiersprache <a href="http://www.r-project.org/" target="_blank">R</a> ansprechen bzw. verwenden werde, möchte ich an dieser Stelle (und am Anfang des Blogs) eine kurze Vorstellung vornehmen.</p>
<p>Bei <a href="http://www.r-project.org/" target="_blank">R</a> handelt es sich im Grunde um eine frei verfügbare Programmiersprache und den dazugehörigen Softwareaufbau. Das Programm kann dabei um viele Funktionen erweitert werden. Aktuell gibt es <a href="http://cran.r-project.org/web/packages/" target="_blank">über 2200 weitere Pakete</a>, die so ziemlich jede statistische Funktion abdecken (soweit ich das beurteilen kann).</p>
<p>Wer sich einen weiteren Einblick verschaffen möchte, was R alles kann und wofür R alles verwendet werden kann, sollte vielleicht <a href="http://www.revolution-computing.com/events/2010/The-R-Project-Data-Analysis-and-Statistical-Graphics-for-the-Enterprise-Webinar/index.php" target="_blank">hier </a>vorbeischauen. Dort gibt es eine etwa 30minütige Einführung mit dazugehörigen Folien zum Herunterladen. Die Videos sind als Download und als Youtube-Video verfügbar.</p>
<p>Ich kann die Videos nur jedem ans Herz legen, der mal ein wenig in R hineinschnuppern will.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ahschulz.de/2010/02/16/was-ist-r/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

