knitr::opts_chunk$set(echo = TRUE)
library(raster) library(glue) library(here) # TODO: iterate over species sp <- "Pseudanthias_evansi" # get netcdf file url <- glue("http://thredds.d4science.org/thredds/fileServer/public/netcdf/AquaMaps_08_2016/{sp}.nc") nc <- basename(url) download.file(url, nc) # read netcdf into raster r <- raster(nc, varname = "probability") # plot to check ok plot(r)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.