Skip to content
Prev 7295 / 29559 Next

color category SpatialGridDataFrame and rworldmap

Dear Patrick & Renaud,

Categorical maps are one of the issues we have looked at in a new
package 'rworldmap' that we've been developing. Coincidentally I
submitted the first version to Cran for consideration yesterday.

The package and source can currently be downloaded from : 
http://code.google.com/p/rworld/downloads/list

With a SpatialGridDataFrame containing categorical data, default
plotting should be as easy as :

library(rworldmap)
mapGriddedData(sGDF, catMethod='categorical')

#colours can be changed by e.g.
mapGriddedData(sGDF, catMethod='categorical',
colourPalette=c('red','white','blue'))
#or
mapGriddedData(sGDF, catMethod='categorical',
colourPalette=c("#E5F5E0","#A1D99B","#31A354"))

A default legend is added and there are options for modifying it.

The package concentrates on displaying global data, either gridded or
referenced by country. 

I'll be interested to hear any feedback that you or others have,

This builds particularly on the packages sp, maptools and fields, so
thanks go out to all those that have contributed to those packages. 

Happy new year,
Andy

Dr Andy South 
Leader Spatial Information, Fisheries 
Cefas, Pakefield Road, Lowestoft , Suffolk, NR33 0HT, UK 

Tel: +44 (0)1502 524213
Fax: +44 (0)1502 513865 

www.cefas.co.uk 



Message: 1
Date: Thu, 31 Dec 2009 12:07:03 +0100
From: Renaud Lancelot <renaud.lancelot at cirad.fr>
Subject: Re: [R-sig-Geo] color category SpatialGridDataFrame
	SpatialPolygonsDataFrame Corine Land Cover Global Land Cover
2000
To: patrick.giraudoux at univ-fcomte.fr
Cc: r-sig-geo at stat.math.ethz.ch
Message-ID: <4B3C85D7.7050600 at cirad.fr>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Dear Patrick,

I recently met this issue. I finally used image() on the
SpatialGridDataFrame, defining the appropriate colors using the col
argument (?tonnant, non ;-)). I have defined the legend using legend(),
and I used split.screen() to arrange the plots. If you wish, I can send
you the whole stuff (data and code) in a private message (huge
datasets).

Renaud

Patrick Giraudoux a ?crit :
--
Renaud Lancelot
EDEN Project, coordinator
http://www.eden-fp6project.net/
<< EDEN International Conference, Montpellier,  10-12 May 2010 >>
<<   http://international-conference2010.eden-fp6project.net/  >>

UMR CIRAD-INRA "Contr?le des maladies animales exotiques et ?mergentes"
Joint research unit "Control of emerging and exotic animal diseases"

CIRAD, Campus International de Baillarguet TA A-DIR / B
F34398 Montpellier
http://www.cirad.fr  http://bluetongue.cirad.fr/

Tel.  +33 4 67 59 37 17  -  Fax  +33 4 67 59 37 95 Secr. +33 4 67 59 37
37  - Cell. +33 6 77 52 08 69




***********************************************************************************
This email and any attachments are intended for the name...{{dropped:10}}
Message-ID: <04A370231C10664C88B28D1EF74F487901493710@LOWEXPRESS.corp.cefas.co.uk>
In-Reply-To: <mailman.9.1262343603.10993.r-sig-geo@stat.math.ethz.ch>