kriging.js is a Javascript library for mapping and predicting spatial data using the kriging algorithm. This library allows one to model and map spatial data.

The easiest way to get started is to download the Javascript library (or link directly to krigingjs.com/kriging.js) and attach it to your html code. Then, to train a model with coordinates (x, y) and values t on parameters σ2 and α:

var model = "exponential";
var sigma2 = 0, alpha = 100;
var fitModel = kriging.train(t, x, y, model, sigma2, alpha);

To predict points at a new point in space (xnew, ynew):

var tnew = kriging.predict(xnew, ynew, fitModel);