Package: cpsvote 0.2.0
cpsvote: A Toolbox for Using the CPS’s Voting and Registration Supplement
Provides automated methods for downloading, recoding, and merging selected years of the Current Population Survey's Voting and Registration Supplement <https://www.nber.org/research/data/current-population-survey-cps-supplements-voting-and-registration>, a large N national survey about registration, voting, and non-voting in United States federal elections. Provides documentation for appropriate use of sample weights to generate statistical estimates, drawing from Hur & Achen (2013) <doi:10.1093/poq/nft042> and McDonald (2018) <http://www.electproject.org/home/voter-turnout/voter-turnout-data>.
Authors:
cpsvote_0.2.0.tar.gz
cpsvote_0.2.0.zip(r-4.7)cpsvote_0.2.0.zip(r-4.6)cpsvote_0.2.0.zip(r-4.5)
cpsvote_0.2.0.tgz(r-4.6-any)cpsvote_0.2.0.tgz(r-4.5-any)
cpsvote_0.2.0.tar.gz(r-4.7-any)cpsvote_0.2.0.tar.gz(r-4.6-any)
cpsvote_0.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
card.svg |card.png
cpsvote/json (API)
| # Install 'cpsvote' in R: |
| install.packages('cpsvote', repos = c('https://reed-evic.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/reed-evic/cpsvote/issues
- cps_2016_10k - A sample of the raw 2016 CPS dataset
- cps_2020_10k - A sample of the raw 2020 CPS dataset
- cps_allyears_10k - A sample of the full CPS dataset
- cps_cols - Sample column specifications for reading CPS data
- cps_factors - Sample factor specifications for reading CPS data
- cps_reweight - Calculations to reweight properly for voter turnout
Last updated from:4d40e452d9. Checks:7 WARNING, 2 OK. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-x86_64 | WARNING | 147 | ||
| source / vignettes | OK | 219 | ||
| linux-release-x86_64 | WARNING | 136 | ||
| macos-release-arm64 | WARNING | 99 | ||
| macos-oldrel-arm64 | WARNING | 79 | ||
| windows-devel | WARNING | 97 | ||
| windows-release | WARNING | 73 | ||
| windows-oldrel | WARNING | 79 | ||
| wasm-release | OK | 112 |
Exports:%>%cps_download_datacps_download_docscps_labelcps_load_basiccps_readcps_read_yearcps_recode_votecps_refactorcps_reweight_turnout
Dependencies:bitbit64clicliprcpp11crayondplyrforcatsgenericsgluehmslifecyclemagrittrpillarpkgconfigprettyunitsprogressR6readrrlangstringistringrtibbletidyselecttzdbutf8vctrsvroomwithr
Read Additional CPS Variables
Rendered fromadd-variables.Rmdusingknitr::rmarkdownon May 28 2026.Last update: 2025-10-08
Started: 2020-12-11
Background Information and Context
Rendered frombackground.Rmdusingknitr::rmarkdownon May 28 2026.Last update: 2025-10-08
Started: 2020-10-06
cpsvote: A Social Science Toolbox for Using the Current Population Survey's Voting and Registration Supplement
Rendered frombasics.Rmdusingknitr::rmarkdownon May 28 2026.Last update: 2025-10-08
Started: 2020-10-07
Test Download
Rendered fromtest_download.Rmdusingknitr::rmarkdownon May 28 2026.Last update: 2025-10-08
Started: 2021-01-26
Using the CPS and cpsvote to Understand Voting Part 2
Rendered fromvote_method_trends.Rmdusingknitr::rmarkdownon May 28 2026.Last update: 2025-10-08
Started: 2020-12-11
Using the CPS and cpsvote to Understand Voting
Rendered fromvoting.Rmdusingknitr::rmarkdownon May 28 2026.Last update: 2025-10-08
Started: 2020-10-09
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| A sample of the raw 2016 CPS dataset | cps_2016_10k |
| A sample of the raw 2020 CPS dataset | cps_2020_10k |
| A sample of the full CPS dataset | cps_allyears_10k |
| Sample column specifications for reading CPS data | cps_cols |
| Download CPS microdata | cps_download_data |
| Download CPS technical documentation | cps_download_docs |
| Sample factor specifications for reading CPS data | cps_factors |
| Apply factor levels to raw CPS data | cps_label |
| load some basic/default CPS data into the environment | cps_load_basic |
| Read in CPS data | cps_read |
| Load a single CPS file | cps_read_year |
| recode the voting variable for turnout calculations | cps_recode_vote |
| combine factor levels across years | cps_refactor |
| Calculations to reweight properly for voter turnout | cps_reweight |
| apply weight correction for voter turnout | cps_reweight_turnout |
| vectorized 'na_if' | na_ifin |
