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 to interpolate over
data("meuse.grid")
I am trying to use kriging methods in R but i am stuck due to not being able to find a grid for my data. My data takes up all the US state of Colorado and i would like to be able to get a grid to interlope my data over. Similar to the meuse.grid that is used in the example i am following.
Any help would be appreciated