Explode person profiles into a long blocking-key table
person_blocking_keys.RdTurns each build_person_profile() row into the set of hash buckets it belongs
to – the stage-1 input for cross-organization linkage. Because a profile keeps
its variant sets, it emits the Cartesian product of its surname phonetic keys,
states, and (truncated) NTEE codes for each requested pass, so a person with a
maiden and a married surname, or activity in two states, lands in every
matching bucket instead of a single one.
Usage
person_blocking_keys(
profiles,
passes = names(blocking_passes()),
ntee_digits = 1L
)Arguments
- profiles
Output of
build_person_profile()(needslast_name_keys;states/nteelist-columns for the geography/industry passes).- passes
Character vector naming the passes to emit (see
blocking_passes()); default all four.- ntee_digits
Number of leading characters of each NTEE code to key on (default
1= major group, e.g."B25"->"B").
Value
A data frame EMP_ID, pass, block_key (one row per bucket a person
lands in). block_key is "<pass>|<last>[|<state>][|<ntee>]".
Details
Keys are namespaced by pass, so a strict bucket and a surname bucket never
collide even when they share a surname key. A pass that needs a component the
profile lacks (e.g. strict when states is empty) simply emits nothing for
that profile.
See also
candidate_pairs() for the hash join over these keys.
Examples
if (FALSE) { # \dontrun{
profiles <- build_person_profile(linked, state = "state", ntee = "ntee")
keys <- person_blocking_keys(profiles)
table(keys$pass)
} # }