Description Usage Format Source See Also Examples
a raster
object storing the majority landcover in 2019 for all 20km squares in Africa.
Categorical, 20km resolution from MODIS.
Cell values are numeric, landcover type names are stored in Raster Attribute Table (RAT) that can be accessed via levels(afrilandcover)
See data-raw/afrilearndata-creation.R for how the data object is created.
1 |
Formal class 'raster';
Geographical coordinates WGS84 datum (CRS EPSG 4326)
https://lpdaac.usgs.gov/products/mcd12c1v006/
Friedl, M., D. Sulla-Menashe. MCD12C1 MODIS/Terra+Aqua Land Cover Type Yearly L3 Global 0.05Deg CMG V006. 2015, distributed by NASA EOSDIS Land Processes DAAC, https://doi.org/10.5067/MODIS/MCD12C1.006. Accessed 2021-06-07.#'
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | if (requireNamespace("raster", quietly = TRUE)) {
library(raster)
data(afrilandcover)
# or
filename <- system.file("extdata","afrilandcover.grd", package="afrilearndata", mustWork=TRUE)
afrilandcover <- raster::raster(filename)
plot(afrilandcover)
}
# interactive plotting with mapview
if (requireNamespace("mapview", quietly = TRUE) &
requireNamespace("rgdal", quietly = TRUE)) {
library(mapview)
mapview(afrilandcover,
att="landcover",
col.regions=levels(afrilandcover)[[1]]$colour)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.