Skip to contents

A precise coordinate pins a participant to a place, so it is disclosure risk even when every other column is anonymous. Detected from the column NAME (word-split, so LocationLatitude and gps_lat are recognised, not only a bare lat), then confirmed two ways.

Usage

data_check_pii_geo(col_name, x, sibling_names = NULL)

Arguments

col_name

the column name

x

the column's values

sibling_names

the other column names in the same file, used to find the partner column. When NULL (a caller checking one column with no file context) the partner requirement is skipped, so the check behaves as it did before – name plus value range.

Value

list(problem, message, values)

Details

Confirmation matters because the name alone is ambiguous: in psychology data lat is as likely to be latency or a lateralisation index as latitude, and lon can be a loneliness scale. Two requirements filter those out:

  • the values must lie inside the coordinate range (+/-90 for a latitude, +/-180 for a longitude), which rejects a latency in milliseconds; and

  • a matching PARTNER column must exist in the same file – a latitude needs a longitude beside it. A real coordinate is always a pair, whereas a latency, a loneliness score or a Latin-square code never has a lon sibling. This is what separates them, since the coordinate ranges are so wide that almost any bounded measurement fits inside them.

gps, geolocation and coordinate name a coordinate outright and need no partner.

Examples

data_check_pii_geo("latitude", c(51.44, 52.37, 50.85),
                   sibling_names = c("latitude", "longitude"))$problem
#> [1] TRUE