outliers_by_circle: Spatial outliers: CIRCLE Method

View source: R/spaceout.R

outliers_by_circleR Documentation

Spatial outliers: CIRCLE Method

Description

Spatial outlier method that uses distance from a central point to draw a bounding circle from which to determine outlier status. Use this method to isolate points within some distance r from a given point. The method will automatically compute a center point and distance if none are provided, based on an input percentile, or 0.90 if nothing is provided

Usage

outliers_by_circle(pts, center_point = NA, r = NA, pct = NA)

Arguments

pts

sf points

center_point

(optional) sf point, the point to measure from

r

(optional) radius around center point, in meters

pct

(optional) percentile to use for determining r, if not provided; 0.90 by default

Value

list with outlier status and sf polygon

See Also

Other outlier functions: outliers_by_box(), 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_circle(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.