Create a binary raster with sensitive locations.
is_sensitive( x, max_risk = x$max_risk, min_count = x$min_count, risk_type = x$risk_type )
a risk value higher than
a count lower than
what kind of measure should be used (see details).
By default the risk settings are taken from
x, but they can be overriden.
Different risk functions can be used:
external (numeric variable), calculates how much the largest value comprises the total sum
internal (numeric variable), calculates how much the largest value comprises the sum without the second largest value
discrete (logical variable), calculates the fraction of sensitive values.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.