if (FALSE) {
library(mapboxgl)
map <- mapboxgl(
center = c(-96, 37.8),
zoom = 3
)
map %>% add_categorical_legend(
legend_title = "Population",
values = c("Low", "Medium", "High"),
colors = c("#FED976", "#FEB24C", "#FD8D3C"),
circular_patches = TRUE,
sizes = c(10, 15, 20)
)
}
Run the code above in your browser using DataLab