The maps library for R is a powerful tool for creating maps of countries and regions of the world. For example, you can create a map of the USA and its states in just three lines of code:
library(maps)
map("state", interior = FALSE)
map("state", boundary = FALSE, col="gray", add = TRUE)
The coordinate system of the graph is latitude and longitude, so it's easy to overlay other spatial data on this map.
Unfortunately, the data for the maps library isn't sufficient for some applications. The maps themselves are fairly low-resolution (although higher-resolution data is available in the mapdata package), and political boundaries can be incomplete or out-of-date. Luckily, there are now free online resources where you can find updated map data for use with R.
GADM is a spatial database of the location of the world's administrative boundaries, and as Claudia Engel discovered the map information is available as native R objects that can be plotted directly with the spplot function (from the sp package). For example, here's how to load the data for Switzerland, and then plot each canton with a color denoting its primary language:
library(sp)
con <- url("http://gadm.org/data/rda/CHE_adm1.RData")
print(load(con))
close(con)
language <- c("german", "german", "german","german",
"german","german","french", "french",
"german","german","french", "french",
"german", "french","german","german",
"german","german","german", "german",
"german","italian","german","french",
"french","german","german")
gadm$language <- as.factor(language)
col = rainbow(length(levels(gadm$language)))
spplot(gadm, "language", col.regions=col, main="Swiss Language Regions")
AnthroSpace: Download Global Administrative Areas as RData files

Are there any maps of Russia?
Posted by: simulyant | October 21, 2009 at 06:43
Sweet indeed :o) thank you for a really useful post
Posted by: Amy | October 21, 2009 at 10:21
And, Hadley has good mapping support in ggplot2. See http://sites.google.com/site/acommarketinganalytics/
Posted by: Jim Porzak | October 21, 2009 at 11:34
Thanks for the pointer to this data, David. It's going to save me a ton of time in the future! It's just unfortunate that their licenses are rather restrictive (no commercial use).
Posted by: Hadley | October 21, 2009 at 12:01
It's nice to have maps with administrative boundaries for non-US countries. Thanks for this!
Posted by: Jay | November 02, 2009 at 08:25
Hi,
i am trying to handle my country map (italy) but I didn't found any information about "internal" vars like example's language.
Hints? Tools? functions? Let's me know, please.
Posted by: Daniele | November 17, 2009 at 07:45
@Daniele: you have to add those variables (for example, with a vector as above), they're not 'internal' :-)
You can find useful data for Italy (for example about unemployement) on www.istat.it
Posted by: Marcoscan | November 17, 2009 at 23:23
@Daniele: I have written a post about it, maybe you'll find it useful :-) http://bit.ly/3tz6AU
Posted by: Marcoscan | November 18, 2009 at 10:57
Do you know how to get a map of Venezuela by states?
Posted by: Mary | December 11, 2009 at 03:03