[R] diffusing GIS data in maps

Lawrence D. Brenninkmeyer ldb at outsourcethinking.com
Tue Aug 14 07:47:15 CEST 2007


Hi-

I am trying to find a way to diffuse GIS data on a European map. I have a
dataset consisting of particular locations scattered across Europe,
along with magnitude and value information. I can plot these as discrete
points with something like the following:

"geocode" is a dataframe with four columns: LAT; LONG; MAGNITUDE;VALUE.

library(maps)
library(mapdata)
map("worldHires", regions=c("Germany", "Belgium", "Netherlands"))
points(geocode$LONG, geocode$LAT, cex=geocode$MAGNITUDE / 2500,
col=rainbow(length(geocode$VALUE), start=0, end=.4)[rank(geocode$VALUE)])

This gives me a map of Europe with my datapoints highlighted in two ways:
magnitude is represented by the size of the point, and value is
represented by the color.

However, what I would really like is for there to be some sort of
diffusion, such that instead of discrete points, the European map is
covered in color so I can see more clearly whether there are regional
patterns (something that will presumably look like this contour chart:
<http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=20>  only
on the European map).

I have absolutely no idea where to start because I can't find a function
that will allow me to diffuse the datapoints on a map.

thank you for any help
ldb



More information about the R-help mailing list