Aman
Aman

Reputation: 11

Is there anyway to set the counties' border line colors in county_choropleth? Or any other alternative way?

My data includes FIPS code, County Name, and Population size. Using the choroplethr package, my current code is

county_choropleth(Countydata,  legend = "Population",county_zoom =TennCounties)

Is there anyway to set the counties' border line colors in county_choropleth? Or any other alternative way?

Upvotes: 1

Views: 92

Answers (1)

mkelley
mkelley

Reputation: 107

Not sure if this question is still needed answered but I overlayed the county borders to my choropleth map by saving the choropleth to a DF then adding my county map.

I used:

name_of_choropleth_df + geom_polygon(data=df_counties, 
                                     aes(x=long, y=lat, group=group), 
                                     alpha=0, color="black", size=0.2)

My df_counties came from the US Census Bureau website and I modified it to only include specific counties. Alpha, color, and size can be whatever you want.

Upvotes: 1

Related Questions