outliers_by_box: Spatial outliers: BOX Method

View source: R/spaceout.R

outliers_by_boxR Documentation

Spatial outliers: BOX Method

Description

Spatial outlier method that uses distance from a central point to draw a box around a collection of points. The distance to box boundaries is determined from the 90th percentile, or by user input. TODO: add manual center-point option, different xy distances TODO: adjust code for new epsg function

Usage

outliers_by_box(pts, pct = NA)

Arguments

pts

sf points

pct

(optional) quantile to determine distance from center

Value

list with outlier status and sf polygon

See Also

Other outlier functions: outliers_by_circle(), outliers_by_cluster(), outliers_by_density(), outliers_by_iforest(), outliers_by_polygon(), spatial_outliers()

Examples

data("pdx_breweries")
pts <- pdx_breweries$geometry
x <- outliers_by_box(pts)
plot(pts)
plot(pts[x[[1]]==-1], col="red", add=TRUE)
plot(x[[2]], add=TRUE)

nhoteling/spaceheater documentation built on Sept. 24, 2022, 3:04 p.m.