I am trying to create a basic heat map of the below. I keep getting this error:
********Error in match.arg(regions) : 'arg' must be NULL or a character vector********
This some of the work I've done to get an output. At best I have got a blank template of full us map and at worst, I completely crash RStudio:
summ$state <- as.character(summ$state)
summ$N <- as.character(summ$N)
summ$state <- fips(summ$state)
summ <- na.omit(summ)
data.frame(unclass(summary(summ)), check.names = FALSE, stringsAsFactors = FALSE)
plot_usmap(regions = "state", data = summ, values = "N", labels = FALSE, color = "red") +
scale_fill_continuous(name = "Deliveries", label = scales::comma) +
theme(legend.position = "right")
plot_usmap(data = summ, values = "N", include = c("state", "Month"))