raster_coord <- function(r) {
coors = coordinates(r) %>% cbind(., .) %>%
set_colnames(c("x", "y", "lon", "lat")) %>% data.frame()
coordinates(coors) <- ~x+y
gridded(coors) <- TRUE
brick(coors)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.