doctorm

Published: Maienschein’s Mammoth Campaign Cash Haul

Link: http://www.voiceofsandiego.org/topics/government/sacramento-report-maienscheins-mammoth-campaign-cash-haul/

I was asked by the Voice of San Diego to do a little bit of digging on Republican State Assemblyman Brian Maienschein. The reporter was looking at his campaign contributions and she noticed that a lot of the names that popped up looked like healthcare companies. She wanted my help figuring out what percentage of the donors were actually from the healthcare industry and I was happy to oblige. I first went to the California Secretary of State’s CalAccess repository for campaign and lobbyist filings. These things were kind of a beast, just file after file of delimited text files to herk through. The documentation was really not stellar, and it took a lot of guessing and checking to make any sense of it. After taking some time to figure out what was going on, I found a file that looked to be a list of registered campaign donors. Unfortunately, I immediately renamed the file that I used to “registration.tsv” because it had a weird code as a filename but I didn’t write down the original filename, so I can’t tell you which one I used. Likewise, I got Maienschein’s donor file from the Voice already relabelled “donors.csv”.

Sloppy work on my part, but if you’re interested in following along, the datasets are available on my Google Drive located here.

We’ll read the two data files in now.

library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
donors <- read.csv("export.csv", header = TRUE)
otherFile <- read.delim("Registration.TSV", header = TRUE)

Now luckily, the donors file has an industry category for each donor, as we can see here under IND_CLASS

str(otherFile)

Using context clues I figured that HEA stands for health related filings. Let’s pull those guys out now.

## Pull full listings for each pharma comp. Forgive the goofball code.
health2doods <- unique(otherFile$FILER_NAML[which(otherFile$IND_CLASS == "HEA")])
## The donors are in all caps on the Mainschean donor file, so these will have to be too.
healthyChili <- toupper(health2doods)

Now we can see which of these donors pop up in both lists, we just do this lil ditty

firstBatch <- donors[which(donors$NAME.OF.CONTRIBUTOR %in% healthyChili),]

So here we’ve got some good immediate findings but it doesn’t look quite right. The first thing that jumps out at me is it’s missing a lot of the various trade association PACs, like the California Association of Elbow Psychiatrists or whatever. Why this happened seems to boil down to three main causes:

  1. In consistent conventions aroung the word “California”. Some in each list abbreviate it as “CAL”, some don’t, some add a period. Either way, no bueno.
  2. Some put the initials of the PAC after the listing, some don’t.
  3. Some donors didn’t list an IND_CLASS when they registered with the state.

How do we fix this? I don’t think there’s a perfect way to do it, but the blunt instrument I’m using is regular expressions. I’m gonna look through the donor file with a list of generic healthcare related keywords like “HEALTH”, “DOCTOR”, and “INSURANCE”. Let’s give that a looksie.

r <- list()
keywords <- c("+HEALTH+", "+PHYSICIAN+", "+PHARMA+", "+SURGERY", "+PHYS+", "+MED+", "+CARE", "+DOCTOR+","+INSURANCE+","+DENTAL+", "+DENTIST+", "+NURSE+", "+SURGEON+","+HOSPITAL+", "+MEDICAL+","+PATIENT+", "AMBU+", "ORTH+", "THERAPY", "PSYCH+")

for(i in keywords){
    q <- grep(i,donors$NAME.OF.CONTRIBUTOR)
    r <- c(r,q)
}

targets <- unique(unlist(r))

secondBatch <- donors[targets,]

secondBatch$NAME.OF.CONTRIBUTOR
##   [1] TENET HEALTHCARE CORPORATION                                 
##   [2] COMPREHENSIVE HEALTH MANAGEMENT INC.                         
##   [3] HEALTH NET, INC.                                             
##   [4] MOLINA HEALTHCARE INC.                                       
##   [5] CAL. ASSOC. HEALTH UNDERWRITERS PAC                          
##   [6] CAL. ASSOC. OF HEALTH PLANS PAC                              
##   [7] CAL. ASSOCIATION OF HEALTH FACILITIES PAC                    
##   [8] HEALTH NET, INC.                                             
##   [9] PRIME HEALTHCARE SERVICES INC.                               
##  [10] CAL. ASSOC. OF HEALTH PLANS PAC                              
##  [11] UNITED HEALTH GROUP INC.                                     
##  [12] CAL. ASSOC. HEALTH UNDERWRITERS PAC                          
##  [13] CAL. ASSOCIATION OF HEALTH FACILITIES PAC                    
##  [14] MOLINA HEALTHCARE INC.                                       
##  [15] MOLINA HEALTHCARE INC.                                       
##  [16] CAL. ASSOC. OF HEALTH PLANS PAC                              
##  [17] PRIME HEALTHCARE SERVICES INC.                               
##  [18] CAL. ASSOC. OF HEALTH PLANS PAC                              
##  [19] TENET HEALTHCARE CORPORATION                                 
##  [20] UNITED HEALTH GROUP INC.                                     
##  [21] HEARING HEALTHCARE PROVIDERS PAC                             
##  [22] CAL. ASSOCIATION OF HEALTH FACILITIES PAC                    
##  [23] COMPREHENSIVE HEALTH MANAGEMENT INC.                         
##  [24] SEIU UNITED HEALTHCARE WORKERS WEST PAC                      
##  [25] EMERGENCY MEDICAL PAC (AMERICAN COLLEGE EMERGENCY PHYSICIANS)
##  [26] CAPG PHYSICIAN GROUP PAC                                     
##  [27] EMERGENCY MEDICAL PAC (AMERICAN COLLEGE EMERGENCY PHYSICIANS)
##  [28] CALIFORNIA ACADEMY OF PHYSICIANS ASSISTANTS (CAPA)           
##  [29] OSTEOPATHIC PHYSICIANS & SURGEONS CA PAC                     
##  [30] OSTEOPATHIC PHYSICIANS & SURGEONS CA PAC                     
##  [31] COOPERATIVE OF AMERICAN PHYSICIANS STATE PAC                 
##  [32] CAL. ACADEMY OF EYE PHYSICIANS & SURGEONS PAC                
##  [33] CALIFORNIA ACADEMY OF PHYSICIANS ASSISTANTS (CAPA)           
##  [34] CAL. ACADEMY OF FAMILY PHYSICIANS PAC                        
##  [35] OSTEOPATHIC PHYSICIANS & SURGEONS CA PAC                     
##  [36] CAPG PHYSICIAN GROUP PAC                                     
##  [37] TAKEDA PHARMACEUTICALS                                       
##  [38] ASTELLAS PHARMA US INC.                                      
##  [39] CAL. PHARMACISTS PAC                                         
##  [40] PHARMACEUTICAL RESEARCH & MANUFACTURERS ASSN OF AMERICA PAC  
##  [41] PHARMACY PROFESSIONALS OF CAL PAC                            
##  [42] NOVARTIS PHARMACEUTICALS CORP.                               
##  [43] ASTELLAS PHARMA US INC.                                      
##  [44] PHARMACEUTICAL RESEARCH & MANUFACTURERS ASSN OF AMERICA PAC  
##  [45] VERTEX PHARMACEUTICALS INC.                                  
##  [46] ASTELLAS PHARMA US INC.                                      
##  [47] CAL. AMBULATORY SURGERY ASSOCIATION PAC                      
##  [48] CAL. AMBULATORY SURGERY ASSOCIATION PAC                      
##  [49] CAL. AMBULATORY SURGERY ASSOCIATION PAC                      
##  [50] CAL. PHYSICAL THERAPY PAC (CAL PT PAC)                       
##  [51] CAL. PHYSICAL THERAPY PAC (CAL PT PAC)                       
##  [52] ADVAMED CALIFORNIA PAC                                       
##  [53] CAL. VETERINARY MEDICAL ASSOC. PAC                           
##  [54] CAL. MEDICAL ASSOC. PAC                                      
##  [55] ANESTHESIA SERVICE MEDICAL GROUP ADVOCACY FUND               
##  [56] CAL. MEDICAL ASSOC. PAC                                      
##  [57] CALIFORNIA MEDICAL ASSOCIATION (SCC)                         
##  [58] CAL. VETERINARY MEDICAL ASSOC. PAC                           
##  [59] MEDICAL INSURANCE EXCHANGE OF CALIFORNIA                     
##  [60] CALIFORNIA MEDICAL ASSOCIATION (SCC)                         
##  [61] CALIFORNIA MEDICAL ASSOCIATION (SCC)                         
##  [62] CALIFORNIA MEDICAL ASSOCIATION (SCC)                         
##  [63] AMERICAM MEDICAL RESPONSE  (INKIND)                          
##  [64] DAVITA - TOTAL RENAL CARE                                    
##  [65] CAREMARK RX INC.                                             
##  [66] DAVITA - TOTAL RENAL CARE                                    
##  [67] DOCTORS COMPANY PAC                                          
##  [68] DOCTORS COMPANY PAC                                          
##  [69] INDEPENDENT INSURANCE PAC                                    
##  [70] NATIONAL ASSOC. OF INSURANCE & FINANCIAL ADVISORS CA PAC     
##  [71] PERSONAL INSURANCE FEDERATION OF CA AGENTS & EMPLOYEES PAC   
##  [72] ALLSTATE INSURANCE COMPANY                                   
##  [73] PACIFIC ASSOCIATION OF DOMESTIC INSURANCE COMPANIES PAC      
##  [74] NATIONAL ASSOC. OF INSURANCE & FINANCIAL ADVISORS CA PAC     
##  [75] PERSONAL INSURANCE FEDERATION OF CA AGENTS & EMPLOYEES PAC   
##  [76] AMERICAN INSURANCE ASSOCIATION PAC                           
##  [77] FIRST AMERICAN TITLE INSURANCE COMPANY                       
##  [78] CSAA INSURANCE SERVICES, INC.                                
##  [79] ALLSTATE INSURANCE COMPANY                                   
##  [80] INDEPENDENT INSURANCE PAC                                    
##  [81] ASSOC. OF CALIFORNIA INSURANCE COMPANIES PAC                 
##  [82] PERSONAL INSURANCE FEDERATION OF CA AGENTS & EMPLOYEES PAC   
##  [83] CALIFORNIA DENTAL PAC (SCC)                                  
##  [84] ACCESS DENTAL PLAN                                           
##  [85] CAL. ASSOCIATION OF DENTAL PLANS (PAC)                       
##  [86] CALIFORNIA DENTAL PAC (SCC)                                  
##  [87] WESTERN DENTAL  SERVICES                                     
##  [88] CALIFORNIA DENTAL PAC (SCC)                                  
##  [89] CAL. ASSOCIATION OF DENTAL PLANS (PAC)                       
##  [90] CAL. SOCIETY OF PLASTIC SURGEONS PAC                         
##  [91] CAL. HOSPITAL ASSOCIATION PAC                                
##  [92] CAL. HOSPITAL ASSOCIATION PAC                                
##  [93] CAL. HOSPITAL ASSOCIATION PAC                                
##  [94] CAL. HOSPITAL ASSOCIATION PAC                                
##  [95] CALIFORNIANS ALLIED FOR PATIENT PROTECTION PAC               
##  [96] CALIFORNIANS ALLIED FOR PATIENT PROTECTION PAC               
##  [97] CAL. AMBULANCE ASSOC. PAC                                    
##  [98] BP NORTH AMERICA EMPLOYEE FEDERAL PAC                        
##  [99] CAL. ORTHOPAEDIC ASSN PAC                                    
## [100] CAL. ORTHOTIC & PROSTHETIC ASSOC. PAC                        
## [101] BP NORTH AMERICA EMPLOYEE FEDERAL PAC                        
## [102] PHILIPPS ELECTRONICS NORTH AMERICA PAC                       
## [103] OCCUPATIONAL THERAPY ASSOCIATION OF CA PAC                   
## [104] CALIFORNIA PROTON THERAPY CENTER                             
## [105] CAL. PSYCHIATRIC PAC                                         
## 252 Levels: 6BEDS PAC 7 - ELEVEN INC. A PLACE FOR MOM ABBVIE ... YOCHA DEHE WINTUR NATION

Well would you look at that, there’s all our associations. Now we bind and remove duplicates.

healthDonors <- rbind(firstBatch,secondBatch)
healthDonors <- distinct(healthDonors)
## Only two duplicates, nice.

Great, so using our rough strokes, we stripped out 126 donors. The original set was 441, meaning we’re already hanging at a little over 1/4th of donations. That’s quite a lot, but I want to be sure we got everyone. I’m gonna call the list of everyone not in my sample and eyeball it. We’re lucky we have a fairly small dataset here.

unique(donors$NAME.OF.CONTRIBUTOR[-which(donors$NAME.OF.CONTRIBUTOR %in% healthDonors$NAME.OF.CONTRIBUTOR)])
##   [1] EISAI INC.                                                               
##   [2] CASE PAC (CA ATTORNEYS ADMIN LAW JUDGE HEARING OFFICERS STATE EMPLOYMENT)
##   [3] CENTENE MANAGEMENT COMPANY LLC                                           
##   [4] CALIFORNIA BUILDING INDUSTRY ASSOC. PAC                                  
##   [5] AT&T INC. AND ITS AFFILIATES (CAL)                                       
##   [6] DEL MAR THOROUGHBRED CLUB                                                
##   [7] BIOCOM PAC                                                               
##   [8] CAL. MANUFACTURERS & TECHNOLOGY ASSOC. APC                               
##   [9] SOUTHERN WINE & SPIRITS OF AMERICA INC.                                  
##  [10] CAL. NEW CAR DEALERS ASSOC. PAC                                          
##  [11] FAIRPAC - CIVIL JUSTICE ASSOC. OF CAL                                    
##  [12] ASSOCIATED GENERAL CONTRACTORS PAC                                       
##  [13] FARM PAC                                                                 
##  [14] ATRIA MANAGEMENT COMPANY                                                 
##  [15] CAL. ASSOC. OF PROFESSIONAL LIABILITY  INSURERS PAC                      
##  [16] ALLERGAN USA INC.                                                        
##  [17] CAL. REFUSE RECYCLING COUNCIL SOUTH PAC                                  
##  [18] STUART A COHEN                                                           
##  [19] SUNOVION                                                                 
##  [20] AGUA CALIENTE BAND OF CAHUILLIA INDIANS                                  
##  [21] CHEVRON                                                                  
##  [22] SYCUAN BAND OF THE KUMEYAAY NATION                                       
##  [23] HEWLETT-PACKARD COMPANY                                                  
##  [24] CAL. RADIOLOGICAL PAC                                                    
##  [25] CAL. MORTGAGE ASSOCIATION PAC                                            
##  [26] CONSUMER ATTORNEY'S PAC                                                  
##  [27] KPMG LLP                                                                 
##  [28] CAL. ASSOCIATION FOR BEHAVIOR ANALYSIS PAC                               
##  [29] WALGREENS                                                                
##  [30] CAL. RESTAURANTS ASSOCIATION                                             
##  [31] AFFORDABLE HOUSING PAC                                                   
##  [32] CAL. CREDIT UNION LEAGUE PAC                                             
##  [33] BNSF RAILWAY COMPANY                                                     
##  [34] SANOFI US SERVICES INC. EMPLOYEESS PAC                                   
##  [35] EDISON INTL - SOCAL EDISON                                               
##  [36] CAL. PROFESSIONAL FIREFIGHTERS PAC (SCC)                                 
##  [37] CAL. ASSOC. HIGHWAY PATROLMEN PAC                                        
##  [38] CAL. BANKERS ASSOCIATION STATE PAC                                       
##  [39] SEMPRA ENERGY                                                            
##  [40] GEICO DIRECT                                                             
##  [41] CAL. INDEPENDENT TELEPHONE                                               
##  [42] FOSTER POULTRY FARMS                                                     
##  [43] CAL. PAWNBROKERS ASSOC. PAC                                              
##  [44] CHAMBERPAC - SCC                                                         
##  [45] CALIFORNIA APARTMENT ASSOCIATION  PAC                                    
##  [46] PHILLIPS 66 COMPANY                                                      
##  [47] CAL. POULTRY FEDERATION STATE PAC                                        
##  [48] PEACE OFFICERS RESEARCH ASSOCIATION OF CAL PAC SCC                       
##  [49] CAL. CONFERENCE BOARD AMALGATED TRANSIT UNION                            
##  [50] HOWARD JARVIS TAXPAYERS ASSOC. (SCC)                                     
##  [51] PALA BAND OF MISSION INDIANS                                             
##  [52] BAYBIO PAC                                                               
##  [53] CAPPS- INDEPENDENT COALITION OF EDUCATORS                                
##  [54] CCA - CORRECTIONS CORP. OF AMERICA                                       
##  [55] SAN DIEGO COUNTY APARTMENT ASSOC. PAC                                    
##  [56] JOHNSON & JOHNSON PAC (FED)                                              
##  [57] CAL. GROCERS ASSOC. PAC                                                  
##  [58] 7 - ELEVEN INC.                                                          
##  [59] CAL. CORRECTIONAL PEACE OFFICERS ASSOC. PAC                              
##  [60] CAL. DEFENSE COUNSEL PAC                                                 
##  [61] STATE BUILDING & CONSTRUCTION TRADES COUNCIL OF CAL PAC (SCC)            
##  [62] BUILDING OWNERS & MANAGERS ASSOCIATION OF CAL PAC                        
##  [63] TRACFONE WIRELESS,INC.                                                   
##  [64] APARTMENT ASSOCIATION OF GREATER LOS ANGELES PAC                         
##  [65] THE CLOROX COMPANY                                                       
##  [66] ANTHEM BLUE CROSS                                                        
##  [67] DISNEY WORLDWIDE SERVICES INC.                                           
##  [68] CAL. AMERICAN COUNCIL OF ENGINEERING COMPANIES                           
##  [69] LEADINGAGE CALIFORNIA PAC                                                
##  [70] DELOITTE SERVICES LP                                                     
##  [71] CAL. LAND TITLE ASSOC. PAC                                               
##  [72] ENCORE CAPITAL GROUP INC.                                                
##  [73] CAL. MANUFACTURED HOUSING PAC                                            
##  [74] AMERISOURCEBERGEN SERVICES CORPORATION                                   
##  [75] ABBVIE PAC                                                               
##  [76] SEAWORLD PARKS & ENTERTAINMENT INC.                                      
##  [77] BRIDGEPOINT EDUCATION,INC.                                               
##  [78] S&F MANAGEMENT COMPANY LLC                                               
##  [79] ENSIGN FACILITY SERVICES, INC.                                           
##  [80] DONALD DALEY                                                             
##  [81] MALIN BURNHAM                                                            
##  [82] AMGEN INC. STATE GOVERNMENT AFFAIRS                                      
##  [83] WESTERN UNITED DAIRYMEN STATE PAC                                        
##  [84] SPRINT                                                                   
##  [85] MCDONALDS CALIFORNIA OPERATORS PAC                                       
##  [86] PHILLIP JELSMA                                                           
##  [87] MR. ROBERT RAUCH                                                         
##  [88] MR. ANDREW BERG                                                          
##  [89] MR. TERRY ARNETT                                                         
##  [90] ENTERPRISE HOLDINGS INC FEDERAL PAC                                      
##  [91] FEDERAL EXPRESS PAC                                                      
##  [92] BARONA BAND OF MISSION INDIANS                                           
##  [93] NOSSAMAN LLP                                                             
##  [94] FARMERS GROUP INC.                                                       
##  [95] MICROSOFT                                                                
##  [96] VIEJAS TRIBAL ACCOUNT                                                    
##  [97] VIDEO GAME IMPACT, INC.                                                  
##  [98] ELLIOT FEUERSTEIN                                                        
##  [99] MICHAEL W. MURPHY                                                        
## [100] PEPSICO INC.                                                             
## [101] COX COMMUNICATIONS                                                       
## [102] PHILIP MORRIS USA INC (ALTRIA)                                           
## [103] WESTSIDE SOBER LIVING CENTERS, INC.                                      
## [104] GILEAD SCIENCES INC.                                                     
## [105] MS. AMY EPSTEN                                                           
## [106] CAL. CATTLEMAN'S ASSOCIATION                                             
## [107] COMCAST FINANCIAL AGENCY CORP.                                           
## [108] PECHANGA BAND OF LUISENO INDIANS                                         
## [109] YOCHA DEHE WINTUR NATION                                                 
## [110] CAL. BEER & BEVERAGE DISTRIBUTORS COMMUNITY AFFAIRS                      
## [111] QUALCOMM INC.                                                            
## [112] KOCH INDUSTRIES                                                          
## [113] RITE AID                                                                 
## [114] B. WAYNE HUGHES, JR.                                                     
## [115] PG&E CORPORATION                                                         
## [116] AMERICAN CHEMISTRY COUNCIL                                               
## [117] EXXON MOBIL CORPORATION                                                  
## [118] PRUDENTIAL FINANCIAL INC.STATE FEDERAL PAC                               
## [119] GREENBERGTRAURIG LLP                                                     
## [120] ADT LLC                                                                  
## [121] ASTRAZENECA                                                              
## [122] WAL-MART STORES, INC.                                                    
## [123] SAN MANUEL BAND OF MISSION INDIANS                                       
## [124] ANHEUSER BUSCH COMPANIES                                                 
## [125] CAL. HOTEL & LODGING ASSOCIATION PAC                                     
## [126] DISH                                                                     
## [127] CAL. CABLE & TELECOMMUNICATIONS ASSN PAC                                 
## [128] GLAXOSMITH KLINE                                                         
## [129] CAL. ASSOCIATION OF WINEGRAPE GROWERS STATE PAC                          
## [130] PACIFIC LIFE                                                             
## [131] FACEBOOK INC.                                                            
## [132] FOX GROUP AND AFFILIATED ENTITTIES                                       
## [133] HARTFORD ADVOCATES FUND, THE                                             
## [134] FORD MOTOR COMPANY CIVIC ACTION FUND                                     
## [135] CHARTER SCHOOLS PAC                                                      
## [136] VERIZON COMMUNICATIONS INC. GOOD GOVERNMENT CLUB CA                      
## [137] CLOROX COMPANY                                                           
## [138] CALIFORNIA REAL ESTATE PAC (CREPAC ) (SCC)                               
## [139] WESTERN MANUFACTURED HOUSING COMMUNITIES ASSN PAC                        
## [140] CATERPILLAR EMPLOYEES PAC                                                
## [141] ELI LILLY AND COMPANY                                                    
## [142] OAK TREE RACING ASSOCIATION                                              
## [143] RECORDING INDUSTRY ASSOC. OF AMERICA                                     
## [144] CAL. INDEPENDENT PETROLEUM ASSOC. PAC                                    
## [145] REPUBLIC SERVICES, INC.                                                  
## [146] UNITED PARCEL SERVICE PAC                                                
## [147] NATIONAL DRIVE COMMITTEE (FED PAC)                                       
## [148] CALIFORNIA ASSOCIATION OF MARRIAGE & FAMILY THERAPISTS PAC               
## [149] GREATER ANESTHESIA SERVICE (GAS) PAC                                     
## [150] CAL. MORTGAGE BANKERS ASSOCIATION PAC                                    
## [151] ALTICOR INC.                                                             
## [152] SAN DIEGO CREDIT UNIONS PAC                                              
## [153] RAI SERVICES COMPANY                                                     
## [154] TIME WARNER CABLE                                                        
## [155] SOUTHWEST REGIONAL COUNCIL OF CARPENTERS POLITICAL ACTION FUND (SCC)     
## [156] DAIICHI SANKYO INC.                                                      
## [157] 6BEDS PAC                                                                
## [158] CALIFORNIA LIFE SCIENCES ASSOC. PAC                                      
## [159] CAL. STATEWIDE LAW ENFORCEMENT ASSOC. PAC (CSLEA)                        
## [160] CAL. ASSOCIATION OF LICENSED INVESTIGATORS PAC                           
## [161] MR. ROGER BALL                                                           
## [162] WINE INSTITUTE CALIFORNIA PAC                                            
## [163] JPMORGAN CHASE & CO. PAC (FEDERAL)                                       
## [164] JACK IN THE BOX                                                          
## [165] GOOGLE, INC.                                                             
## [166] PRICEWATERHOUSECOOPERS LLP                                               
## [167] ERNST & YOUNG LLP CAL PAC                                                
## [168] SEAWORLD PARKS & ENTERTAINMENT INC. (SWBG OPERATIONS)                    
## [169] E & B NATURAL RESOURCES MANAGEMENT CORP                                  
## [170] CALCOM PAC                                                               
## [171] CAL. NEVADA SOFT DRINK ASSOCIATION PAC                                   
## [172] CAL. ASSISTED LIVING ASSOCIATION PAC                                     
## [173] PROFESSIONAL FIDUCIARY ASSOC. OF CA PAC (PFAC-PAC)                       
## [174] ENTERTAINMENT SOFTWARE ASSOCIATION                                       
## [175] CAL. CHIROPRACTIC ASSOC. PAC                                             
## [176] CALTRAVEL ASSOCIATION PAC                                                
## [177] VISA                                                                     
## [178] CAL. INDEPENDENT OIL MARKETERS                                           
## [179] DAVID MEYER                                                              
## 252 Levels: 6BEDS PAC 7 - ELEVEN INC. A PLACE FOR MOM ABBVIE ... YOCHA DEHE WINTUR NATION

Looks like we did pretty well, but we missed some heavy hitters like GLAXOSMITH KLINE, ASTRAZENECA, ELI LILLY and BIOCOM. Can’t say I’m sure why they’ve escaped our net, but such is life. Luckily, we need only add them in.

ooohImeesed <- donors[which(donors$NAME.OF.CONTRIBUTOR %in% c("ELI LILLY AND COMPANY", "GREATER ANESTHESIA SERVICE (GAS) PAC", "RITE AID", "ANTHEM BLUE CROSS", "CAL. ASSOCIATION FOR BEHAVIOR ANALYSIS PAC", "SUNOVIAN", "GLAXOSMITH KLINE", "ASTRAZENECA",  "BIOCOM PAC")), ]
finalmente <- rbind(healthDonors, ooohImeesed)
cashRules <- gsub("$","", as.character(finalmente$AMOUNT), fixed=TRUE)
everything <- gsub(",","", cashRules, fixed=TRUE)
AroundMe <- as.numeric(everything)
## That was an extra step to fulfill my dumb Wu Tang joke. Father forgive me.
finalmente$AMOUNT <- AroundMe
## Again!
cashRules1 <- gsub("$","", as.character(donors$AMOUNT), fixed=TRUE)
everything1 <- gsub(",","", cashRules1, fixed=TRUE)
AroundMe1 <- as.numeric(everything1)
donors$AMOUNT <- AroundMe1
## A Better Tomorrow fam
allCash <- donors$AMOUNT
healthCash <- finalmente$AMOUNT

So, in all we have 140 of 441 donations coming from the Healthcare and Insurance industries, broadly defined. These industries account for 81 of 252 unique contributors, or 32%. They’ve donated a total of $228,024.50, which constitutes for 33% of the $692,022.70 donated in total. Now we’ll prep it for a nice interactive chart.

donors$CLASS <- ifelse(donors$NAME.OF.CONTRIBUTOR %in% finalmente$NAME.OF.CONTRIBUTOR, donors$CLASS <- "HEALTHCARE", donors$CLASS <- "OTHER")

insurance <- grep("INSURANCE", donors$NAME.OF.CONTRIBUTOR)

donors$CLASS[insurance] <- "INSURANCE"

And here’s a link to the Tableau viz.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s