Stat for Surprise with sf Geometries
Arguments
- mapping
Aesthetic mapping created by
ggplot2::aes(). Required aesthetics aregeometry(from sf) andobserved. Optional aesthetics includeexpectedandsample_size.- data
Data (typically an sf object)
- geom
Geometry to use (default: "sf")
- position
Position adjustment
- na.rm
Remove NA values?
- show.legend
Show legend?
- inherit.aes
Inherit aesthetics from ggplot?
- models
Character vector of model types to use. Options: "uniform", "baserate", "gaussian", "sampled", "funnel"
- signed
Logical; compute signed surprise?
- ...
Additional arguments passed to the layer
Value
A list containing a ggplot2 layer using StatSurpriseSf and
ggplot2::coord_sf(). The stat computes surprise and, when signed = TRUE, signed_surprise, which are available to downstream geoms via
after_stat().