protect_quadtree: Protect a raster with a quadtree method.

Description Usage Arguments Details Value References See Also Examples

View source: R/protect_quadtree.R

Description

protect_quadtree reduces sensitivy by aggregating sensisitve cells with its three neighbors, and does this recursively until no sensitive cells are left or when the maximum zoom levels has been reached.

Usage

1
protect_quadtree(x, max_zoom = Inf, ...)

Arguments

x

sdc_raster object to be protected.

max_zoom

numeric, restricts the number of zoom steps and thereby the max resolution for the blocks. Each step will zoom with a factor of 2 in x and y so the max resolution = resolution * 2^max_zoom.

...

Arguments passed on to is_sensitive

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

This implementation generalizes the method as described by Suñé et al., in which there is no risk function, and only a min_count to determine sensitivity. Furthermore the method the article only handles count data (x$value$count), not mean or summed values. Currently the translation feature of the article is not (yet) implemented, for the original method does not take the disclosure_risk into account.

Value

a sdc_raster object, in which sensitive cells have been recursively aggregated until not sensitive or when max_zoom has been reached.

References

Suñé, E., Rovira, C., Ibáñez, D., Farré, M. (2017). Statistical disclosure control on visualising geocoded population data using a structure in quadtrees, NTTS 2017

See Also

Other protection methods: protect_smooth, remove_sensitive

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(raster)

fined <- sdc_raster(enterprises, enterprises$fined)
plot(fined)
fined_qt <- protect_quadtree(fined)
plot(fined_qt)

fined <- sdc_raster(enterprises, enterprises$fined, r=50)
plot(fined)
fined_qt <- protect_quadtree(fined)
plot(fined_qt)

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