library(reshape2) library(data.table) library(dplyr) library(magrittr) library(ggplot2) library(scales) library(gstat) library(DescTools) library(sp) #I want a colorado grid# data("colorado.grid") #making cordinates into spatial points dataframe# coordinates(Gold_tracer_kri) <- ~ long_orig + lat_orig #attempt at kriging but no grid# lzn.kriged <- krige(Au ~ 1, Gold_tracer_kri, colorado.grid, model=lzn.fit) lzn.kriged %>% as.data.frame %>% ggplot(aes(long_orig=long_orig, lat_orig=lat_orig)) + geom_tile(aes(fill=var1.pred)) + coord_equal() + scale_fill_gradient(low = "yellow", high="red") + scale_x_continuous(labels=comma) + scale_y_continuous(labels=comma) + theme_bw()
load spatial domain for interpolation by
data("meuse.grid")
I am trying to use kriging methods in R, but I am stuck because I could not find a grid for my data. My data covers all US states in Colorado, and I would like to get a grid to transfer my data. Like meuse.grid, which is used in the following example.
Any help would be appreciated
source share