st_density: Compute 2D density

st_densityR Documentation

Compute 2D density

Description

Choose from methods "kde2d" and "bkde2D", and various return geometries

Usage

st_density(
  x,
  return_geometry = "point",
  method = "kde2d",
  bw = NULL,
  n = 200,
  bins = NULL,
  truncate = TRUE,
  x_expansion = NULL,
  y_expansion = NULL,
  levels_low = NULL,
  levels_high = NULL
)

## S3 method for class 'sfc'
st_density(
  x,
  return_geometry = "point",
  method = "kde2d",
  bw = NULL,
  n = NULL,
  bins = NULL,
  truncate = TRUE,
  x_expansion = NULL,
  y_expansion = NULL,
  levels_low = NULL,
  levels_high = NULL
)

## S3 method for class 'sf'
st_density(
  x,
  return_geometry = "point",
  method = "kde2d",
  bw = NULL,
  n = NULL,
  bins = NULL,
  truncate = TRUE,
  x_expansion = NULL,
  y_expansion = NULL,
  levels_low = NULL,
  levels_high = NULL
)

Arguments

x

(sf/sfc) [missing] Spatial data

return_geometry

["point"] (character) What gets returned?

method

(character) ["kde2d"] How should density be computed?

bw

(numeric) [NULL] Binwidth

n

(numeric) [NULL] Grid size

bins

(numeric) [NULL] Number of contour bins

truncate

(logical) [TRUE] See KernSmooth::bkde2D

x_expansion, y_expansion

(numeric) [NULL] Expansion multiple applied to x-/y-range and used in lims and range.x arguments for methods "kde2d" and "bkde2D", respectively.

levels_high, levels_low

(numeric) Low/high breakpoints for isolines and isobands.


seasmith/sfx documentation built on April 1, 2024, 2:36 p.m.