title: Is it possible to overlay a scatterplot on map using ggplot?
body: <p>I would like to draw a map of French departements (ie districts in France) and plot points on the map. I use ggplot2 to draw the map but when I want to add points on the map, R returns an error which says that it cannot find 'group'. </p>
  
  <pre><code>library("ggplot2")
  library("ggmap")
  
  # load the contour of French departements
  wg  &lt;- read.csv("data/departements.csv")
  
  metropoles  &lt;- c("Paris", "Rennes", "Rouen", "Lille", "Marseille")
  geo  &lt;- geocode(metropoles)
  met  &lt;- data.frame(ville = metropoles, geo)
  
  map  &lt;- ggplot(data = wg, aes(x = long, y = lat, group = group)) + 
  geom_polygon() + 
  scale_x_continuous(limits = c(-7,10)) + 
  scale_y_continuous(limits = c(40,53)) + 
  coord_map() + 
  theme(axis.text = element_blank(), axis.title = element_blank()) 
  
  map + geom_point(data = met, aes(x = lon, y = lat))
  </code></pre>
  
  <p>For replication, you can find the raw data <a href="https://gist.githubusercontent.com/blaquans/bd4354916033fa1c496d/raw/departements.csv" rel="nofollow">here</a> and the R program <a href="https://gist.githubusercontent.com/pachevalier/bd4354916033fa1c496d/raw/map.R" rel="nofollow">here</a></p>