On Thu, Feb 27, 2014 at 8:23 AM, william claster <wclaster@apu.ac.jp> wrote:

> Alex,
> Thanks. IDW meaning inverse distance weighting I suppose. Is there some
> package though that does all this for us?
>

 "gstat" or for really easy use "automap".

But, two things.

Firstly, I think we should stop calling interpolated maps of some quantity
'heat maps'. I think the word 'heat map' derived from mapping 'hotspots' of
activity, ie places where lots of things happened (accidents, crimes etc).
A map with a lot of points can show the hotspots but if you have a lot of
points you can't tell how dense the points are when they are all
overplotting. So people started using density estimation and called it a
'heat map'. However a smooth map of pollution over a city isn't a heatmap
since its not trying to show where point events occur. Its just a map.

 Secondly, and this is the biggie. "gstat". See that word "stat" in there?
Statistics. Probability. Distributions. Uncertainty. Suppose the pollution
here is 3ppm and 1km away is  5ppm. So is the pollution half way between
those points 4ppm? Might it be 3.5ppm or 4.5ppm? It can't be less than
0ppm. IDW gives you a crude spatial average but no idea of the uncertainty.
Kriging does both - gives you a predicted value and an uncertainty but if
you plug small integers into a kriging function without realising that the
underlying model is continuous on (-Inf,Inf) then you'll be wondering why
you have a prediction uncertainty of -5ppm to +15ppm.

 Do you just want a crude interpolated map for display purpose? Then you
can use IDW and that's probably okay. If you want to ask questions about
your map, like, which areas are 95% likely to be over 100ppm pollution,
then you need a statistical model and something like kriging, and if your
data are small counts, or proportions, then you need to go beyond Gaussian
kriging (which might just mean transforming your variable and being careful
how you back-transform).

 This'll turn into a full lecture shortly....

Barry

	[[alternative HTML version deleted]]

