A project records what it has decided in a .piinata.yml file kept with the
data: which findings were reviewed and may stay, which files are not
scanned, and which extra patterns and terms matter to the study.
pii_scan() and pii_check() read it by default.
Details
allow:
- field: village
reason: Needed for clustering; approved in the data management plan.
- type: person_name
source: data/elections/*
reason: Public record of elected officials.
ignore:
- data/raw/*
patterns:
- name: study_id
regex: "^RJ-[0-9]{6}$"
confidence: high
- name: interviewer
type: person_name
words: [Kamla Meena, Ravi Bairwa]
- name: member_card
regex: "[0-9]{16}"
validate: luhn
context: [member, card]
confidence: low
terms:
person_name: [mukhiya]
regions: [IN]
min_confidence: medium
sample: 10000An allow entry names a field, a type of finding, a source glob, or
any combination, and must give a reason. Custom patterns match values
by a regular expression (regex) or a list of words found as whole
words, and may set an exclude expression for values that never count,
a validate check they must pass (an idcheck scheme, or luhn,
verhoeff, damm, mod11_2, mod97_10), and context words: when a
column's name or label holds one, its finding moves up a grade, as
built-in findings do when the name agrees with the values. terms add
words to the vocabulary used on field names and labels. regions names the
countries whose numbering plans judge phone numbers written without a
country code, as two-letter codes (see dialtone::phone_regions()); it is
used when the 'dialtone' package is installed.
Examples
file <- tempfile(fileext = ".yml")
writeLines(c("allow:", " - field: village", " reason: Needed for clustering."), file)
pii_config(file)$allow
#> [[1]]
#> [[1]]$field
#> [1] "village"
#>
#> [[1]]$reason
#> [1] "Needed for clustering."
#>
#>