namevalue | R Documentation |
These value-value tables are useful for recoding the values of from one dataset (CCES) so that they can be merged immediately with another (ACS). These get used internally in ccc_std_demographics, but they are available as built in datasets.
race_key
gender_key
educ_key
educ3_key
ed_ed3_cces
age5_key
age10_key
states_key
All keys are tibbles with one row per recoding value.
race_key
An labelled integer of class haven::labelled. Most compact form of both sources and the values both will get recoded to in MRP.
Labelled versions of the CCES race codings. These are of the same class as the CCES cumulative file.
Labels for the first column, in characters
Corresponding character in the ACS data via the tidycensus package
A numeric value underlying the race
label.
gender_key
:An labelled integer of class haven::labelled. Target variable
Character to recode from. CCES and ACS use the same values.
educ_key
For mapping ACS data values for four-way education e.g. in get_acs_cces:
Character to recode from, in CCES
Character to recode from, in ACS.
An labelled integer of class haven::labelled. Target variable
educ3_key
For mapping ACS data values for three-way education e.g. in get_acs_cces:
Character to recode from, in CCES
Character to recode from, in ACS.
An labelled integer of class haven::labelled. Target variable
ed_ed3_cces
A key to link educ (4-way) and educ3
age5_key
Age bins, 5-ways, used in acscodes_age_sex_educ. Use ccc_bin_age to recode CCES variable
An labelled integer of class haven::labelled. Target variable.
Character to recode from, in ACS
age10_key
: Age bins, 10-ways, used in acscodes_age_sex_race:An labelled integer of class haven::haven_labelled
. Target variable.
Character to recode from, in ACS
states_key
: State codes and regions:State two-letter abbreviation state.abb
State full name via state.name
State traditional abbreviation following AP style
Integer, state FIPS code
Census region (Northeast, Midwest, South, West)
Census division (New England, Middle Atlantic, South Atlantic, East South Central, West South Central, East North Central, "West North Central, Mountain, Pacific)
These tibbles themselves are not key-values pair in a strict sense because
the dataframe tries to have two recodes CCES to common and ACS to common and so for
a given recode, rows are not distinct. To avoid duplicating rows inadvertently,
use the dplyr::distinct
to reduce the key to two columns with unique rows.
library(ccesMRPprep)
race_key
educ_key
educ3_key
gender_key
age5_key
age10_key
states_key
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.