19 Utilizing FEC disclosure data

# i always begin by loading the disco engine if it isn't already loaded
library(discoveryengine)

Prospect Analysis regularly screens various public data against CADS, including FEC disclosures. This data makes its way into some of our predictive models, but on occasion it is useful to use the data directly.

19.1 Basics

The Disco Engine provides the following FEC widgets:

  • fec_gave_to_committee
  • fec_gave_to_candidate
  • fec_gave_to_category

Since the names of all of these related widgets begin with the same prefix, they are easy to find using RStudio’s auto-completion:

just type “fec_”

just type “fec_”

The candidate and committee widgets should be pretty self-explanatory. fec_gave_to_category is based on a categorization of PACs and other committees done by the Center for Responsive Politics (opensecrets.org).

All of the widgets have the same interface as the giving widgets, meaning you can specify date ranges and minimum amounts when using them.

For example, to find donors to Kamala Harris’s CA senate campaign who gave at least $500 between January 1, 2016 and November 1, 2016:

fec_gave_to_candidate(harris_kamala_d, at_least = 500, 
                      from = 20160101, to = 20161101)

As that example shows, the system of codes and synonyms works the same way with the FEC widgets as with any other widget. Synonym search is particularly useful with these widgets:

fec_gave_to_category(?abortion)
## Regular codes and synonyms:
##                              synonym  code
##        abortion_policy_anti_abortion J7120
##  abortion_policy_pro_abortion_rights J7150

19.2 Example: Engineering Prospects

A fundraiser might like to know if any of her prospects have recently made sizable political contributions:

# as with other widgets, leaving the committee code blank means i'm looking
# for giving to any committee
political_engineering_prospect = 
    in_unit_portfolio(engineering) %and%
    fec_gave_to_committee(at_least = 5000, from = 20170101, to = 20171031)

display(political_engineering_prospect)
## # A tibble: 27 x 1
##    entity_id
##        <dbl>
##  1       616
##  2      5881
##  3     15333
##  4     16641
##  5     17677
##  6     21091
##  7     30551
##  8    130078
##  9    229827
## 10    283796
## # … with 17 more rows

19.3 Example: Environmental Interest

We can use political giving to identify constituent interest in the environment. First, I’ll use the lookup features to identify the right category:

fec_gave_to_category(?environment)
## Regular codes and synonyms:
##                                      synonym  code
##                         environmental_policy JE300
##     energy_natural_resources_and_environment E0000
##  environmental_services_equipment_consulting E2000

In this case, “environmental policy” is an ideological category, while the other two are industry PACs. Next, I might look for people who have expressed an interest in the environment by making political contributions to environmental policy organizations, but who have not already been coded with the

has_uncoded_environment_interest = 
    fec_gave_to_category(environmental_policy) %but_not%
    has_interest(environment)

display(has_uncoded_environment_interest)
## # A tibble: 2 x 1
##   entity_id
##       <dbl>
## 1   3178462
## 2   3178463

19.4 Bots

Just like any other widget, FEC widgets are plugged in to the Brainstorm Bot and Matrix Bot. So, for instance:

brainstorm_bot("cannabis")
## fec_gave_to_category 
##     H4700: Pharmaceutical cannabis
## fec_gave_to_committee 
##     C00653444: CANNABIS SUPER PAC
##     C00675314: CITIZENS FOR THE LEGALIZATION OF CANNABIS POLITICAL ACTION COMMITTEE
##     C00718049: MAKE CANNABIS LEGAL AGAIN
##     C00681502: AMERICANS FOR CANNABIS NOW
##     C00569723: AMEICANS FOR CANNABIS LEGALIZATION
##     C00528026: NATIONAL CANNABIS INDUSTRY ASSOCIATION PAC
##     C00635896: CANNABIS COLLECTIVE
##     C00530683: AMERICANS FOR CANNABIS REFORM
##     C00662254: CANNABIS CATALYST POLITICAL ACTION COMMITTEE
##     C00647685: THE CANNABIS FUND
##     C00690149: CANNABIS TRADE FEDERATION ACTION FUND
##     C00534529: MEDICINAL CANNABIS SUPERPAC
##     C00628610: AMERICAN CANNABIS POLITICAL ACTION COMMITTEE
##     C00569723: AMERICANS FOR CANNABIS LEGALIZATION
##     C00613356: THE ACCC CANNABIS POLITICAL ACTION COMMITTEE
##     C00572545: MISSISSIPPI ALLIANCE FOR CANNABIS
##     C00534529: FEDERAL CANNABIS SUPERPAC
##     C00561159: SMART CANNABIS REFORM
## has_interest 
##     CAN: Cannabis
## participated_in 
##     UCBS: Cannabis Action Network

Or:

matrix_bot(fec_gave_to_candidate(sanders_bernard))
## ca_gave_to_candidate 
##     CA3898358172: BOWEN, DEBRA
## fec_gave_to_candidate 
##     S4VT00033: SANDERS, BERNARD
##     H6OH23033: KUCINICH, DENNIS J
##     H6FL23063: CANOVA, TIMOTHY A.
##     H4IA03065: APPEL, STACI
##     H6MT01095: JUNEAU, DENISE
##     H4IA01077: VERNON, MONICA W
##     S8OK00233: RICE, ANDREW MONROE
##     H6NY19243: TEACHOUT, ZEPHYR
##     P40002545: KUCINICH, DENNIS J
##     S0AR00168: HALTER, WILLIAM A
##     H6WA07458: JAYAPAL, PRAMILA
##     H2CA06267: SOLOMON, NORMAN
##     H4IA04113: MOWRER, JIM
##     H6FL08213: GRAYSON, ALAN MARK
##     H6NH01230: SHEA-PORTER, CAROL
##     H4ME02200: CAIN, EMILY
##     S4IA00087: BRALEY, BRUCE L
##     S8WI00026: FEINGOLD, RUSSELL D
##     S0KY00123: CONWAY, JOHN WILLIAM (JACK)
##     H6CA44103: BARRAGAN, NANETTE
##     H4PA08116: NAUGHTON, SHAUGHNESSY
##     S4MI00355: PETERS, GARY
##     S6MD03458: EDWARDS, DONNA FERN
##     S4VT00017: LEAHY, PATRICK
##     S6MO00362: KANDER, JASON
##     S2NM00088: HEINRICH, MARTIN TREVOR
##     H0NH02181: KUSTER, ANN MCLANE
##     H8NV03036: TITUS, DINA
##     S6OH00254: STRICKLAND, TED
##     H6MN05183: ELLISON, KEITH MAURICE
##     H6WA08068: BURNER, DARCY
##     S8ME00080: ALLEN, THOMAS H
##     H4CA10075: EGGMAN, MICHAEL RAY
##     H2CA31125: AGUILAR, PETE
##     S8NV00156: ROSEN, JACKY
##     H6IL06141: DUCKWORTH, L. TAMMY
##     S8MN00438: FRANKEN, AL
##     S6NH00091: HASSAN, MARGARET WOOD
##     S2MA00170: WARREN, ELIZABETH
##     S6OH00163: BROWN, SHERROD
##     S8OR00207: MERKLEY, JEFFREY ALAN
##     S6MO00297: CARNAHAN, ROBIN
##     S6IL00292: DUCKWORTH, L TAMMY
##     S4KY00091: GRIMES, ALISON  LUNDERGAN
##     S8WA00194: CANTWELL, MARIA
##     S2WI00219: BALDWIN, TAMMY
##     S6NV00200: MASTO, CATHERINE CORTEZ
##     H2CA36439: RUIZ, RAUL DR.
##     S2CT00132: MURPHY, CHRISTOPHER S
##     S6IL00151: DURBIN, RICHARD J
##     S6RI00221: WHITEHOUSE, SHELDON II
##     S0MA00075: COAKLEY, MARTHA
##     S6PA00266: MCGINTY, KATHLEEN ALANA
##     H8CA09060: LEE, BARBARA
##     S2NV00209: BERKLEY, SHELLEY
##     S8FL00166: NELSON, BILL
##     S8NM00184: UDALL, TOM
##     S6MT00162: TESTER, JON
##     H2CA00120: BROWNLEY, JULIA
##     S0PA00434: SESTAK, JOSEPH A JR
##     S2ND00099: HEITKAMP, HEIDI
##     S0NH00219: SHAHEEN, JEANNE
##     S2WA00189: MURRAY, PATTY
##     S6MO00305: MCCASKILL, CLAIRE
##     S8NC00239: HAGAN, KAY R
##     S8AK00090: BEGICH, MARK
##     S8MI00281: STABENOW, DEBBIE
##     H8GA06195: OSSOFF, T. JONATHAN
##     P60007168: SANDERS, BERNARD
##     S8CO00172: UDALL, MARK E
##     P40002347: EDWARDS, JOHN
##     S0CO00211: BENNET, MICHAEL F
##     H0CA03078: BERA, AMERISH
##     S0AL00156: JONES, DOUG
##     H4CA11081: MCNERNEY, JERRY
## fec_gave_to_category 
##     Z1300: Third-Party Candidate Committees
##     J2300: Democratic officials, candidates & former members
##     JE300: Environmental policy
##     J2100: Democratic leadership PAC
##     J6100: Anti-Guns
##     J7150: Abortion policy/Pro-Abortion Rights
##     J7500: Minority/Ethnic Groups
##     J1200: Democratic/Liberal
##     J9000: Other single-issue or ideological groups
##     J7400: Women's issues
## gave_to_department 
##     PACS: Peace & Conflict Studies
##     EGP: Emma Goldman Papers Project
##     PFA: Pacific Film Archives
## has_interest 
##     POL: Politics
##     PCY: Public Policy
##     WOM: Women
##     DIV: Diverse Constituencies