gc <- geocode('duncan hall, rice university')
google <- get_googlemap('rice university', zoom = 15)
ggmap(google) +
geom_point(aes(x = lon, y = lat), data = gc, colour = 'red', size = 2)
bbox <- as.numeric(attr(google, 'bb'))[c(2,1,4,3)]
names(bbox) <- c('left','bottom','right','top')
stamen <- get_stamenmap(bbox, zoom = 15)
ggmap(stamen) +
geom_point(aes(x = lon, y = lat), data = gc, colour = 'red', size = 2)
osm <- get_openstreetmap(bbox, scale = OSM_scale_lookup(15))
ggmap(osm) +
geom_point(aes(x = lon, y = lat), data = gc, colour = 'red', size = 2)
ggmap(get_stamenmap(bbox, zoom = 15, maptype = 'watercolor'))+
geom_point(aes(x = lon, y = lat), data = gc, colour = 'red', size = 2)
ggmap(get_stamenmap(bbox, zoom = 15, maptype = 'toner'))+
geom_point(aes(x = lon, y = lat), data = gc, colour = 'red', size = 2)
Run the code above in your browser using DataLab