is_sensitive: Return raster with sensitive locations.

Description Usage Arguments Details See Also Examples

View source: R/is_sensitive.R

Description

Create a binary raster with sensitive locations.

Usage

1
2
is_sensitive(x, max_risk = x$max_risk, min_count = x$min_count,
  risk_type = x$risk_type)

Arguments

x

sdc_raster object.

max_risk

a risk value higher than max_risk will be sensitive.

min_count

a count lower than min_count will be sensitive.

risk_type

what kind of measure should be used (see details).

Details

By default the risk settings are taken from x, but they can be overriden.

Different risk functions can be used:

See Also

Other sensitive: disclosure_risk, plot_sensitive, remove_sensitive, sdc_raster, sensitivity_score

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
dwellings_sp <- dwellings
sp::coordinates(dwellings_sp) <- ~ x + y
tryCatch(
  # does not work on some OS versions
  sp::proj4string(dwellings_sp) <- "+init=epsg:28992"
)
# create a 1km grid
unemployed <- sdc_raster(dwellings_sp, dwellings_sp$unemployed, r = 1e3)
print(unemployed)

# retrieve the sensitive cells
is_sensitive(unemployed)

sdcSpatial documentation built on July 20, 2019, 1:04 a.m.