I am trying to add a circle around a given latitude and longitude point where the circle size (radius) reflects distance in miles or km.
I managed to come up with this example using ggmap, where I can add a circle. but what do I need to do to have it represent distance. I would ultimately like the bounds of the circle to represent 20 miles from the center.
Code below:
library(ggmap)
library(ggplot2)
d <- data.frame(lat=c(33.79245),
lon=c(-84.32130))
emory <- get_map("Atlanta,Georgia", zoom=12)
p <- ggmap(emory)
p <- p + geom_point(data=d, aes(x=lon, y=lat),
color="red", size=20, alpha=0.5)
p
No comments:
Post a Comment