two packages: cards, ggplot2. There is a great example:? Map_data ()
to start:
tf= structure(list(state = structure(1:14, .Label = c("AK", "AL", "AR", "AZ", "CA", "CO", "CT", "DE", "FL", "GA", "IA", "IL", "IN", "KS"), class = "factor"), num = c(21L, 31L, 12L, 56L, 316L, 53L, 31L, 7L, 335L, 63L, 42L, 73L, 40L, 2L), region = structure(c(2L, 1L, 4L, 3L, 5L, 6L, 7L, 8L, 9L, 10L, 13L, 11L, 12L, 14L), .Label = c("alabama", "alaska", "arizona", "arkansas", "california", "colorado", "connecticut", "delaware", "florida", "georgia", "illinois", "indiana", "iowa", "kansas"), class = "factor")), .Names = c("state", "num", "region" ), class = "data.frame", row.names = c(NA, -14L)) require(maps);require(ggplot2) states <- map_data("state") tfmerged <- merge(states, tf, sort = FALSE, by = "region") tfmerged <- tfmerged[order(tfmerged$order), ] qplot(long, lat, data = tfmerged, group = group, fill = num, geom="polygon")
Then fill in the remaining status information.