Map of the United States including Alaska and Hawaii with R

Alaska and Hawaii represented in a typical state-level choropleth map — i.e. below the Southwestern border states. Turns-out it’s not that straightforward to do. After some tinkering…

library(maps)
library(mapdata)
layout(rbind(c(0,2,0,0,0,2),
+            c(1,0,1,3,3,0),
+            c(1,2,1,3,3,2)),
+          heights=c(.8, 0, .3),
+          widths=c(0, 1, 0, 0, 1, 2))
par(mar=rep(0, 4))
par(oma=c(8,rep(0, 3)))
layout.show(3)
map("world2Hires", "USA:Alaska")
par(mar=rep(0, 4))
map("state")
par(mar=rep(0, 4))
map("world2Hires", "Hawaii")

…the result:
us-choropleth
Seems as though the AK and HI portions of the layout cannot overlap the 50 contiguous states without obscuring them. There is also the problem of the difference of scale (and possibly projection) between the boundary datasets used. With more effort on the layout, and some edited boundary data, it does seem possible to create a presentable map of this kind without using non-core graphics packages.

Advertisements
This entry was posted in mapping, packages, R and tagged , , , , . Bookmark the permalink.