<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Trains of Thoughts</title>
	<atom:link href="http://blog.michelemattioni.me/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.michelemattioni.me</link>
	<description>An eye to the net, an eye to the world.</description>
	<lastBuildDate>Fri, 17 May 2013 01:24:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.michelemattioni.me' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Trains of Thoughts</title>
		<link>http://blog.michelemattioni.me</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.michelemattioni.me/osd.xml" title="Trains of Thoughts" />
	<atom:link rel='hub' href='http://blog.michelemattioni.me/?pushpress=hub'/>
		<item>
		<title>Google Cloud free trial coming to end</title>
		<link>http://blog.michelemattioni.me/2013/05/08/google-cloud-free-trial-coming-to-end/</link>
		<comments>http://blog.michelemattioni.me/2013/05/08/google-cloud-free-trial-coming-to-end/#comments</comments>
		<pubDate>Wed, 08 May 2013 08:26:34 +0000</pubDate>
		<dc:creator>mattions</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[free trial ending]]></category>
		<category><![CDATA[google cloud]]></category>
		<category><![CDATA[loquacius]]></category>

		<guid isPermaLink="false">http://blog.michelemattioni.me/?p=2960</guid>
		<description><![CDATA[I received an e-mail yesterday that the Google Cloud free trial period is coming to an end. This means that from the 1st of June onwards, every instance needs to be paid, starting with the smallest D0. Loquacius was running on google app engine, and it was a test to see how the new Cloud Sql [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2960&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://mattions.files.wordpress.com/2013/05/google_cloud_pic.png"><img class="aligncenter size-medium wp-image-2962" alt="google_cloud_pic" src="http://mattions.files.wordpress.com/2013/05/google_cloud_pic.png?w=300&#038;h=43" width="300" height="43" /></a></p>
<p>I received an e-mail yesterday that the <a href="https://developers.google.com/cloud-sql/">Google Cloud </a>free trial period is coming to an end.</p>
<p>This means that from the 1st of June onwards, every instance needs to be paid, starting with the smallest D0.</p>
<p><a title="Say hello to Loqu4cius" href="http://blog.michelemattioni.me/2013/01/24/say-hello-to-loqu4cius/">Loquacius</a> was running on google app engine, and it was a test to see how the new Cloud Sql was behaving with a classic Django website. Given the fact this was just a test, I&#8217;ve decided to switch it off.</p>
<p>I&#8217;ve downloaded the fixtures of the blog (just three entries to test the blog) and switched the database off, disabling the billing and deleting the D0 instance.</p>
<p>The code is still available on <a href="https://github.com/mattions/loqu4cius">github</a> but unfortunately the blog engine will not be run live anymore from google app engine.</p>
<p>You can still do it on your machine, or have a look how it was on <a href="http://blog.michelemattioni.me/2013/01/24/say-hello-to-loqu4cius/">this blog post</a>.</p>
<br />Filed under: <a href='http://blog.michelemattioni.me/category/open-source/'>Open Source</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattions.wordpress.com/2960/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattions.wordpress.com/2960/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2960&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michelemattioni.me/2013/05/08/google-cloud-free-trial-coming-to-end/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/f8d23fccb4b2e8ed576d1e993d098305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattions</media:title>
		</media:content>

		<media:content url="http://mattions.files.wordpress.com/2013/05/google_cloud_pic.png?w=300" medium="image">
			<media:title type="html">google_cloud_pic</media:title>
		</media:content>
	</item>
		<item>
		<title>Ggplot2 graph style with matplotlib</title>
		<link>http://blog.michelemattioni.me/2013/04/07/ggplot2-graph-style-with-matplotlib/</link>
		<comments>http://blog.michelemattioni.me/2013/04/07/ggplot2-graph-style-with-matplotlib/#comments</comments>
		<pubDate>Sun, 07 Apr 2013 14:20:13 +0000</pubDate>
		<dc:creator>mattions</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[ggplot2]]></category>
		<category><![CDATA[matplotlib]]></category>
		<category><![CDATA[matplotlibr]]></category>
		<category><![CDATA[style]]></category>

		<guid isPermaLink="false">http://blog.michelemattioni.me/?p=2942</guid>
		<description><![CDATA[Gg2plot is an amazing library to plot and it&#8217;s available for R to create stunning graphs. GGplot2 takes a different approach from the classic library, and instead of offering a classic line/points approach permits to combine these elements (example), which is a similar root took by D3js. If you are using the scientific python stack (matplotlib, [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2942&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://ggplot2.org/">Gg2plot</a> is an amazing library to plot and it&#8217;s available for <a href="http://www.r-project.org/">R</a> to create stunning graphs. GGplot2 takes a different approach from the classic library, and instead of offering a classic line/points approach permits to combine these elements (<a href="http://docs.ggplot2.org/0.9.2.1/ggplot.html">example</a>), which is a similar root took by <a title="Having fun with d3js" href="http://blog.michelemattioni.me/2012/09/27/having-fun-with-d3js/">D3js</a>. If you are using the scientific python stack (<a href="http://matplotlib.org/">matplotlib</a>, <a href="http://www.numpy.org/">numpy</a>, <a href="http://www.scipy.org/">scipy</a>, <a href="http://ipython.org/">ipython</a>) you have the very good matplotlib to plot and have all your graph app.</p>
<p>For example a bunch of sin and cosine generated by the following code:</p>
<p><script src="https://gist.github.com/mattions/5330631.js"></script></p>
<p>look like this:</p>
<p><a href="http://mattions.files.wordpress.com/2013/04/classic_matplotlib.png"><img class="aligncenter size-medium wp-image-2943" alt="classic_matplotlib" src="http://mattions.files.wordpress.com/2013/04/classic_matplotlib.png?w=280&#038;h=300" width="280" height="300" /></a></p>
<p>Instead if we set up a ggplot2 style, the graph looks like this:</p>
<p><a href="http://mattions.files.wordpress.com/2013/04/matplotlib_ggplot2_style.png"><img class="aligncenter size-medium wp-image-2945" alt="matplotlib_ggplot2_style" src="http://mattions.files.wordpress.com/2013/04/matplotlib_ggplot2_style.png?w=280&#038;h=300" width="280" height="300" /></a></p>
<p>You may prefer one or the other. Anyway if you like the last one, just download this <a href="https://gist.github.com/mattions/5291765">matplotlibrc</a> and save it as <code>~/.matplotlib/matplotlibrc</code>, and all your graph will have that style as default.</p>
<p>The matplotlibrc has been inspired by this <a href="http://www.huyng.com/posts/sane-color-scheme-for-matplotlib/">post</a>, I&#8217;ve just updated with the latest matplotlibrc from matplotlib 1.2.1 version.</p>
<p>Have fun!</p>
<p>Edit: Bonus plot, <a href="https://gist.github.com/mattions/5330631#file-sin_and_cos-py-L11">code in the gist</a>.</p>
<p><a href="http://mattions.files.wordpress.com/2013/04/exp_and_log1.png"><img class="aligncenter size-medium wp-image-2958" alt="exp_and_log" src="http://mattions.files.wordpress.com/2013/04/exp_and_log1.png?w=300&#038;h=225" width="300" height="225" /></a></p>
<br />Filed under: <a href='http://blog.michelemattioni.me/category/open-source/'>Open Source</a>, <a href='http://blog.michelemattioni.me/category/science/'>Science</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattions.wordpress.com/2942/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattions.wordpress.com/2942/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2942&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michelemattioni.me/2013/04/07/ggplot2-graph-style-with-matplotlib/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/f8d23fccb4b2e8ed576d1e993d098305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattions</media:title>
		</media:content>

		<media:content url="http://mattions.files.wordpress.com/2013/04/classic_matplotlib.png?w=280" medium="image">
			<media:title type="html">classic_matplotlib</media:title>
		</media:content>

		<media:content url="http://mattions.files.wordpress.com/2013/04/matplotlib_ggplot2_style.png?w=280" medium="image">
			<media:title type="html">matplotlib_ggplot2_style</media:title>
		</media:content>

		<media:content url="http://mattions.files.wordpress.com/2013/04/exp_and_log1.png?w=300" medium="image">
			<media:title type="html">exp_and_log</media:title>
		</media:content>
	</item>
		<item>
		<title>GeoFestival powering the E-luminatefestival website</title>
		<link>http://blog.michelemattioni.me/2013/02/20/geofestival-powering-the-e-luminatefestival-website/</link>
		<comments>http://blog.michelemattioni.me/2013/02/20/geofestival-powering-the-e-luminatefestival-website/#comments</comments>
		<pubDate>Wed, 20 Feb 2013 15:11:44 +0000</pubDate>
		<dc:creator>mattions</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[consultancy]]></category>
		<category><![CDATA[eluminatefestival]]></category>
		<category><![CDATA[engine]]></category>
		<category><![CDATA[geofestival]]></category>
		<category><![CDATA[opensource]]></category>

		<guid isPermaLink="false">http://blog.michelemattioni.me/?p=2918</guid>
		<description><![CDATA[So in two weeks (working like maniacs) we managed to create and set up a pretty cool system to provide a platform for festivals which have different events that spawns in multiple places at different time. Right now the platform powers the first happening of the E-LuminateFestival. It is built using Django, no, not this [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2918&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://mattions.files.wordpress.com/2013/02/e-luminate-festival-map.png"><img class="size-full wp-image" id="i-2924" alt="Image" src="http://mattions.files.wordpress.com/2013/02/e-luminate-festival-map.png?w=487" /></a></p>
<p>So in two weeks (working like maniacs) we managed to create and set up a pretty cool system to provide a platform for festivals which have different events that spawns in multiple places at different time.</p>
<p>Right now the platform powers the first happening of the <a href="http://www.e-luminatefestivals.co.uk/">E-LuminateFestival</a>. It is built using Django, no, not this <a href="http://en.wikipedia.org/wiki/Django_Unchained">Django</a>, this <a href="https://www.djangoproject.com/">Django</a>, it uses <a href="http://leafletjs.com/">Leaflet </a>for the map integration, using the geographical data from <a href="http://www.openstreetmap.org/">OpenStreetMap</a>. It&#8217;s mobile friendly with the use of Bootstrap and some help from us as well.</p>
<p>The events can be submitted only by participants who are approved by the administrator of the site. The code is available under GPL, but if you want us to set it up and tailor it for your event, just give us a shout.</p>
<br />Filed under: <a href='http://blog.michelemattioni.me/category/english/'>English</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattions.wordpress.com/2918/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattions.wordpress.com/2918/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2918&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michelemattioni.me/2013/02/20/geofestival-powering-the-e-luminatefestival-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/f8d23fccb4b2e8ed576d1e993d098305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattions</media:title>
		</media:content>

		<media:content url="http://mattions.files.wordpress.com/2013/02/e-luminate-festival-map.png?w=487" medium="image">
			<media:title type="html">Image</media:title>
		</media:content>
	</item>
		<item>
		<title>What do I do when my Pull Request does not merge automatically in master?</title>
		<link>http://blog.michelemattioni.me/2013/01/29/what-do-i-do-when-my-pull-request-does-not-merge-automatically-in-master/</link>
		<comments>http://blog.michelemattioni.me/2013/01/29/what-do-i-do-when-my-pull-request-does-not-merge-automatically-in-master/#comments</comments>
		<pubDate>Tue, 29 Jan 2013 12:02:22 +0000</pubDate>
		<dc:creator>mattions</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[conflicts]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[merge]]></category>
		<category><![CDATA[not fast forward]]></category>
		<category><![CDATA[pull request]]></category>

		<guid isPermaLink="false">http://blog.michelemattioni.me/?p=2901</guid>
		<description><![CDATA[Github makes very easy to collaborate with people, however sometime it&#8217;s a bit complicated to understand how to use Pull Request, and in particular how to make sure that the feature branch can be merged in master in a Fast Forward way So let&#8217;s se how we can go from this(Or the famous &#8220;can&#8217;t be [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2901&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://github.com">Github</a> makes very easy to collaborate with people, however sometime it&#8217;s a bit complicated to understand how to use Pull Request, and in particular how to make sure that the feature branch can be merged in master in a Fast Forward way</p>
<p>So let&#8217;s se how we can go from this(Or the famous &#8220;can&#8217;t be merged automatically&#8221;)</p>
<p><a href="http://mattions.files.wordpress.com/2013/01/pull-request-cannot-be-merged.png"><img class="aligncenter size-medium wp-image-2902" alt="Pull Request cannot be merged" src="http://mattions.files.wordpress.com/2013/01/pull-request-cannot-be-merged.png?w=300&#038;h=24" width="300" height="24" /></a></p>
<p>&nbsp;</p>
<p>to this: (Or yeah, this looks good)</p>
<p style="text-align:center;"><a href="http://mattions.files.wordpress.com/2013/01/pullrequestcanbemerged.png"><img class="aligncenter  wp-image-2903" alt="PullRequestCanbeMerged" src="http://mattions.files.wordpress.com/2013/01/pullrequestcanbemerged.png?w=300&#038;h=21" width="300" height="21" /></a></p>
<p>&nbsp;</p>
<h2>Why this happens</h2>
<p>The problem is that both in master and in your branch some files have been changed, and their going in different directions. The content of the file in master is different from the one in your feature_branch, and git does not know which one to pick, or how to integrate them.</p>
<p>To solve this, you need to</p>
<ol>
<li>Get the latest upstream/master</li>
<li>Switch to your master</li>
<li>merge the latest master in your master (Never develop in master, <strong>always develop in a feature branch</strong>)</li>
<li>switch to your feature branch</li>
<li>merge master <strong>in </strong>your feature branch</li>
<li>solve all the conflicts: this is where you decide how to integrate the conflicting files, and this can be done only by you because you know what you did, you can figure out what happened in master, and pick the best way to integrate them.</li>
<li>commit all the changes, after all the conflicts are solved</li>
<li>push your feature branch to your origin: the Pull Request will automatically update</li>
</ol>
<h2>Talk is cheap, show me the commands (cit. adapted)</h2>
<p>If you didn&#8217;t already add the upstream to your repo, have a read to <a href="https://help.github.com/articles/syncing-a-fork">this</a></p>
<p>1. Fetching upstream<br />
<code>git fetch upstream</code><br />
2. Go to your master. Never develop here.<br />
<code>git checkout master</code><br />
3. Bringing your master up to speed with latest upstream master<br />
<code>git merge upstream/master</code><br />
4. Go to the branch you are developing<br />
<code>git checkout my_feature_branch</code><br />
5. It will not be fast forward<br />
<code>git merge master</code><br />
6. Solve the conflicts. get a decent 3 views visual diff editor. I like <a href="http://meldmerge.org/">Meld</a><br />
<code>git mergetool</code><br />
7. Commit all the changes. Write an intelligible commit message<br />
<code>git commit -m "Decent commit message"</code><br />
8. This will push the branch up on your repo.<br />
<code>git push origin my_feature_branch</code></p>
<div>Hope it helps.</div>
<p>&nbsp;</p>
<br />Filed under: <a href='http://blog.michelemattioni.me/category/open-source/'>Open Source</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattions.wordpress.com/2901/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattions.wordpress.com/2901/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2901&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michelemattioni.me/2013/01/29/what-do-i-do-when-my-pull-request-does-not-merge-automatically-in-master/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/f8d23fccb4b2e8ed576d1e993d098305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattions</media:title>
		</media:content>

		<media:content url="http://mattions.files.wordpress.com/2013/01/pull-request-cannot-be-merged.png?w=300" medium="image">
			<media:title type="html">Pull Request cannot be merged</media:title>
		</media:content>

		<media:content url="http://mattions.files.wordpress.com/2013/01/pullrequestcanbemerged.png?w=300" medium="image">
			<media:title type="html">PullRequestCanbeMerged</media:title>
		</media:content>
	</item>
		<item>
		<title>Say hello to Loqu4cius</title>
		<link>http://blog.michelemattioni.me/2013/01/24/say-hello-to-loqu4cius/</link>
		<comments>http://blog.michelemattioni.me/2013/01/24/say-hello-to-loqu4cius/#comments</comments>
		<pubDate>Thu, 24 Jan 2013 08:37:16 +0000</pubDate>
		<dc:creator>mattions</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[django blog]]></category>
		<category><![CDATA[googleappengine]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[locqu4cius]]></category>

		<guid isPermaLink="false">https://mattions.wordpress.com/?p=2895</guid>
		<description><![CDATA[Loqu4cius is a lightweight blog engine based on Django (not this Django), that runs on google app engine and it uses as backend CloudSQL, which is, as google put it, MySQL on the cloud. A bit of history Google appengine has the ability to run scalable app. So far it was possible to use django on it, [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2895&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://mattions.files.wordpress.com/2013/01/loqu4cius.png"><img class="aligncenter size-medium wp-image-2897" alt="loqu4cius" src="http://mattions.files.wordpress.com/2013/01/loqu4cius.png?w=300&#038;h=181" width="300" height="181" /></a></p>
<p><a href="http://loqu4cius.appspot.com/">Loqu4cius</a> is a lightweight blog engine based on <a href="https://www.djangoproject.com/">Django</a> (not this <a href="http://www.imdb.com/title/tt1853728/">Django</a>), that runs on google app engine and it uses as backend <a href="https://developers.google.com/cloud-sql/">CloudSQL</a>, which is, as google put it, MySQL on the cloud.</p>
<h2>A bit of history</h2>
<p>Google appengine has the ability to run scalable app. So far it was possible to use django on it, given the fact Python was one of the two supported languages, however the back end was big table, which is not compatible with the classic RDBMS used by django.</p>
<p>This made impossible to use span relation and over, so the only usable bit of django were the templates, the URLs router but not the model&#8230;</p>
<h4><a href="https://github.com/django-nonrel">Django-nonrel</a> to the rescue.</h4>
<p>A project called django-nonrel came to the rescue, and it created a compability layer between the NoSQL backend and the classic django ORM. Most of the span relationship were working, however some of the join, like the many2many were not available.</p>
<h2>Fast forward to our time</h2>
<p>Fast forward to today, google made it possible to have a classic RDBMS available, with the possibility to use all the <a href="https://docs.djangoproject.com/en/dev/topics/db/queries/">ORM goodies</a>, included django third app that can speed up and reuse the development.</p>
<h4>So now <a href="https://developers.google.com/cloud-sql/">Google-cloud</a> to the rescue.</h4>
<p>To check it out, I&#8217;ve came up with <a href="http://loqu4cius.appspot.com/">Loqu4cius</a>.</p>
<p>It features a tag cloud that makes it be 2.0, is based on Twitter <a href="http://twitter.github.com/bootstrap/">Bootstrap</a>, and I&#8217;ve styled with some colors and the fonts (directly from <a href="http://www.google.com/webfonts">google font</a>), a search bar and the ability to enter rich text using <a href="http://ckeditor.com/">ckeditor</a>. The comments are integrated using disqus, that is the way to go right now.</p>
<p>The code is on <a href="https://github.com/mattions/loqu4cius">GitHub</a> with a quick readme, for any question the comments are here <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<h2>Some thoughts about the development</h2>
<p>Google appengine comes with some limitation, but with the possibility to add third parties libraries it is possible to re-use a lot of the django apps already available. (Let&#8217;s agree on terminology: app &#8211;&gt; a single application that does one thing, for example it manages the tags, project &#8211;&gt; a collection of all the apps and related files that runs the entire site.)</p>
<p>My strategy is to create a virtualenv and than copy all the necessary modules into the lib folder. This gives me the ability to install a package with</p>
<p><em>pip install package_name</em></p>
<p>and all the dependencies very easily. After that it&#8217;s a matter or using the apps and make it work pretty nice.</p>
<h4>CSS writing</h4>
<p>I like to use <a href="http://lesscss.org/">less</a> to write CSS, but I don&#8217;t want to have a client compilation of the less file, and I want only to serve CSS in production, therefore I use two helper to get the job done.</p>
<p>First I use a <a href="https://github.com/mattions/loqu4cius/blob/master/scripts/build_less.py">python script</a> that finds all the less file and compiles them into css, calling the lessc compiler.</p>
<p>However I don&#8217;t want everytime that I write a new bit of the less file, to call the script myself, so I use watchdog to call the script everytime the less file gets saved.</p>
<p>It would be nice to have a tool that can launch both the development server and this script in one go, and it actually doable. It&#8217;s called <a href="https://github.com/nickstenning/honcho">honcho</a> and it accepts a classic Procfile.</p>
<p>For example for loqu4cius this is the Procfile.Dev</p>
<pre id="LC1">web: ./serve.sh</pre>
<pre id="LC2">less: watchmedo shell-command --patterns="*.less" --command='./scripts/build_less.py "${watch_src_path}" ' static/less/</pre>
<p>launching it with honcho -f Procfile.dev start makes sure to launch the development server, and to recompile and move the file to the collectstatic folder as required in one go, so you can focus on just developing.</p>
<p>Last but not least, I&#8217;ve created a quick release script, called <a href="https://github.com/mattions/loqu4cius/blob/master/release_site.py">release_site.py</a>, which:</p>
<ul>
<li>increases the app.yaml version of the site</li>
<li>performs the syncdb in production</li>
<li>uploads the site using appcfg.py,</li>
<li>commit the modifies app.yaml to the repo</li>
<li>tags the repo with the version number</li>
</ul>
<p>so you can always now which commit refers to which version on googleappengine.</p>
<p>To figure out how to set up the enviroment in a way to have a streamlined development took me a bunch of days, and I&#8217;m eager to know other solutions to the same problems!</p>
<br />Filed under: <a href='http://blog.michelemattioni.me/category/english/'>English</a>, <a href='http://blog.michelemattioni.me/category/open-source/'>Open Source</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattions.wordpress.com/2895/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattions.wordpress.com/2895/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2895&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michelemattioni.me/2013/01/24/say-hello-to-loqu4cius/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/f8d23fccb4b2e8ed576d1e993d098305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattions</media:title>
		</media:content>

		<media:content url="http://mattions.files.wordpress.com/2013/01/loqu4cius.png?w=300" medium="image">
			<media:title type="html">loqu4cius</media:title>
		</media:content>
	</item>
		<item>
		<title>How to use Neuronvisio to select particular sections of a NEURON based multi-compartment model</title>
		<link>http://blog.michelemattioni.me/2013/01/09/how-to-use-neuronvisio-to-select-particular-sections-of-a-neuron-based-multi-compartment-model/</link>
		<comments>http://blog.michelemattioni.me/2013/01/09/how-to-use-neuronvisio-to-select-particular-sections-of-a-neuron-based-multi-compartment-model/#comments</comments>
		<pubDate>Wed, 09 Jan 2013 11:52:21 +0000</pubDate>
		<dc:creator>mattions</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[neuron]]></category>
		<category><![CDATA[neuronvisio]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://blog.michelemattioni.me/?p=2885</guid>
		<description><![CDATA[Displaying and visualizing selected sections in multi-compartmental models in 3D it&#8217;s quite an hard task, however the info and the clarity that is possible to achieve is worth the effort. Let&#8217;s say you have your multi-compartiment model ready in NEURON and you are interested to show in 3D selected sections of the model with arbitrary colors (for example, [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2885&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Displaying and visualizing selected sections in multi-compartmental models in 3D it&#8217;s quite an hard task, however the info and the clarity that is possible to achieve is worth the effort.</p>
<p>Let&#8217;s say you have your <a href="http://en.wikipedia.org/wiki/Multi-compartment_model">multi-compartiment</a> model ready in <a href="http://www.neuron.yale.edu/neuron/">NEURON</a> and you are interested to show in 3D selected sections of the model with arbitrary colors (for example, to show where certain stimuli are applied), like I did in my Medium Spiny Neuron model to show which spines get stimulated:</p>
<div id="attachment_2890" class="wp-caption aligncenter" style="width: 310px"><a href="http://mattions.files.wordpress.com/2013/01/neuron_stimulated_spines.png"><img src="http://mattions.files.wordpress.com/2013/01/neuron_stimulated_spines.png?w=300&#038;h=240" alt="spiny MSN with stimulated with different trains in selected spines" width="300" height="240" class="size-medium wp-image-2890" /></a><p class="wp-caption-text">spiny MSN with stimulated with different trains in selected spines</p></div>
<p><a href="http://neuronvisio.org/">Neuronvisio</a> offers a nice API, from the visio module, accessible as <a href="http://neuronvisio.org/visio.html#neuronvisio.visio.Visio.select_sections">controls.visio.select_sections(secs_list, scalar_value)</a>, which makes this operation easy.</p>
<p>For example, let&#8217;s take the <a href="https://github.com/mattions/neuronvisio/tree/master/examples/pyramidal">pyramidal neuron model</a> that comes as an example with Neuronvisio.</p>
<p>Let&#8217;s say that we want to select the soma, the iseg and the first section of the myelin, and we want to give them arbitrary colors.</p>
<p>To achieve that we can easily run:</p>
<p><em>controls.visio.select_sections(["soma", "iseg", "myelin[0]&#8220;], [1, 0.5, 0.2]), </em>obtaining this picture:</p>
<div id="attachment_2887" class="wp-caption aligncenter" style="width: 234px"><a href="http://mattions.files.wordpress.com/2013/01/pyramidal_selected_sections_different_colors1.png"><img class="size-medium wp-image-2887" alt="Selecting and coloring special sections with Neuronvisio" src="http://mattions.files.wordpress.com/2013/01/pyramidal_selected_sections_different_colors1.png?w=224&#038;h=300" width="224" height="300" /></a><p class="wp-caption-text">Selecting and coloring special sections with Neuronvisio</p></div>
<p>Quite handy and pretty fast, don&#8217;t you think?</p>
<br />Filed under: <a href='http://blog.michelemattioni.me/category/english/'>English</a>, <a href='http://blog.michelemattioni.me/category/open-source/'>Open Source</a>, <a href='http://blog.michelemattioni.me/category/science/'>Science</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattions.wordpress.com/2885/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattions.wordpress.com/2885/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2885&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michelemattioni.me/2013/01/09/how-to-use-neuronvisio-to-select-particular-sections-of-a-neuron-based-multi-compartment-model/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/f8d23fccb4b2e8ed576d1e993d098305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattions</media:title>
		</media:content>

		<media:content url="http://mattions.files.wordpress.com/2013/01/neuron_stimulated_spines.png?w=300" medium="image">
			<media:title type="html">spiny MSN with stimulated with different trains in selected spines</media:title>
		</media:content>

		<media:content url="http://mattions.files.wordpress.com/2013/01/pyramidal_selected_sections_different_colors1.png?w=224" medium="image">
			<media:title type="html">Selecting and coloring special sections with Neuronvisio</media:title>
		</media:content>
	</item>
		<item>
		<title>2012 in review</title>
		<link>http://blog.michelemattioni.me/2012/12/31/2012-in-review/</link>
		<comments>http://blog.michelemattioni.me/2012/12/31/2012-in-review/#comments</comments>
		<pubDate>Mon, 31 Dec 2012 09:30:58 +0000</pubDate>
		<dc:creator>mattions</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[happy new year 2013]]></category>
		<category><![CDATA[have fun]]></category>
		<category><![CDATA[report]]></category>

		<guid isPermaLink="false">http://blog.michelemattioni.me/?p=2880</guid>
		<description><![CDATA[Happy New Year! Follow the tradition started last year, I will make the &#8220;trains of thoughts&#8221; report public, with the summary stats for the 2012. I&#8217;ve written 23 posts this year, which means roughly 2 posts per month. Not bad considering how busy it was. So Happy New Year and Enjoy 2013! Click here to see [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2880&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>Happy New Year!</strong></p>
<p>Follow the tradition started last year, I will make the &#8220;trains of thoughts&#8221; report public, with the summary stats for the 2012. I&#8217;ve written 23 posts this year, which means roughly 2 posts per month. Not bad considering how busy it was.</p>
<p><a href="http://blog.michelemattioni.me/2012/annual-report/"><img alt="" src="http://www.wordpress.com/wp-content/mu-plugins/annual-reports/img/2012-emailteaser.png" width="100%" /></a></p>
<p>So <strong>Happy New Year and Enjoy 2013</strong>! <a href="http://blog.michelemattioni.me/2012/annual-report/">Click here to see the complete report.</a></p>
<br />Filed under: <a href='http://blog.michelemattioni.me/category/english/'>English</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattions.wordpress.com/2880/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattions.wordpress.com/2880/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2880&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michelemattioni.me/2012/12/31/2012-in-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/f8d23fccb4b2e8ed576d1e993d098305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattions</media:title>
		</media:content>

		<media:content url="http://www.wordpress.com/wp-content/mu-plugins/annual-reports/img/2012-emailteaser.png" medium="image" />
	</item>
		<item>
		<title>Similarities between doing a PhD and building a startup</title>
		<link>http://blog.michelemattioni.me/2012/12/10/similarities-between-doing-a-phd-and-building-a-startup/</link>
		<comments>http://blog.michelemattioni.me/2012/12/10/similarities-between-doing-a-phd-and-building-a-startup/#comments</comments>
		<pubDate>Mon, 10 Dec 2012 13:18:28 +0000</pubDate>
		<dc:creator>mattions</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[phd]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[ssouk]]></category>
		<category><![CDATA[startup]]></category>

		<guid isPermaLink="false">http://blog.michelemattioni.me/?p=2854</guid>
		<description><![CDATA[The path is unknown and full of surprise It&#8217;s a bit of time that I have this post in mind, where I would like to compare the process of building a startup with the process of doing a PhD. This of course will be based on my experience, therefore the analogies and the difference which [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2854&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://instagram.com/p/Q50_KknEzz/"><img src="http://distilleryimage7.s3.amazonaws.com/d1702faa18ba11e29c1122000a1de9ee_6.jpg" alt="#autumn incoming fallen leaves with the hovering shadow of the winter" width="306" height="306" /></a></p>
<p><em>The path is unknown and full of surprise</em></p>
<p>It&#8217;s a bit of time that I have this post in mind, where I would like to compare the process of building a startup with the process of doing a PhD.</p>
<p>This of course will be based on my experience, therefore the analogies and the difference which I can find between building the <a href="http://sustainablesouk.com">SustainableSouk</a> and doing my <a href="http://michelemattioni.me/categories.html#academic-ref">PhD</a> at the <a href="http://www.ebi.ac.uk/">EBI</a>.</p>
<p>Let&#8217;s start with the similarities, shall we?</p>
<p>The object of a PhD is very broad, and it takes different shape and form. While you do a PhD, you need to have some hypothesis, which you are going to test in a scientific manner to assess if they can be accepted or they need to be thrown away.</p>
<p>Given the fact that I&#8217;m a fan of the Lean Startup method, I&#8217;ve applied this method also to the ssouk (shorthand for the SustainableSouk), where the inital idea has been launched tested, and now <a href="http://blog.sustainablesouk.com/post/37112997825/the-road-so-far-mill-road-winter-fair-and-what-is-next">we are pivoting</a> to a new direction.</p>
<p>so here it is the first similarity:<strong> Make hypothesis, test them on the ground and act accordingly</strong>.</p>
<p>Another important similarity, which is a direct consequences of this is: <strong>don&#8217;t give up</strong>. It takes a lot of time to create, test and analyse the results, and most of the time you will get that the first idea/hypothesis was not good enough and it will not bring you anywhere.</p>
<p>It is also interesting to note that there is a very different pace between the two: in a startup you have to go out there to test the market, and then see how this respond and how you can make it work. And you have to do it fast. While doing science instead, you usually go to conference and present your work, and it tends to take ages to write a paper, to get it out. You still have to do it fast, if it&#8217;s possible, however the publishing wheel is very slow turning.</p>
<p>So this is of course a not exhaustive list between the two, but I just wanted to give you a sense of what I have noticed so far and share it.</p>
<p>&nbsp;</p>
<br />Filed under: <a href='http://blog.michelemattioni.me/category/english/'>English</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattions.wordpress.com/2854/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattions.wordpress.com/2854/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2854&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michelemattioni.me/2012/12/10/similarities-between-doing-a-phd-and-building-a-startup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/f8d23fccb4b2e8ed576d1e993d098305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattions</media:title>
		</media:content>
	</item>
		<item>
		<title>An overview of Ruby on Rails from a Django user</title>
		<link>http://blog.michelemattioni.me/2012/10/03/an-overview-of-ruby-on-rails-from-a-django-user/</link>
		<comments>http://blog.michelemattioni.me/2012/10/03/an-overview-of-ruby-on-rails-from-a-django-user/#comments</comments>
		<pubDate>Wed, 03 Oct 2012 21:54:44 +0000</pubDate>
		<dc:creator>mattions</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.michelemattioni.me/?p=2833</guid>
		<description><![CDATA[So Ruby On Rails is worshipped as the best thing to develop a web-application after sliced bread, so I&#8217;ve decided to take a look at it. Ruby on Rails use an Model-Controller-View (MVC) pattern, which has the goal to disentangle the way you represent the data with the data itself. It may does not make too much [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2833&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://mattions.files.wordpress.com/2012/10/ruby-on-rails-logo.png"><img class="aligncenter size-full wp-image-2834" title="ruby-on-rails-logo" src="http://mattions.files.wordpress.com/2012/10/ruby-on-rails-logo.png?w=474" alt=""   /></a></p>
<p>So <a href="http://rubyonrails.org/">Ruby On Rails</a> is worshipped as the best thing to develop a web-application after <a href="http://en.wikipedia.org/wiki/Sliced_bread">sliced bread</a>, so I&#8217;ve decided to take a look at it. Ruby on Rails use an <a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller">Model-Controller-View</a> (MVC) pattern, which has the goal to disentangle the way you represent the data with the data itself. It may does not make too much sense, but trust me, it does.</p>
<p>The MVC paradigm is also used in <a href="https://www.djangoproject.com/">Django</a>, which is a python web-framework which uses the same principle and which I&#8217;m familiar with, given the fact I&#8217;ve picked it up to develop the <a href="http://sustainablesouk.com/">SustainableSouk</a>.</p>
<p>So the first thing I needed to do is to map my <a href="http://www.python.org/">Python</a> knowledge to <a href="http://www.ruby-lang.org/">Ruby</a>, and my Django knowledge to Rails.</p>
<h2>Difference in the languages</h2>
<p>Ruby is a dynamic typed language, with an interpreter which takes care of the garbage collector and so on. Both languages are strongly Object-Oriented, and mostly they work in the same way, however there are some little difference which are good to point out: (1) the return value at the end of one method, (2) the difference between puts and print</p>
<blockquote><p>Talk is cheap, show me the code &#8212; Linus Torwalds</p></blockquote>
<p>The same class in Python and Ruby</p>
<p><script src="https://gist.github.com/3828819.js"></script></p>
<p>As you can see, the languages are amazingly similar at first glance.<br />
Ruby does not care about indentation, but it defines the logical code with a keyword at the beginning (<em>class</em> or <em>def</em> for example), and it closes them with the <code>end</code> keyword.</p>
<p>The other major difference, at this level, is the implicit return of the method. In Ruby every method return the last line. And <em>puts</em> covers the same function of <em>print</em>.</p>
<h2>The frameworks</h2>
<p>Well, let&#8217;s move on on Rails, are we not here for that?<br />
Rails ships with <a href="http://rake.rubyforge.org/">rake</a> tasks, which makes very quick to throw the scaffolding of a project in no time (<code>rails new my_project</code>). This is similar to the django startproject command for djangonauts.</p>
<p>Ruby is all about configuration, and somehow resembles a lot django. You have a controller (view in django) function which gets called when a certain url match a certain pattern, defined in the config.rb (urls.py in django). The main difference is that ruby gives a lot of urls for free using a <a href="http://en.wikipedia.org/wiki/Representational_state_transfer">RESTful</a> scheme.</p>
<p>So the best way to get used with a system is to create something, so I set up a <a href="https://github.com/mattions/permagardener">repo</a> to do just that.</p>
<p>The process is quite straightforward, especially if you already know HTML5, CSS, SCSS and Javascript which are assets you can re-use in the rails app. I&#8217;ve deployed the demo app on heroku <a href="http://sultry-bayou-5775.herokuapp.com/">here</a></p>
<h2>Summary</h2>
<p>Moving from Python to Ruby, and from Django to Rails is not a too big jump, and I reckon, at least at the beginning when you don&#8217;t go deep into other libraries, you can get quite up to speed pretty soon. At the end, it&#8217;s more or less the same way of thinking.</p>
<p>P.S.: If you are in Cambridge and interested at Django, HTML5 and so on we have set up a <a href="http://www.meetup.com/Django-Cambridge">Django Cambridge Meetup</a> and our <a href="http://www.meetup.com/Django-Cambridge/events/83445942/">first event-get-together</a> is going to be on the 17th of October. I hope to see you there.</p>
<br />Filed under: <a href='http://blog.michelemattioni.me/category/english/'>English</a>, <a href='http://blog.michelemattioni.me/category/open-source/'>Open Source</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattions.wordpress.com/2833/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattions.wordpress.com/2833/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2833&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michelemattioni.me/2012/10/03/an-overview-of-ruby-on-rails-from-a-django-user/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/f8d23fccb4b2e8ed576d1e993d098305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattions</media:title>
		</media:content>

		<media:content url="http://mattions.files.wordpress.com/2012/10/ruby-on-rails-logo.png" medium="image">
			<media:title type="html">ruby-on-rails-logo</media:title>
		</media:content>
	</item>
		<item>
		<title>Having fun with d3js</title>
		<link>http://blog.michelemattioni.me/2012/09/27/having-fun-with-d3js/</link>
		<comments>http://blog.michelemattioni.me/2012/09/27/having-fun-with-d3js/#comments</comments>
		<pubDate>Thu, 27 Sep 2012 21:36:16 +0000</pubDate>
		<dc:creator>mattions</dc:creator>
				<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://blog.michelemattioni.me/?p=2820</guid>
		<description><![CDATA[So I needed an excuse to try D3js and therefore I decided to try to visualize the results of the two past elections (2007, 2009) of the Italian Democratic Party. I&#8217;ve collected the results in this page, and the code is on github. Now let&#8217;s go into the technical bit. D3js is a javascript library which makes very [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2820&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://mattions.files.wordpress.com/2012/09/confronto_primariepd_2007_2009.png"><img class="aligncenter size-medium wp-image-2822" title="confronto_primariepd_2007_2009" alt="" src="http://mattions.files.wordpress.com/2012/09/confronto_primariepd_2007_2009.png?w=300&#038;h=162" width="300" height="162" /></a></p>
<p>So I needed an excuse to try <a href="http://d3js.org">D3js</a> and therefore I decided to try to visualize the results of the two past elections (2007, 2009) of the Italian Democratic Party. I&#8217;ve collected the results in this <a href="http://michelemattioni.me/evolution-primarie-pd/">page</a>, and the code is on <a href="https://github.com/mattions/evolution-primarie-pd">github</a>.</p>
<p>Now let&#8217;s go into the technical bit. <a href="http://d3js.org/">D3js</a> is a javascript library which makes very easy to visualize and transform data, leaning on the <a href="http://en.wikipedia.org/wiki/Scalable_Vector_Graphics">svg</a> standard. Instead of offering a ready-made graph where you just call plot(x,y) and you&#8217;re done, with D3js you&#8217;ve got to write every little bit of it. A declarative approach is used and every-single bit displayed needs to be written. However D3js offers vey well-though methods to definy scales and data transformation, which do most of the heavy lifting.</p>
<blockquote><p>With great power comes great responsibilities (&#8211; Spiderman 2009)</p></blockquote>
<p>Writing Javascript is not fun, but <a href="http://coffeescript.org/">Coffeescript</a>, so I used it. D3js is quite steep, however if you already got the DOM, CSS and Jquery chaining approach to methods under the belt, than you have a chance. Otherwise desists <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Some resources I found very helpful:</p>
<ul>
<li>the tutorial: d3 for mere mortals is very good: <a href="http://www.recursion.org/d3-for-mere-mortals/">http://www.recursion.org/d3-for-mere-mortals/</a></li>
<li>this HTML5 presentation: <a href="http://lws.node3.org/#landing-slide">http://lws.node3.org/#landing-slide</a></li>
<li>This site, which explain everything in detail: <a href="http://www.dashingd3js.com/">http://www.dashingd3js.com/</a></li>
</ul>
<p>It&#8217;s not that bad, and I think the steepness of D3js is like <a href="www.latex-project.org">LaTeX</a>, quite tricky at the beginning, in favour of very nice and professional results in the long run.</p>
<p>So yeah, you can read and have a look at my first step at <a href="http://michelemattioni.me/evolution-primarie-pd/">http://michelemattioni.me/evolution-primarie-pd/</a></p>
<p><em>Edit 1: Added a new D3Js tutorial</em></p>
<br />Filed under: <a href='http://blog.michelemattioni.me/category/english/'>English</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattions.wordpress.com/2820/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattions.wordpress.com/2820/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michelemattioni.me&#038;blog=367108&#038;post=2820&#038;subd=mattions&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michelemattioni.me/2012/09/27/having-fun-with-d3js/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/f8d23fccb4b2e8ed576d1e993d098305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattions</media:title>
		</media:content>

		<media:content url="http://mattions.files.wordpress.com/2012/09/confronto_primariepd_2007_2009.png?w=300" medium="image">
			<media:title type="html">confronto_primariepd_2007_2009</media:title>
		</media:content>
	</item>
	</channel>
</rss>
