How to use IDW to interpolate data

I have some points, where each point has latitude, longitude, and value. How to use inverse distance weighting (IDW) interpolation method to interpolate these points to grid centroids? The grid centroids are another dataset, where each grid centroid has latitude and longitude.
I have attached the example here. The figure overlays two datasets. One dataset contains gridded data, i.e. grid centroids with latitude, longitude, and value. The different color or shades of color represents different value. The second dataset is the green dots or points, they may not be at the grid centroids. How to interpolate the values of these points to the gridded dataset? So in the new gridded dataset, the latitude and longitude of the grid centroids maintain the same, but the values are IDW interpolation from these sparse points. Thanks for your help.
region

I haven't done much in this area, but you may want to look at the IDW section of "Interpolation in R" in Manuel Gimond's "Intro to GIS and Spatial Analysis"

1 Like

@mara's suggestion is great, but I wanted to put out a second resource as well - the Interpolation section of the Spatial Data Analysis and Modeling with R docs. Good luck with your interpolations!

1 Like

Thanks to all you help.
Is it possible to add DEM layer? If the values represent precipitation, then precipitation at mountains is not simply an interpolation from the surrounding areas.