knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(ccesMRPprep) data(cces_onewaytabs) library(tidyverse) library(haven) library(knitr) options(knitr.kable.NA = '') xt <- function(var, tbl = cps_onewaytabs) { tbl %>% filter(variable == quo_name(enquo(var)), year >= 2006) %>% pivot_wider(id_cols = name, names_from = year, values_from = n) %>% rename({{var}} := name) %>% knitr::kable(format.args = list(big.mark = ','), ) }
The CPS is a survey that includes self-reported vote, as well as a variety of other economic indicators. It has less geographic granularity than the ACS.
The CPS runs monthly, and in a given month collects about 130,000 repondents, or the twice the amount the CCES collects in a year. Only the November survey includes a "Voter Supplement", which includes a question about the respondent's vote turnout.
We list the counts of key demographic variables here, using the one-way tabulations in ?cps_onewaytabs
xt(sex)
xt(age)
xt(educ)
xt(race)
xt(hispan)
xt(voted)
xt(statefip)
xt(county)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.