maandag 6 april 2015

MAKING MAPS WITH R

Last week I was delivering a training to journalists of the 'Persgroep'. Topic: datajournalism2: more advanced techniques for data journalists. A short introduction to R was on the list. Using data about Dutch municipalities - gemeentedata- we did basic statistics in R. Faster and easier then in Excel.
You don't  have a clue about R? Take a training; for example this one: http://tryr.codeschool.com/. Install R studio on your machine. How? Read everything about installing R and R studio at http://www.r-bloggers.com/.
My students were enthusiastic while calculating percentages, mean, 2x2 tables etc. And the graphs...quick and easy.
So R is the replacement for Excel. But how about mapping? I played around with R and found some nice easter eggs. There are many examples about how to get your code ready to map your data. Try for example: https://rpubs.com/nickbearman/r-google-map-making and this one: http://prabhasp.com/wp/how-to-make-choropleths-in-r/
Here is some data used from an exercise with Refine; simply putting some markers on a Google map.
A bit more complicated are polygon maps. Here is one about high incomes in Dutch municipalities.
Could R become my Swiss army knife for data journalism?



 

Geen opmerkingen:

Een reactie plaatsen

Opmerking: alleen leden van deze blog kunnen een reactie plaatsen.