Working with FEC Data  IRE12

slides
  http://j.mp/fec-ire12  
me
  @A_L | almshaw@gmail.com
  

PAC Track

Where does the data come from?

FEC, FEC (via NYT)

How do I see it?

http://fec.gov/finance/disclosure/efile_search.shtml
    

Know your form codes

F24 <- 24/48 Hour Notice of Independent Expenditure 
F3  <- Monthly Reports 
 |_ SA  <- Contributions
 |_ SB  <- Expenditures
 |_ SD  <- Debts and Obligations

How do I work with it?

(Note filing ID and date)

ftp://ftp.fec.gov/FEC/electronic/
    

What is a .fec file?

Not too helpful. Let's get that into Excel.

Grab the ASCII28 character

https://gist.github.com/2191300

Now, we'll do all that automatically with a little Ruby

If you have Ruby and RubyGems installed

gem install campaign_cash
gem install fech

CampaignCash grabs FEC data via the NYT Campaign Finance API

FEC data, cleaned and organized for you

Get an API key

API -> http://developer.nytimes.com/docs/campaign_finance_api/
Gem documentation -> https://github.com/nytimes/campaign_cash
# Find the latest Restore Our Future expenditures
rof = IndependentExpenditure.committee("C00490045", 2012)
rof.first 

  
#<CampaignCash::IndependentExpenditure:0x102e9b5d0
 @amended_from=nil,
 @amendment=nil,
 @amount=1965690.0,
 @candidate="P80003353",
 @candidate_name="ROMNEY, MITT",
 @committee="C00490045",
 @committee_name="RESTORE OUR FUTURE, INC.",
 @date=Thu, 10 May 2012,
 @date_received=Sat, 12 May 2012,
 @district=nil,
 @fec_uri="http://images.nictusa.com/cgi-bin/fecimg/?12951667442",
 @filing_id=783040,
 @office="President",
 @payee="Mentzer Media Services, Inc.",
 @purpose="Media Buy; also opposes Barack Obama",
 @state=nil,
 @support_or_oppose="S",
 @transaction_id="SE.4551",
 @unique_id="4ec38d64cc82eb5ba4836d1afc1758e387337f22">
  
# Find the latest Restore Our Future contributions
rof = IndividualContribution.committee("C00490045")
rof.first 

  
#<CampaignCash::IndividualContribution:0x1037f2a20
 @address_one="P.O. Box 8020",
 @address_two=nil,
 @aggregate_amount=40000.0,
 @amended_cd=nil,
 @amount=40000.0,
 @back_ref_sched_name=nil,
 @back_ref_tran_id=nil,
 @city="Garden City",
 @conduit_address_one=nil,
 @conduit_address_two=nil,
 @conduit_city=nil,
 @conduit_name=nil,
 @conduit_state=nil,
 @conduit_zip=nil,
 @date="2012-04-30",
 @display_name=nil,
 @donor_cand_id=nil,
 @donor_candidate=nil,
 @donor_cmte_id=nil,
 @donor_district=nil,
 @donor_office=nil,
 @donor_state=nil,
 @employer="Self",
 @exclude=nil,
 @fec_form_type=nil,
 @filing_id=785656,
 @first_name="Marc",
 @flag_orgind="IND",
 @full_name=nil,
 @increased_limit=nil,
 @last_name="Goldman",
 @lat=nil,
 @linenumber="SA11AI",
 @lng=nil,
 @memo_code=nil,
 @memo_text=nil,
 @middle_name=nil,
 @occupation="Private Investor",
 @pac_name=nil,
 @prefix=nil,
 @prigen=nil,
 @state="NY",
 @suffix=nil,
 @system_code=nil,
 @tran_id="SA11AI.6106",
 @transaction_description=nil,
 @transaction_type=nil,
 @zip="11530",
 @zip5="11530">
  

NYT Campaign Finance API at work: FEC Dashboard by @bycoffe

http://bycoffe.github.com/fec-dashboard/  

Deal with filings programmatically with FECh

# Get all the contribution lines from a filing
filing = Fech::Filing.new(785656)
filing.download
filing.rows_like(/^sa/)
Documentation
http://nytimes.github.com/Fech/

Thank you. Questions?

Al Shaw    IRE 2012    @A_L