Mapping with R is a real joy. To see some examples, we’ll rely on the maps package.
Mapping the World
Getting the longitude and latitude
First of all, we need to get the long and lat data in order to plot with ggplot2 which provides graphs with more aesthetic. (for an introduction to the ggplot2 package, just click here). To do that, we’ll use the map_data() function which belongs to ggplot2 and put as a parameter the world map provided by the maps package.