The issue you have is that the lat
values are all the same. This means that the variance in the lat
direction is zero, so a bandwidth for the kernel density estimate can't be calculated
You can hard code a bandwidth,
turkumap + geom_density2d(mapping=aes(x = lon, y = lat),
data = test, h=0.01)
but in your case I would suggest not using geom_density2d
for this particular data set. Perhaps just plotting the points?