Created
November 13, 2009 03:03
-
-
Save jlowin/233555 to your computer and use it in GitHub Desktop.
choropleth maps code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(maps) | |
#align data with map definitions | |
mapnames <- map("county",plot=FALSE)[4]$names | |
colorsmatched <- unemp_data$colorBuckets [match(mapnames ,unemp_data$counties)] | |
#draw map | |
map("county",col = colors[unemp_data$colorBuckets[match(mapnames ,unemp_data$counties)]],fill = TRUE,resolution = 0,lty = 0,projection = "polyconic") | |
map("state",col = "white",fill=FALSE,add=TRUE,lty=1,lwd=1,projection="polyconic") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment