# NOT RUN {
df <- data.frame(
lat = 42.9634 + stats::rnorm(100),
lng = -85.6681 + stats::rnorm(100),
size = runif(100, 5, 20),
color = sample(colors(), 100)
)
addJS <-
pluginFactory(
"Some JS Plugin",
system.file("js", "", package = "leaflethex"), "hexbin.js", "deps.js", stylesheet="hexbin.css")
leaflet(df, width = 600, height = 300) %>%
addTiles() %>%
addJS(radius = 20, highEndColor = "yellow")
# }
Run the code above in your browser using DataLab