🗺️ Add quick leaflet basemaps
To install basemap
from Github:
# First install the 'remotes' package
library(remotes)
# Install the basemap package from GitHub
remotes::install_github("tidy-MN/basemap")
library(leaflet)
library(basemap)
Now you can use %>% add_basemaps()
in your leaflet pipeline.
leaflet(ozone_aqi) %>%
addCircleMarkers(fillColor = ~aqi_color,
color = 'gray',
fillOpacity = 0.8) %>%
add_basemap()
leaflet(ozone_aqi) %>%
addCircleMarkers(fillColor = ~aqi_color,
color = 'gray',
fillOpacity = 0.8) %>%
add_basemap(dark = TRUE)
leaflet(ozone_aqi) %>%
addCircleMarkers(fillColor = ~aqi_color,
color = 'gray',
fillOpacity = 0.8) %>%
add_basemap(layers = TRUE)