I have one month of data that I converted to STDFDF.
#set the spatial location of the regions
Data.loc <- data.frame(Stat = c("Firmo","Citta dei Ragazzi", "Rende",
"Schiavonea","Acri"),
ID = c("IT1766A", "IT1938A", "IT2086A",
"IT2090A", "IT2110A"),
Lat=c(39.71376, 39.3134, 39.33893,
39.65176, 39.48963),
Lon=c(16.19397, 16.24517, 16.24334,
16.54677, 16.3868))
coordinates(Data.loc) = ~Lon+Lat
proj4string(Data.loc) = "+proj=longlat +datum=WGS84"
stations = 4:8
Data.loc = Data.loc[match(names(combineData[stations]), Data.loc$Stat),]
Data.loc$Station = row.names(Data.loc)
combineData$time = ISOdate(combineData$Year, combineData$Month, combineData$Day, 0)
dataObj = STFDF(Data.loc, combineData$time,
data.frame(values = as.vector(t(combineData[stations]))))
Sample data: DATA
I save my final pred_kriged object when I use the METRIC MODEL
# Kriging Prediction
#---------------------------
pred_kriged <- krigeST(values ~ 1,
data = dataObj, # data set
newdata = ST_pred, # prediction grid
modelList = metricFit, # best fitted semivariogram
computeVar = TRUE) # compute variances
Space-time kriging is realized and I want to extract data for other unknown points (long, lat) before kriging for the same period for each day.