library(raster)
library(rgdal)
library(WDI)
library(leaflet)
r <- raster("sample/GlobalS.tif")
pal <- colorNumeric(c("#FFFFCC","#41B6C4","#0C2C84"), values(r),
na.color = "transparent")
leaflet() %>% addTiles() %>%
addRasterImage(r, colors = pal, opacity = 0.8) %>%
addLegend(pal = pal, values = values(r),
title = "Migratory Bird Species Count")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.