This is a helper function to load one of two types of raster data for the Baltimore area. Both are land cover data from the National Land Cover Database (NLCD) obtained with ROpenSci's FedData
package. The "canopy" data is the percentage of each pixel that is covered by tree canopy, for vegetation-related land cover types. The "impervious" data is the percentage of each pixel that is considered an impervious surface, for urban developed land cover types. Both files originally were downloaded as 30m x 30m rasters with values ranging from 1 to 255 and NA
at pixels of other land cover types. Both were then downsampled to 90m x 90m, scaled to percentages, and NA
values were replaced with 0.
Usage
load_land_cover(type = c("canopy", "impervious"))
Value
A raster of class terra::SpatRaster
with 1 band.
Examples
canopy <- load_land_cover("canopy")
canopy
#> class : SpatRaster
#> dimensions : 1393, 1051, 1 (nrow, ncol, nlyr)
#> resolution : 90, 90 (x, y)
#> extent : 1587765, 1682355, 1902705, 2028075 (xmin, xmax, ymin, ymax)
#> coord. ref. : NAD83 / Conus Albers (EPSG:5070)
#> source(s) : memory
#> varname : canopy
#> name : balt_NLCD_Tree_Canopy_2021
#> min value : 0.01
#> max value : 1.00
if (FALSE) { # \dontrun{
if (interactive()) {
terra::plot(canopy)
}
} # }