Package: cpsvote 0.2.1
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) <https://www.electproject.org/election-data/voter-turnout-data>.
Authors:
cpsvote_0.2.1.tar.gz
cpsvote_0.2.1.zip(r-4.7)cpsvote_0.2.1.zip(r-4.6)cpsvote_0.2.1.zip(r-4.5)
cpsvote_0.2.1.tgz(r-4.6-any)cpsvote_0.2.1.tgz(r-4.5-any)
cpsvote_0.2.1.tar.gz(r-4.7-any)cpsvote_0.2.1.tar.gz(r-4.6-any)
cpsvote_0.2.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
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
Pkgdown/docs site:https://reed-evic.github.io
- cps_2016_10k - A sample of the raw 2016 CPS dataset
- cps_2020_10k - A sample of the raw 2020 CPS dataset
- cps_2022_10k - A sample of the raw 2022 CPS dataset
- cps_2024_10k - A sample of the raw 2024 CPS dataset
- cps_allyears_100k - 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:125b233859. Checks:9 OK. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-x86_64 | OK | 165 | ||
| source / vignettes | OK | 220 | ||
| linux-release-x86_64 | OK | 160 | ||
| macos-release-arm64 | OK | 124 | ||
| macos-oldrel-arm64 | OK | 132 | ||
| windows-devel | OK | 108 | ||
| windows-release | OK | 122 | ||
| windows-oldrel | OK | 93 | ||
| wasm-release | OK | 166 |
Exports:%>%cps_data_dircps_docs_dircps_download_datacps_download_docscps_labelcps_load_basiccps_readcps_read_yearcps_recode_votecps_refactorcps_reweight_turnout
Dependencies:bitbit64clicliprcpp11crayondplyrforcatsgenericsgluehmslifecyclemagrittrpillarpkgconfigprettyunitsprogressR6readrrlangstringistringrtibbletidyselecttzdbutf8vctrsvroomwithr
Last update: 2026-06-30
Started: 2020-12-11
Last update: 2026-06-30
Started: 2020-10-06
Last update: 2026-06-30
Started: 2020-10-07
Last update: 2026-06-30
Started: 2020-12-11
Last update: 2026-06-30
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 raw 2022 CPS dataset | cps_2022_10k |
| A sample of the raw 2024 CPS dataset | cps_2024_10k |
| A sample of the full CPS dataset | cps_allyears_100k |
| Sample column specifications for reading CPS data | cps_cols |
| Get the cpsvote data directory | cps_data_dir |
| Get the cpsvote documentation directory | cps_docs_dir |
| 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 |
