These functions are called automatically by bisg()
but may be useful,
especially when geographic variables are included in a birdie()
model.
proc_zip()
and proc_state()
preprocess their corresponding geographic
identifiers. States are partially matched to state names and abbreviations
and are returned as FIPS codes. ZIP codes are crosswalked to Census ZCTAs.
Missing identifiers are replaced with "<none>"
.
proc_name()
processes last names in accordance with Census processing rules
(https://www2.census.gov/topics/genealogy/2010surnames/surnames.pdf).
Names are converted to Latin characters, capitalized, stripped of prefixes
and suffixes, and otherwise standardized.
proc_zip(x)proc_state(x)
proc_name(x, to_latin = TRUE)
A processed character vector
A character vector of names or geographic identifiers to process
If TRUE
, convert names to Latin characters only. Strongly
recommended if non-Latin characters are present, since these will not match
Census tables. However, the conversion is slightly time-consuming and so
can be disabled with this flag.
proc_zip()
: Match ZIP codes to ZCTAs and fill in missing values.
proc_state()
: Match state names and abbreviations and fill in missing values.
proc_name()
: Process names to a Census-standardized format.
proc_name("Smith Jr.")
proc_zip("00501")
proc_state("Washington")
Run the code above in your browser using DataLab