Our intermediate datasets go into a directory with a given format. We write these files into an 'aligned' subdirectory of the local directory. The name is (grid, resolution, source), in that order. That way they are near each other when you 'dir()'. This also ensures the name of the layer matches the source name.
1 | write_aligned_raster(layer, layer_id, local_directory = "inst/extdata")
|
layer |
is the RasterLayer to write. |
layer_id |
is a list describing the layer with (source = (HRSL, BIMEP, LandScan, WorldPop), grid = (HRSL, LandScan, Worldpop)) and resolution = (100, 1000). |
local_directory |
is where we put the data. This data will be written to a subdirectory of that. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.