[R-sig-Geo] spatial clusters
Georg Ruß
research at georgruss.de
Thu Dec 16 09:41:55 CET 2010
On 16/12/10 09:06:33, dorina.lazar wrote:
> How to create a shapefile including my data about some socio-demographic
> indicators (7), for about 30 countries around the world (to be read with
> readShapePoly)?
Hi Dorina,
I'm not quite sure what you have and what you want.
I assume that you'd like to create a shapefile such that for every country
(which is represented as a polygon) there's a vector of seven attributes
attached to it:
country1: attr1 attr2 attr3 attr4 attr5 attr6 attr7
country2: attr1 attr2 attr3 attr4 attr5 attr6 attr7
...
Do you have your countries as spatial polygons in R (SpatialPolygons-
DataFrame or similar)? If yes, you should be able to add your socio-demo-
graphic indicators to this data frame (just as in normal data frames). In
this way you'd join the data you have inside R.
If you have the shapefile for the countries available and would like to
edit this directly to add the indicators, I'd suggest using a GIS like
GRASS http://grass.fbk.eu/ Afterwards, this can be easily read into R.
> Would be useful to suggest some good introductory lectures in spatial
> statistics (links or books).
I think the following is what Roger would suggest:
author = {Bivand, Roger S. and Pebesma, Edzer J. and Gómez-Rubio, Virgilio},
title = {Applied Spatial Data Analysis with R},
series = {Use R},
publisher = {Springer},
http://www.asdar-book.org/
http://www.springerlink.com/content/uw07v1/
(Depending on your login/institute you may have fulltext access, but the
book is definitely worth buying anyway.)
Regards,
Georg.
--
Research Assistant
Otto-von-Guericke-Universität Magdeburg
research at georgruss.de
http://research.georgruss.de
More information about the R-sig-Geo
mailing list