Created
September 25, 2013 21:21
-
-
Save andybega/6706212 to your computer and use it in GitHub Desktop.
Quick map in R using ggmap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggmap) | |
library(source.gist) | |
# Get data frame with coordinates for points | |
source.gist("6705264") | |
head(egy.points) | |
# Get background map | |
egy.map <- get_map(location=c(lon=30, lat=26), zoom=6, maptype="terrain", filename="~/Desktop/ggmapTemp") | |
p <- ggmap(egy.map) + | |
geom_point(data=egy.points, aes(x=Longitude, y=Latitude), col="red", size=5) | |
# Map it | |
#png("~/Desktop/egy_map.png", width=1024, height=1024) | |
p | |
#dev.off() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment