I have data related to some locations of some buildings as well as their value($). I mapped them by R and now I must use the kernel density estimator to create a density of the locations based on their value. Is there anyone to help me, please? Here is the picture of my map and a sample of the kernel model that I want to create something like that.
mydata = read.csv("C:/Users/HP/Desktop/Data-Map/2016.csv")
x<- mydata$Loss.Limit
fhat<- density(x,kernal="gamma")
x<- fhat$x
y<- fhat$y
f1 <- kde2d(x,y, n = 50)
image(f1)