library(leaflet)
library(magrittr)
The map below shows the location of Starbucks shops in the US in 2012.
# 2012 Starbucks locations
# data source: https://github.com/libjohn/mapping-with-R/blob/master/data/All_Starbucks_Locations_in_the_US_-_Map.csv
starbucks <- readr::read_csv("https://raw.githubusercontent.com/libjohn/mapping-with-R/master/data/All_Starbucks_Locations_in_the_US_-_Map.csv",
show_col_types = FALSE)
starbucks %>%
leaflet() %>%
addTiles() %>% # Add default OpenStreetMap map tiles
addMarkers(~Longitude, ~Latitude,
clusterOptions = markerClusterOptions()
)