FedData (version 2.5.6)

pal_nlcd: NLCD colour map palettes

Description

NLCD colour map palettes

Usage

pal_nlcd()

Arguments

Value

A data frame with official class descriptions and hexencoded rgb(a) colour values

References

https://www.mrlc.gov/data/legends/national-land-cover-database-2011-nlcd2011-legend

Examples

Run this code
# NOT RUN {
# Extract data for the Village Ecodynamics Project 'VEPIIN' study area:
# http://village.anth.wsu.edu
vepPolygon <- polygon_from_extent(raster::extent(672800,740000,4102000,4170000), 
     proj4string='+proj=utm +datum=NAD83 +zone=12')

NLCD <- get_nlcd(template=vepPolygon, label='VEPIIN')
NLCD <- as.matrix(table(raster::values(NLCD)))
cols <- dplyr::filter(pal_nlcd(), code %in% row.names(NLCD))
par(xpd = TRUE, mar = c(10, 3, 2, 1))
barplot(NLCD, beside = FALSE, col = cols$color) 
legend("bottom", legend = cols$description, fill = cols$color, 
       ncol = 2, inset = c(0, -0.6))
# }

Run the code above in your browser using DataLab