I am using the usmap package in R to create a heat map of the United States. My data are at the county/fips level. I have successfully rendered them into a map but would like to remove the county boarders and leave in the state boarders. Does anybody know how to do this?
Data: Download
Code:
mapdata <- read.csv("File location here",header = T)
yr <- 2008
yrstr <- toString(yr)
# Subset to relevant year and variables
yrdata <- subset(mapdata, year == yr)
yrdata1 <- yrdata[,c("fips_code","eligibles")]
colnames(yrdata1)[1] <- "fips"
plot_usmap("states", data = yrdata1, value = "eligibles", color = "white", size = 0) +
scale_fill_continuous(low = "blue", high = "red", name = paste0("Medicare Eligible Population (",yrstr,")"), label = scales::comma) +
theme(legend.position = "right")