oeo4b / kriging.js

Javascript library for geospatial prediction and mapping via ordinary kriging
oeo4b.github.io
MIT License
325 stars 130 forks source link

Semi Variogram #18

Open gmerritt123 opened 2 years ago

gmerritt123 commented 2 years ago

Hi there, first off thank you so much for developing this and doing all the hard math! I am a pretty green JS and kriging person and hopefully you can help me out.

My question for you is how to go about getting the data for building a variogram plot, like here https://vsp.pnnl.gov/help/Vsample/Kriging_Variogram_Model.htm

Plotting the theoretical model (e.g. the line) should be straightforward, i can just apply the .model property on the variogram object at different h values then square it.

However to get the pairwise distances to plot the data points, and their associated variances.... I don't know. I see on the variogram there are "t", 'K" and "M". K seems to be something to do with the pairwise, as it's the length of the total number of points squared... There is also a kriging.variance method I found in the source code that might also be part of the equation... I could really use an explanation! Thanks so much.

dayib77 commented 10 months ago

Hi @gmerritt123, hope you doing well. Did you manage to plot the variogram (if yes i would like to see it) ? Thank you in advance.