Last active
August 29, 2015 13:58
-
-
Save ajschumacher/10312842 to your computer and use it in GitHub Desktop.
figuring out state key names, or other problem
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
test <- data.frame(state=c("Florida", "Virginia", "Texas", "California", | |
"Georgia", "North Carolina", "New York", | |
"Missouri", "Illinois", "Maryland", "Pennsylvania", | |
"Tennessee", "Colorado", "Washington", "Arizona", | |
"Ohio", "Wisconsin", "District of Columbia", | |
"Michigan", "New Jersey", "Utah", "Louisiana", | |
"Minnesota", "Alabama", "Kansas", "Massachusetts", | |
"Indiana", "South Carolina", "Arkansas", "Oregon", | |
"Nevada", "Kentucky", "Nebraska", "(not set)", | |
"Connecticut", "New Mexico", "Oklahoma", | |
"West Virginia", "Iowa", "Hawaii", "Rhode Island", | |
"Mississippi", "Maine", "New Hampshire", "Delaware", | |
"Alaska", "Idaho", "North Dakota", "Vermont", | |
"Montana", "South Dakota", "Wyoming"), | |
value1=rnorm(52), | |
value2=rnorm(52)) | |
library(rMaps) | |
crosslet(x="state", | |
y=c("value1", "value2"), | |
data=test, | |
map="us") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes. You do need topojson for US states. Let me know if you are able to get it working or hit another bottleneck.