tmap R package

R has been my environment of choice for plotting spatial data for some time now and this great piece of software got even better with the tmap package.

It easily allow to plot maps such as :

Screenshot from 2015-11-06 12:38:55

You plot using the function `qtm` and can easily customize the map by providing options to intuitively named subroutines such as tm_fill.

I specially love the different algorithms proposed to choose the classes for the legend, quantiles, k-means … You can simply plot the above with:


library("tmap")
data(World)
qtm(World,fill="pop_est_dens",fill.style="quantile",
fill.palette="Blues")

where fill simply is the name of the field in the data frame, fill.style is the algorithm used to make the classes of colors and fill.palette the name of the pallette that can be checked up using :

RColorBrewer::display.brewer.all()

Check up the help for tm_fill to understand the fill.xxx parameters!

Two thumbs up for tmap!!!

Comments are closed.