This is a sample leaflet project showing the office locations of Facebook, Google and Apple.
library(dplyr)
library(leaflet)
SFLatLong <- data.frame(
lat = c(37.4222043, 37.4847086, 37.33182),
lng = c(-122.0836266, -122.1477459, -122.03118)
)
company_link <- c(
"<a href='https://www.facebook.com/'>Facebook</a>",
"<a href='https://abc.xyz/'>Alphabet Inc.</a>",
"<a href='https://www.apple.com/'>Apple</a>"
)
SFLatLong %>%
leaflet() %>%
addTiles() %>%
addCircleMarkers(color = c("red", "blue", "green"), popupOptions = company_link ) %>%
addLegend(labels = c("Facebook HQ", "Google HQ", "Apple HQ"), colors = c("blue", "red", "green"))