r - Creating Heat Map using Krigging -




i'm trying create heat map using krigging missing values. data rlevels

i have following data, contains values have been measured rlevel.

i followed following link tells how use krigging. https://rpubs.com/nabilabd/118172

this following code wrote. before these steps, had removed values diedata needed values tested. values need tested refered die.data.navalues in code.

#**************************************************code*****************  #step3: convert spatialpointsdataframe object  coordinates(die.data) = ~x+y   #step 4: prediction grid  coordinates(die.data.navalues)=~x+y    #using autokride method  kr = autokrige(rlevel, die.data, die.data.navalues,nmax=20)  predicted_die_values <- kr$krige_output  predicted_die_model <- kr$var_model    #get predictions. plot predicted on heat map.  g <- gstat(null,"rlevel",rlevel~1,die.data, model=predicted_die_model,nmax=1)  predictedset <- predict(g,newdata=die.data,blue=true)   #plot krigging graph  predicted_die_values %>% as.data.frame %>% ggplot(aes(x=x,y=y)) + geom_tile(aes(fill=v1.pred))+coord_equal() +scale_fill_gradient(low="yellow",high="red")+scale_x_continuous()+scale_y_continuous()+theme_bw()  

when plot graph, following image values have been tested kriging method. enter image description here

my question how can show heat map predicted points krig , points have. want graph show link above had posted. enter image description here

description dataset: original dataset including na values have not been tested contains around 55057 points. when take out na values , use prediction grid, 390 points. majority of values rlevel within 30's range except around 100-200 points above 100.

can me out or give me guidance of how produce heatmap?





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -