Computes kernel density estimates for point or polygon sf objects.
Usage
st_density(
x,
method = c("kde", "kriging"),
bandwidth = NULL,
n = 100,
weights = NULL,
...
)Arguments
- x
An sf object with point or polygon geometries
- method
Density estimation method: "kde" (kernel density) or "kriging" (requires additional packages)
- bandwidth
Bandwidth for KDE. If NULL, estimated automatically.
- n
Grid size for density estimation
- weights
Optional weights for each feature
- ...
Additional arguments passed to density estimation functions