sdc_raster creates multiple
("count", "mean", "sum") from supplied point data
x and calculates
the sensitivity to privacy disclosure for each location.
1 2 3
sp::SpatialPointsDataFrame, sf::sf or a two column matrix or data.frame that is used to create a raster map.
name of data column or
either a desired resolution or a pre-existing raster object.
In the first case, the crs of
passed on to
passed through to
sdc_raster object is the vehicle that does the book keeping for calculating
sensitivity. Protection methods work upon a
sdc_raster and return a new
sdc_raster in which the sensitivity is reduced.
The sensitivity of the map can be assessed with sensitivity_score,
remove_sensitive(). Raster maps for
count data can be extracted from the
raster::brick() object with differenct layers e.g.
$max_risk: see above.
$min_count: see above.
$scale: used together with
min_count to determine sensitivity: result
of protection operation
$type: data type of
$risk_type, "external", "internal" or "discrete" (see
1 2 3 4 5 6 7 8 9 10 11 12 13 14
library(raster) prod <- sdc_raster(enterprises, field = "production", r = 500) print(prod) prod <- sdc_raster(enterprises, field = "production", r = 1e3) print(prod) # get raster with the average production per cell averaged over the enterprises prod_mean <- mean(prod) summary(prod_mean) # get raster with the total production per cell prod_total <- sum(prod) summary(prod_total)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.