library(ggplot2)
events <- data.frame(
county = c("Mecklenburg", "Carteret", "Moore", "Caldwell"),
proportion_A = c(0.1, 0.8, 0.0, 0.6)
)
ggplot(events, aes(location = county)) +
geom_sf(aes(fill = proportion_A), stat = "automap")
ggplot(events, aes(location = county)) +
stat_automap(aes(fill = proportion_A)) +
coord_automap(feature_type = "sf.nc")
Run the code above in your browser using DataLab