Skip to content
This repository has been archived by the owner on Aug 16, 2018. It is now read-only.
/ voter-demographics Public archive

Analysis of Current Population Survey's 2012 Voting Supplement

Notifications You must be signed in to change notification settings

nprapps/voter-demographics

Repository files navigation

voter-demographics

Getting setup

mkvirtualenv voter-demographics
pip install -r requirements.txt

Getting the data

curl -O http://thedataweb.rm.census.gov/pub/cps/supps/nov12pub.zip
unzip nov12pub.zip
in2csv -s schema.csv nov12pub.dat > nov12pub.csv
csvcut -c pwsswgt,gestfips,ptdtrace,pehspnon,pesex,prtage,pes1,pes2,pes3,pes4,pes5,pes6,pes7,pes8 nov12pub.csv > data.csv
python make_readable.py
python analyze.py

Output is states.csv.

Note: this file does not include margin-of-error calculations. See the Census Bureau documentation for details on how to calculate this for each derived statistic. In many cases the error can be quite large.

Sources

Documentation

About

Analysis of Current Population Survey's 2012 Voting Supplement

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published