Inverse Distance Weighting with Directional Data

Function for inverse distance weighted interpolation with directional data.
Useful for when you are working with data whose unit of measurement is
degrees (i.e. the average of 35 degrees and 355 degrees should be 15
degrees). It works by finding the shortest distance between two degree
marks on a circle.

idw360(values, coords, grid, idp=2)

Arguments

values

the dependent variable

coords

the spatial data locations where the values were measured.
First column x/longitude, second y/latitude

grid

data frame or Spatial object with the locations to predict.
First column x/longitude, second y/latitude