tags:

views:

79

answers:

2

Hi All,

Lately I have seen some cool examples of mapping in R and wanted to give this a shot. I currently have ArcView at work, but my spatial join is not working correctly (most likely user error).

Objective: I need a list of countries and what World Region they belong to. I have two layers (one country detail, the other region detail) and wanted to join the world region assignment onto each country. The join isn't working, so i figured I would come to the R community.

What are my options? This is my first attempt at doing any mapping in R and maybe there is an easier/better solution. Eventually I want to take lat/long data and map it as well.

Any insight will be much appreciated.

Brock

+4  A: 

See the Spatial task view on CRAN, and packages like maps/mapdata, sp, rgdal, raster, blighty, rworldmap, RgoogleMaps, etc.

Do you have shapefiles you want to read? First get rgdal installed, or look at other options like maptools and shapefiles if that is difficult on your platform. Read functions in these packages will provide Spatial*DataFrame objects.

For information on the Spatial classes:

library(sp)
vignette("sp")

spatstat also has a lot of support for spatial data, and another vignette for converting to / from sp:

library(spatstat)
vignette("shapefiles")
mdsumner
+1  A: 

The PBSmapping package is another good place to start. They have pretty extensive documentation and a great reference manual as well.

Stedy