For this exercise, we will need to packages: ggplot2 and ggmap

setwd("~/Dropbox/ExplDataAnalysisR/Olivia") #Set your working directory
#install.packages("ggplot2") #to install ggplot2 if you don't have it yet
#install.packages("ggmap") #to install ggmap if you don't have it yet
library(ggplot2) #load the library
## Warning: package 'ggplot2' was built under R version 3.2.3
library(ggmap) #load the library
## Warning: package 'ggmap' was built under R version 3.2.3

Here, we will import a map of Europe from Google Maps

#Get a map of Europe with the right zoom level (an integer from 3 (continent) to 21 (building), default value 10 (city))
europe_map<-get_map(location='Europe', zoom=4)
## Map from URL : http://maps.googleapis.com/maps/api/staticmap?center=Europe&zoom=4&size=640x640&scale=2&maptype=terrain&language=en-EN&sensor=false
## Information from URL : http://maps.googleapis.com/maps/api/geocode/json?address=Europe&sensor=false
#show the map
ggmap(europe_map)