Ariel,

Are you wanting to map the density of the raingauges, or are you wanting to 
interpolate the values of the rain at the rain gauges? KernSmooth will do the 
former.

In either case, you might want to look at the R package ggplot2, which includes 
density-plotting mechanisms. Say you have your rain gauge lat's and lon's in a 
data frame, raindata. You could plot the density of the gauges and overlay the 
gauge locations with something like:

    ggplot (raindata, aes(x=lon, y=lat)) + geom_density2d () + geom_point () 

If you want to plot the density of the rain instead:

        ggplot (raindata, aes(x=lon, y=lat, z=rainamount)) + stat_contour 
(geom="polygon", aes(fill=..level..)) + geom_point () 

And if you want to overlay either of these on a Google (or OpenStreetMap) map 
background, look into the ggmap package, which makes it easy.

   Wayne

On Jul 4, 2013, at 11:32 AM, Ariel Fuentesdi <[email protected]> wrote:

> Hello,
> 
> I have raingauges as points and I want to make an heatmap with those
> points. So, I understand I need to do a kernel density estimation, but,
> there are different kernel functions. Thus, my questions is: how do I know
> which kernel function I need to apply to my data? Do I need to run a
> previous test first?
> 
> I believe I can select the function using grass, but how can I do it with
> R? Do I have to use the KernSmooth package? How Can I map that ?
> 
> Regards,
> Ariel
> 
>       [[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-Geo mailing list
> [email protected]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to