I'm having trouble doing something very basic. I've done this hundreds of times with no problem with other maps but I can't get a cshapes shapefile to map properly using ggplot2 (as an example I'm trying to map "AREA" as the fill, which is a variable that comes with the cshapes shapefile). Here is the code I'm using:
library(cshapes)
library(ggplot2)
world <- cshp(date=as.Date("2009-1-1"))
world@data$id <- rownames(world@data)
world.df = fortify(world, region="COWCODE")
world.df <- join(world.df, world@data, by="id")
ggplot() + geom_polygon(data=world.df,
aes(x = long, y = lat, group = group,fill = AREA))
+coord_equal()
What I end up with is the following:, which as you can see is missing data for the eastern hemisphere. Not sure what's going on, any assistance is much appreciated.