automap

how to insert x and y label and tick marks in autoKrige?

ε祈祈猫儿з 提交于 2019-12-24 17:14:14
问题 Two datasets are used: spatial data in 3 columns (x, y, data) grids data in 2 columns (x, y) automap package autoKrige does the calculation of kriging and can be plotted with no x and y tick marks and labels: plot(kriging_result) automapPlot(kriging_result$krige_output, "var1.pred", sp.layout = list("sp.points", shimadata), main="OK without grids", xlab="x", ylab="y") And when I use ggplot2 package, it shows error, however it calculates the kriging: mydata<-read.table("D:/.../mydata.txt"

how to do cross-validation for block kriging?

半城伤御伤魂 提交于 2019-12-12 02:02:52
问题 I have written a code in automap package to cross-validate different kriging techniques. I have cross-validated all of them, but I cannot write the code for Block kriging. It shows this error: unused argument (block=c(400,400)) library(automap) mydata<-read.table(".../mydata.txt",header=T,sep=",") colnames(mydata)=c("x","y","data1") library(gstat) coordinates(mydata)=~x+y mygrids<-read.table(".../grids.txt",header=T,sep=",") gridded(mygrids)=~x+y block_kriging_cv<-autoKrige.cv(log(data1)~x+y,

How to make Ordinary Kriging by using gstat predict

杀马特。学长 韩版系。学妹 提交于 2019-12-09 04:27:33
问题 I am trying to write a code in R that use gstat library in order to create an interpolation. I have already read the gstat manual and based on some examples on internet I had managed to write this code (this is only a part): g <- gstat(id="tec", formula=TEC ~ 1, data=data) ##I create an object v <- variogram(g) # plot the empirical variogram plot(v) mod<-vgm(sill=var(data$TEC),model="Sph",range=200,nugget=200) #create the variogram model v.fit <- fit.variogram(v, model=mod,fit.method=1) #fit

Average values of a point dataset to a grid dataset

你说的曾经没有我的故事 提交于 2019-11-28 05:08:36
I am relatively new to ggplot, so please forgive me if some of my problems are really simple or not solvable at all. What I am trying to do is generate a "Heat Map" of a country where the filling of the shape is continous. Furthermore I have the shape of the country as .RData . I used hadley wickham's script to transform my SpatialPolygon data into a data frame. The long and lat data of my data frame now looks like this head(my_df) long lat group 6.527187 51.87055 0.1 6.531768 51.87206 0.1 6.541202 51.87656 0.1 6.553331 51.88271 0.1 This long/lat data draws the outline of Germany. The rest of

Plotting interpolated data on map

百般思念 提交于 2019-11-27 10:37:24
I have survey data of species richness that was taken at various sites in the Chesapeake Bay, USA, and I would like to graphically present the data as a "heat map." I have a dataframe of lat/long coordinates and richness values, which I converted into a SpatialPointsDataFrame and used the autoKrige() function from the automap package to generate the interpolated values. First, can anyone comment as to whether I am correctly implementing the autoKrige() function? Second, I am having trouble plotting the data and overlaying a map of the region. Alternately, could I specify the interpolation grid

Average values of a point dataset to a grid dataset

安稳与你 提交于 2019-11-27 00:48:49
问题 I am relatively new to ggplot, so please forgive me if some of my problems are really simple or not solvable at all. What I am trying to do is generate a "Heat Map" of a country where the filling of the shape is continous. Furthermore I have the shape of the country as .RData . I used hadley wickham's script to transform my SpatialPolygon data into a data frame. The long and lat data of my data frame now looks like this head(my_df) long lat group 6.527187 51.87055 0.1 6.531768 51.87206 0.1 6

Plotting interpolated data on map

点点圈 提交于 2019-11-26 17:58:00
问题 I have survey data of species richness that was taken at various sites in the Chesapeake Bay, USA, and I would like to graphically present the data as a "heat map." I have a dataframe of lat/long coordinates and richness values, which I converted into a SpatialPointsDataFrame and used the autoKrige() function from the automap package to generate the interpolated values. First, can anyone comment as to whether I am correctly implementing the autoKrige() function? Second, I am having trouble