Skip to content

Instantly share code, notes, and snippets.

@ajschumacher
Last active August 29, 2015 13:58
Show Gist options
  • Save ajschumacher/10312842 to your computer and use it in GitHub Desktop.
Save ajschumacher/10312842 to your computer and use it in GitHub Desktop.
figuring out state key names, or other problem
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")
@ramnathv
Copy link

Yes. You do need topojson for US states. Let me know if you are able to get it working or hit another bottleneck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment