I want to render a dataframe with R and the ggmap package.
DF:
| lon | lat |
|-----------|-----------|
| 6.585863 | 51.09021 |
| 8.682.127 | 50.11092 |
| 7.460.367 | 5.152.755 |
I created a map with
mapImageData <- get_googlemap(
+ "Germany",
+ zoom=15
+ )
And then I wanted to add geocodes:
ggmap(mapImageData) +
+ geom_point(aes(x=lon, y=lat), data=df, colour="red", size=5)
But I get the error:
Error: geom_point requires the following missing aesthetic properties: x, y
What am I doing wrong?
source
share