haotu : an open lab notebook


Make Global Maps in R

Filed under: Uncategorized — Tags: , , , , — S @ 09:44

There is a nice R package for plotting global maps. The package uses UN and ISO3 ids.


The article and tutorial is here: http://journal.r-project.org/archive/2011-1/RJournal_2011-1_South.pdf



#joins the data to a global map
sPDF <- joinCountryData2Map( x , joinCode = "ISO3" , nameJoinColumn = "country")
#plots the map
mapCountryData(sPDF,nameColumnToPlot="dat",mapTitle="North America Example")

Here is an example of an image I created with this package on FAO plant production data

Create a free website or blog at WordPress.com.