library(raadtools) ## requires significant back-end set up 
## Loading required package: raster
## Loading required package: sp
n_ice <- readice(latest = TRUE, hemisphere = "north")
s_ice <- readice(latest = TRUE, hemisphere = "south")
sst <- readsst(getZ(n_ice))
## Loading required namespace: ncdf4
print(getZ(n_ice))
## [1] "2017-05-18 GMT"
print(getZ(s_ice))
## [1] "2017-05-18 GMT"
library(leaflet)
library(leaflet.extras)

## make sure we are a single RasterLayer (not a stack with one layer)
n_ice <- n_ice[[1]]
s_ice <- s_ice[[1]]

leaflet() %>% 
  addTiles() %>% 
  addPolylines(data = rasterToContour(sst), weight = 1, color = "#000") %>% 
  addRasterImage(x = n_ice) %>% 
  addRasterImage(x = s_ice) %>% 
  addFullscreenControl(pseudoFullscreen = TRUE)