myGithub.

A Madrid map

mad_map1 <- get_map(getbb("Madrid"), maptype = "toner-background", source="stamen", messaging = TRUE)
## 12 tiles required.
## Source : http://tile.stamen.com/terrain/11/1001/770.png
## Source : http://tile.stamen.com/terrain/11/1002/770.png
## Source : http://tile.stamen.com/terrain/11/1003/770.png
## Source : http://tile.stamen.com/terrain/11/1001/771.png
## Source : http://tile.stamen.com/terrain/11/1002/771.png
## Source : http://tile.stamen.com/terrain/11/1003/771.png
## Source : http://tile.stamen.com/terrain/11/1001/772.png
## Source : http://tile.stamen.com/terrain/11/1002/772.png
## Source : http://tile.stamen.com/terrain/11/1003/772.png
## Source : http://tile.stamen.com/terrain/11/1001/773.png
## Source : http://tile.stamen.com/terrain/11/1002/773.png
## Source : http://tile.stamen.com/terrain/11/1003/773.png
#final map
ggmap(mad_map1)

A Rio de Janeiro map

mad_map2 <- get_map(getbb("rio de janeiro"), maptype = "terrain", source="stamen", messaging = TRUE)
## 20 tiles required.
## Source : http://tile.stamen.com/terrain/11/774/1156.png
## Source : http://tile.stamen.com/terrain/11/775/1156.png
## Source : http://tile.stamen.com/terrain/11/776/1156.png
## Source : http://tile.stamen.com/terrain/11/777/1156.png
## Source : http://tile.stamen.com/terrain/11/778/1156.png
## Source : http://tile.stamen.com/terrain/11/774/1157.png
## Source : http://tile.stamen.com/terrain/11/775/1157.png
## Source : http://tile.stamen.com/terrain/11/776/1157.png
## Source : http://tile.stamen.com/terrain/11/777/1157.png
## Source : http://tile.stamen.com/terrain/11/778/1157.png
## Source : http://tile.stamen.com/terrain/11/774/1158.png
## Source : http://tile.stamen.com/terrain/11/775/1158.png
## Source : http://tile.stamen.com/terrain/11/776/1158.png
## Source : http://tile.stamen.com/terrain/11/777/1158.png
## Source : http://tile.stamen.com/terrain/11/778/1158.png
## Source : http://tile.stamen.com/terrain/11/774/1159.png
## Source : http://tile.stamen.com/terrain/11/775/1159.png
## Source : http://tile.stamen.com/terrain/11/776/1159.png
## Source : http://tile.stamen.com/terrain/11/777/1159.png
## Source : http://tile.stamen.com/terrain/11/778/1159.png
#final map
ggmap(mad_map2)

A Caracas map

mad_map3 <- get_map(getbb("caracas"), maptype = "terrain", source="stamen", messaging = TRUE)
## 8 tiles required.
## Source : http://tile.stamen.com/terrain/11/641/963.png
## Source : http://tile.stamen.com/terrain/11/642/963.png
## Source : http://tile.stamen.com/terrain/11/643/963.png
## Source : http://tile.stamen.com/terrain/11/644/963.png
## Source : http://tile.stamen.com/terrain/11/641/964.png
## Source : http://tile.stamen.com/terrain/11/642/964.png
## Source : http://tile.stamen.com/terrain/11/643/964.png
## Source : http://tile.stamen.com/terrain/11/644/964.png
#final map
ggmap(mad_map3)

A London map

mad_map4 <- get_map(getbb("london"), maptype = "terrain", source="stamen", messaging =TRUE)
## 9 tiles required.
## Source : http://tile.stamen.com/terrain/10/510/339.png
## Source : http://tile.stamen.com/terrain/10/511/339.png
## Source : http://tile.stamen.com/terrain/10/512/339.png
## Source : http://tile.stamen.com/terrain/10/510/340.png
## Source : http://tile.stamen.com/terrain/10/511/340.png
## Source : http://tile.stamen.com/terrain/10/512/340.png
## Source : http://tile.stamen.com/terrain/10/510/341.png
## Source : http://tile.stamen.com/terrain/10/511/341.png
## Source : http://tile.stamen.com/terrain/10/512/341.png
#final map
ggmap(mad_map4)

A Paris map

mad_map5 <- get_map(getbb("paris"), maptype = "terrain", source="stamen", messaging = TRUE)
## 28 tiles required.
## Source : http://tile.stamen.com/terrain/13/4146/2816.png
## Source : http://tile.stamen.com/terrain/13/4147/2816.png
## Source : http://tile.stamen.com/terrain/13/4148/2816.png
## Source : http://tile.stamen.com/terrain/13/4149/2816.png
## Source : http://tile.stamen.com/terrain/13/4150/2816.png
## Source : http://tile.stamen.com/terrain/13/4151/2816.png
## Source : http://tile.stamen.com/terrain/13/4152/2816.png
## Source : http://tile.stamen.com/terrain/13/4146/2817.png
## Source : http://tile.stamen.com/terrain/13/4147/2817.png
## Source : http://tile.stamen.com/terrain/13/4148/2817.png
## Source : http://tile.stamen.com/terrain/13/4149/2817.png
## Source : http://tile.stamen.com/terrain/13/4150/2817.png
## Source : http://tile.stamen.com/terrain/13/4151/2817.png
## Source : http://tile.stamen.com/terrain/13/4152/2817.png
## Source : http://tile.stamen.com/terrain/13/4146/2818.png
## Source : http://tile.stamen.com/terrain/13/4147/2818.png
## Source : http://tile.stamen.com/terrain/13/4148/2818.png
## Source : http://tile.stamen.com/terrain/13/4149/2818.png
## Source : http://tile.stamen.com/terrain/13/4150/2818.png
## Source : http://tile.stamen.com/terrain/13/4151/2818.png
## Source : http://tile.stamen.com/terrain/13/4152/2818.png
## Source : http://tile.stamen.com/terrain/13/4146/2819.png
## Source : http://tile.stamen.com/terrain/13/4147/2819.png
## Source : http://tile.stamen.com/terrain/13/4148/2819.png
## Source : http://tile.stamen.com/terrain/13/4149/2819.png
## Source : http://tile.stamen.com/terrain/13/4150/2819.png
## Source : http://tile.stamen.com/terrain/13/4151/2819.png
## Source : http://tile.stamen.com/terrain/13/4152/2819.png
#final map
ggmap(mad_map5)

A Boston map

mad_map6 <- get_map(getbb("boston"), maptype = "terrain", source="stamen", messaging = TRUE)
## 20 tiles required.
## Source : http://tile.stamen.com/terrain/12/1238/1514.png
## Source : http://tile.stamen.com/terrain/12/1239/1514.png
## Source : http://tile.stamen.com/terrain/12/1240/1514.png
## Source : http://tile.stamen.com/terrain/12/1241/1514.png
## Source : http://tile.stamen.com/terrain/12/1242/1514.png
## Source : http://tile.stamen.com/terrain/12/1238/1515.png
## Source : http://tile.stamen.com/terrain/12/1239/1515.png
## Source : http://tile.stamen.com/terrain/12/1240/1515.png
## Source : http://tile.stamen.com/terrain/12/1241/1515.png
## Source : http://tile.stamen.com/terrain/12/1242/1515.png
## Source : http://tile.stamen.com/terrain/12/1238/1516.png
## Source : http://tile.stamen.com/terrain/12/1239/1516.png
## Source : http://tile.stamen.com/terrain/12/1240/1516.png
## Source : http://tile.stamen.com/terrain/12/1241/1516.png
## Source : http://tile.stamen.com/terrain/12/1242/1516.png
## Source : http://tile.stamen.com/terrain/12/1238/1517.png
## Source : http://tile.stamen.com/terrain/12/1239/1517.png
## Source : http://tile.stamen.com/terrain/12/1240/1517.png
## Source : http://tile.stamen.com/terrain/12/1241/1517.png
## Source : http://tile.stamen.com/terrain/12/1242/1517.png
#final map
ggmap(mad_map6)

A Buenos Aires map

bbox_caba <- getbb("Buenos Aires, Argentina")
mapa_caba <- get_stamenmap(bbox=bbox_caba, zoom=12)
## Source : http://tile.stamen.com/terrain/12/1382/2467.png
## Source : http://tile.stamen.com/terrain/12/1383/2467.png
## Source : http://tile.stamen.com/terrain/12/1384/2467.png
## Source : http://tile.stamen.com/terrain/12/1382/2468.png
## Source : http://tile.stamen.com/terrain/12/1383/2468.png
## Source : http://tile.stamen.com/terrain/12/1384/2468.png
## Source : http://tile.stamen.com/terrain/12/1382/2469.png
## Source : http://tile.stamen.com/terrain/12/1383/2469.png
## Source : http://tile.stamen.com/terrain/12/1384/2469.png
ggmap(mapa_caba)

A map of Venezuela

m <- c(-73.367039,0.6475291,-59.805666,12.6886)
mad_map7 <- get_map(m, maptype = "toner-background",source = "stamen", messaging = TRUE)
## 12 tiles required.
## Source : http://tile.stamen.com/terrain/6/18/29.png
## Source : http://tile.stamen.com/terrain/6/19/29.png
## Source : http://tile.stamen.com/terrain/6/20/29.png
## Source : http://tile.stamen.com/terrain/6/21/29.png
## Source : http://tile.stamen.com/terrain/6/18/30.png
## Source : http://tile.stamen.com/terrain/6/19/30.png
## Source : http://tile.stamen.com/terrain/6/20/30.png
## Source : http://tile.stamen.com/terrain/6/21/30.png
## Source : http://tile.stamen.com/terrain/6/18/31.png
## Source : http://tile.stamen.com/terrain/6/19/31.png
## Source : http://tile.stamen.com/terrain/6/20/31.png
## Source : http://tile.stamen.com/terrain/6/21/31.png
ggmap(mad_map7)

Thanks.

installed.packages()[names(sessionInfo()$otherPkgs), "Version"]
##     ggmap        sf   forcats   stringr     dplyr     purrr     readr     tidyr 
##   "3.0.0"   "1.0-8"   "0.5.1"   "1.4.0"   "1.0.9"   "0.3.4"   "2.1.2"   "1.2.0" 
##    tibble   ggplot2 tidyverse   osmdata 
##   "3.1.8"   "3.3.6"   "1.3.2"  "0.1.10"

Ernesto Ibáñez Twitter @eeibanez