SESYNC-ci / vector-analysis-syracuse-lesson

Manipulate vector data.
https://sesync-ci.github.io/vector-analysis-syracuse-lesson/
0 stars 5 forks source link

Look into updating interpolation #10

Open qdread opened 3 years ago

qdread commented 3 years ago

The interpolation section goes straight to kriging which is actually one of the more sophisticated interpolation methods. It could be a little bit confusing for beginners to start with this complex method. You have to grok the variogram to have any idea what is going on with the kriging.

Some of the tutorials I found when googling R geospatial interpolation tutorials have a gentler introduction where you start with simple interpolation methods and work your way up to kriging. Might be better to just use a simpler way for this lesson like areal interpolation?

Tutorials:

Also, the interpolation methods in the lesson still use sp objects. I think by now you can do all this same stuff with sf objects so we might be able to update to no longer have to coerce to SpatialPolygons before doing the interpolation and spatial regression.

qdread commented 3 years ago

Note to self: the variable names used in the interpolation are confusing. pred_ppm is a grid object, then it's overwritten and becomes the output of the kriging. Better to have them have two different names

qdread commented 3 years ago

See testing script on simple-interp-test branch.

Unfortunately the Voronoi interpolation (basically nearest neighbor) is almost too simple to really be helpful for people in practice, though it produces almost identical results to kriging. Also, the code to actually do it in sf is confusing (need to find a better way to do it). IDW interpolation seemed like a good compromise because it's kind of simple, but it seems to perform very poorly for the lead dataset. So maybe I'll stick with kriging after all...