Name: congress-candidates-2018
Owner: NYT Newsroom Developers
Description: null
Created: 2017-12-07 18:37:11.0
Updated: 2017-12-08 16:29:21.0
Pushed: 2017-12-15 19:56:29.0
Homepage: null
Size: 936
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
install -r requirements.txt
If running campfin/get_candidates.py
with the --totals
flag I recommend getting 4 API keys from https://api.open.fec.gov/developers/ to avoid throttling.
After retrieving them, in ~/.bashrc
:
rt FEC_KEY_0=<key>
rt FEC_KEY_1=<key>
rt FEC_KEY_2=<key>
rt FEC_KEY_3=<key>
Syntax and num keys matters. See update_key()
function in campfin/get_candidates.py
t csv of candidates who filed for 2018
on campfin/get_candidates.py --year 2018
t csv of candidates with fund totals for 2018
on campfin/get_candidates.py --year 2018 --totals
t csv of districts with FEC ids and candidate count for 2018
on campfin/get_candidates.py --year 2018 --districts
on campfin/rutgers.py //Gets Rutgers candidates into a csv.
//Should look over to look at unicode errors or if name/party are conjoined from typos.
on campfin/get_candidates.py --year 2018 --totals
on campfin/rutgers.py
on compare/compare_rutgers.py --rutgers data/2018_rutgers.csv --fec 2018_totals.csv
This adds a rutgers_sex
label to FEC totals in fec_gender.csv
and
a candidate_id
label to Rutgers candidates in data/rutgers_fec_ids.csv
.