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.

Variable and counts

We list the counts of key demographic variables here, using the one-way tabulations in ?cps_onewaytabs

sex

xt(sex)

age (5-way)

xt(age)

education

xt(educ)

race

xt(race)

hispanic origin

xt(hispan)

Self-reported vote

xt(voted)

state

xt(statefip)

county (if not anonymized)

xt(county)


kuriwaki/ccesMRPprep documentation built on July 27, 2023, 3:34 a.m.