17nov./16

# Mais où est Charlie ?

Hier, j’ai parcouru un article amusant de Randal S. Olson, intitulé « Here’s Waldo: Computing the optimal search strategy for finding Waldo« . Bon, ce n’est rien de nouveau, je sais, j’arrive un peu en retard, ça date de 2015. Quoi qu’il en soit, j’ai voulu apporter mon petit grain de sable au contenu proposé par Randal. Dans son billet, il explique qu’il a passé son week-end à chercher une stratégie optimale pour trouver Charlie. Vous savez, ce petit personnage en pull rayé rouge et blanc, avec un bonnet à pompom sur la tête. Pour ce faire, Randal a utilisé des techniques de machine learning. Il s’appuie sur une image publiée par Slate (Here’s Waldo, 2013, par Ben Blatt), qui répertorie la position de Charlie dans 68 double pages des albums. Randal extrait les coordonnées de l’image (et les partage gentiment).

[…]

18janv./16

# Maps with R: slides

The other day, someone asked me if it was easy to do maps with R. My first thought was: « of course, it is ». I offered to prepare a few slides. I guess it was not that simple after all because one actually needs quite a lot of basic knowledge to be able to create its own map.

03nov./14

# French dates in R – From Mac OS to Windows

The other day during my R lecture, something I did not expect happen… I should have known, or at least guess that it would not work… But I wanted to believe it would. When I gave examples on how to read both English and French formatted dates in R, what was working perfectly on Mac OS X did not on Windows Seven. The example was the following:

d_char_fr <- "Mer 04 Fév 2015"
d_char <- "Wed 04 Feb 2015"
as.Date(d_char_fr, format = c("%a %d %b %Y"))
as.Date(d_char, format = c("%a %d %b %Y"))

30oct./14

# Coordinates of « hot-spots »

Last week I uploaded a note about the paper @freakonometrics and I have submitted again after we added quite a few revisions. We have already made available most of the R code to reproduce our applications (on this GitHub repository). However, we did not share our method to obtain the coordinates of the « hot-spots » areas

22oct./14

# Kernel Density Estimation with Ripley’s Circumferential Correction

This is it! The revised version of a paper written with Arthur Charpentier has been submitted yesterday! It is untitled « Kernel Density Estimation with Ripley’s Circumferential Correction ». The paper is available on https://hal.archives-ouvertes.fr/hal-00725090.

19avril/14

# Maps with R

Last month, @freakonometrics posted a bunch of articles on his blog about the North pole (in French):

There are some maps on these articles that were produced using ggplot2 excellent package in R. We want to share our code here.

03janv./14

# Tweet goes viral

To begin this new year, I had the pleasure to have some fun with R, Gephi and Twitter.

25nov./13

# European Map using R

In this post, I will present a way to plot a European Union map using R. As you know, some countries are missing in the maps package. So, instead of working with that package, we will use the rworldmap one, available on CRAN. We will also need two more packages : ggplot2 and grid.

10nov./13

# Scale bar and North arrow on a ggplot2 map using R

After some research on the Internet, I gave up trying to find an R function to add a scale bar and a North arrow on a map, using ggplot().
So, I would like to present you what I have come up with.

The idea is really basic : we create two polygons for the scale bar, we add some text above, and we draw an arrow. That’s it. The only tricky thing here, is the way to obtain the coordinates of each element. An easy solution is to use the gcDestination function, from the maptools package.