[R-sig-Geo] Spatio-temporal kriging with missing time periods
Nima Mehrafshan
nima.mehrafshan at gmail.com
Mon Sep 4 19:07:21 CEST 2017
Hello everybody,
I have four years of spatial data with a couple of gaps (missing time
periods of up to one year).
> summary(sample_data)
lon lat x month
Min. : 8.338 Min. :54.41 Min. :-1982.94 Min. :2013-09-01
1st Qu.: 9.551 1st Qu.:54.54 1st Qu.: -428.76 1st Qu.:2014-03-24
Median :13.280 Median :54.63 Median : 86.03 Median :2014-09-01
Mean :11.856 Mean :54.68 Mean : 2470.73 Mean :2014-11-08
3rd Qu.:13.395 3rd Qu.:54.83 3rd Qu.: 997.35 3rd Qu.:2015-06-01
Max. :13.664 Max. :55.02 Max. :30967.30 Max. :2017-08-01
(I have rounded the times to the next first of the month)
I would like to do spatio-temporal kriging on the target variable x using
the gstat package. However, when I run...
> sp <- SpatialPoints(sample_data[,c('lat', 'lon')], CRS('+proj=longlat
+datum=WGS84'))
> sp <- spTransform(sp, CRS("+proj=utm +zone=32 +ellps=WGS84
+datum=WGS84"))
> sample_data <-STIDF(sp, time = sample_data$month, data =
sample_data[,'x',drop=F])
> vv <- variogramST(x~1, data=sample_data, cutoff=1000,
assumeRegular=FALSE)
...the computation stops after 7% with no error message and the resulting
data frame (vv) has NAs in np, dist, and gamma in all but the first lag. I
guess this is because there are no observations for the second lag ?
Can variogramST only be used for data without gaps in the time dimension?
Do I have other options for spatio-temporal interpolation that work with
this kind of data?
Thank you.
Nima Mehrafshan
PS: I've also posted this question here:
https://gis.stackexchange.com/questions/254127
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list