Feed on Posts or Comments

Category Archiveprogramming



english & programming & visualisation Franchu on 15 Dec 2009

United Kingdom’s Met Office dataset preliminary analysis: The Processing script

After posting yesterday the R script that generates the averaged temperatures files, you can find in my GitHub page the Processing script I used to generate the video in the post. Downloading the whole folder should be all you need to be able to reproduce the animation in your computer and with higher quality than what you see online as it got very degraded due to the compression.

I am aware that the code is not very good nor clean, but given that it was my first shoot at doing something with Processing and I was in a trial and error mode I think it is quite normal. I also don’t feel like spending time improving this code as there are other visualisations that I want to work on and where I will have the opportunity of correcting the mistakes I am already aware of.

I just wanted to mention a couple of things:

  • Processing does not support the declaration of enums inside a pde project. If you declare them in an external Java file you can use them in the pde. That is why the code looks weird passing String to define the type of dataset, and having all those cascading if-elseif statements.
  • The code could benefit from a more OO approach and use polymorphism to avoid some repetitions. I promise I will do better next time ;)

As usual, feedback and new ideas are very welcome :)

english & programming & visualisation Franchu on 15 Dec 2009

United Kingdom’s Met Office dataset preliminary analysis: The R script

As promised, I want to share with you the R code I used to generate all the beautiful charts of the United Kingdom’s Met Office dataset preliminary analysis post.

First of all, you need to download the dataset. I don’t want to hotlink directly the MySQL dump file that this guy produced, so just go over to his site and download it from there. In the meantime you can also see the perl script he wrote to convert the original dataset to the MySQL dump that we will be using.

Once you have downloaded the MySQL dump, uncompress it and import it into your MySQL database. In my case I created a database called “ClimateChange” and granted all rights on that database to a user called “ClimateChange” and without password.

Once you have your data in the database, you can start using R with this script available on GitHub.

english & fun & programming Franchu on 15 Aug 2009

Twit-sourced programming quotes and bug types

Lately I have been using Twitter quite a lot (feel free to follow me), and in the last couple of days I have found some very good programming and computer science quotes via @vicchi and bug types definitions via @peSHIr that I though you might enjoy.

If you have never heard of a Heinsenbug or a Schroedinbug, you might want to take a look at the Unusual software bugs page in Wikipedia. If you are like me, you will feel relieved to know that you are not alone when you have to deal with those kind of bugs and their names inmediately make sense. ;)

As for the quotes, the initial one shared by @vicchi was:

“Nine people can’t make a baby in a month.” – Fred Brooks

but there are many more available in the following websites:

Next Page »