When creating a choropleth map of an sf object with ggplot2, the default color gradient assigns the darker color to the smaller number:
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
ggplot(nc) +
geom_sf(aes(fill = AREA))
I'd like to reverse that so the darker color is assigned to the larger number. I thought this should work but it doesn't:
ggplot(nc) +
geom_sf(aes(fill = AREA)) +
scale_colour_gradient(low = "#56B1F7", high = "#132B43")
Any suggestions on what I'm doing wrong? Thanks.