Background

Looked into using API, but the API and codes are for candidates; may be useful to look at which groups donated to candidates that sponsored certain bills…

Importing data: From Data Dictionary:

https://www.opensecrets.org/resources/datadictionary/UserGuide.pdf

Opensecrets methodology: https://www.opensecrets.org/federal-lobbying/methodology

I had to edit the datasets because they are separated by |,| and R doesn’t allow you to import it that way; The first column is only separated by a “,|” and the final column ends with “|”. I did a find and replace with an “;”, starting for “|,|” then “,|” and then “|”. I am not sure I needed the final ; …. I think I could have done a replace with a space, because it imported an empty column. Datasets ending with "_rev" are the cleaned datasets.

Industry dataset and lob_lobbying I cleaned a little different because they have numeric variables. It starts with a “|” and ends with a “|”…but there are dollar amounts so did replace all “|,|” = “;” then “|,” = “;” then “|,” = “;” then “|” with space.

I got variable names from the documentation and did a separate function to add those in after import.

SI_ID = table id

The purpose of this project is to determine there has been a meaningful or notable change in lobbying activity on “alcohol and drug abuse” policy.

H1: There will be spikes in lobbying activity by health industry actors prior to the following laws…

  1. H.R. 6, the Substance Use-Disorder Prevention that Promotes Opioid Recovery and Treatment (SUPPORT) for Patients and Communities Act of 2018, was made law to address the nation’s opioid overdose epidemic.

  2. In December 2016, the 21st Century Cures Act was signed into law. The Cures Act addresses many critical issues including leadership and accountability for behavioral health disorders at the federal level, the importance of evidence-based programs and prevention of mental and substance use disorders, and the imperative to coordinate efforts across government.

  3. The Comprehensive Addiction and Recovery Act (CARA) of 2016 authorizes over $181 million each year (must be appropriated each year) to respond to the epidemic of opioid abuse, and is intended to greatly increase both prevention programs and the availability of treatment programs.

  4. 2010 - ACA, had special protections for persons with SUD.

  5. The Mental Health Parity and Addiction Equity Act of 2008 requires insurance groups offering coverage for mental health or substance use disorders to make these benefits comparable to general medical coverage.The Americans with Disabilities Act (ADA) of 1990, as amended in 2008, establishes requirements for equal opportunities in employment, state and local government services, public accommodations, commercial facilities, transportation, and telecommunications for citizens with disabilities—including people with mental illnesses and addictions.

  6. The STOP Act of 2006 authorized:

A grant program providing additional funds to current or former grantees under the Drug Free Communities Act of 1997 to prevent and reduce alcohol use among youth ages 12-20

  1. The Children’s Health Act of 2000 (PDF | 531 KB) reauthorizes SAMHSA programs that work to improve mental health and substance abuse services for children and adolescents. It also provides SAMHSA the authority to implement proposals that give U.S. states more flexibility in how they use block grant funds, with accountability based on performance. The Act also allows SAMHSA to consolidate discretionary grant authorities, which provides the Secretary of HHS with more flexibility to respond to individuals and communities in need of mental health and substance abuse services. It also provides a waiver from the requirements of the Narcotic Addict Treatment Act, allowing qualified physicians to dispense (and prescribe) Schedule III, IV, or V narcotic drugs, or combinations of such drugs, approved by the Food and Drug Administration (FDA) to treat heroin addiction. Additionally, the Act provides a comprehensive strategy to combat methamphetamine use.

H2: The number of health industry/medical actors will have increased over time, especially medical providers and pharmaceutical companies

H3: The $$ spent on lobbying on the health side will have increased over time

H4: The number of prison/law enforcement group actors will have decreased over time

H5: Decrease in the $$ spent on lobbying by law enforcement actors over time

H6: Increased lobbying of DEA and FDA during the Opioid Crisis

Datasets

Primary dataset is the Lobbying (No Specific Issues) dataset (referred to as “main”). It has all the info that we need except for issue and agency.

library(readr)
#Main
main <- read_delim("C:/Users/talee/Dropbox/1-Research/drug policy and interest groups/Lobbying Data/lob_lobbying_rev.txt", 
    ";", escape_double = FALSE, col_names = FALSE, 
    trim_ws = TRUE)
## Rows: 1255455 Columns: 18
## -- Column specification --------------------------------------------------------
## Delimiter: ";"
## chr (18): X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14, X15, ...
## 
## i Use `spec()` to retrieve the full column specification for this data.
## i Specify the column types or set `show_col_types = FALSE` to quiet this message.
colnames(main)<-c("Uniqid","Registrant_raw","Registrant","Isfirm","Client_raw","Client","Ultorg","Amount","Catcode","Source","Self","IncludeNSFS","Use","Ind","Year","Type","Typelong","Affliate")

#Issue Dataset (No Specific Issue)
issue <- read_delim("C:/Users/talee/Dropbox/1-Research/drug policy and interest groups/Lobbying Data/lob_issue_NoSpecficIssue_rev.txt", ";", escape_double = FALSE, col_names = FALSE, trim_ws = TRUE)
## Rows: 2647672 Columns: 6
## -- Column specification --------------------------------------------------------
## Delimiter: ";"
## chr (3): X2, X3, X4
## dbl (2): X1, X5
## lgl (1): X6
## 
## i Use `spec()` to retrieve the full column specification for this data.
## i Specify the column types or set `show_col_types = FALSE` to quiet this message.
colnames(issue)<-c("SI_ID","Uniqid","IssueID","Issue","Year")

#Agency
agen <-read_delim("C:/Users/talee/Dropbox/1-Research/drug policy and interest groups/Lobbying Data/lob_agency_rev.txt", ";", escape_double = FALSE, col_names = FALSE, trim_ws = TRUE)
## Rows: 3630742 Columns: 3
## -- Column specification --------------------------------------------------------
## Delimiter: ";"
## chr (3): X1, X2, X3
## 
## i Use `spec()` to retrieve the full column specification for this data.
## i Specify the column types or set `show_col_types = FALSE` to quiet this message.
colnames(agen)<-c("Uniqid","AgencyID","Agency")
## Don't need this code anymore the dataset above is sufficient.
#Lobbying Issue Specific Dataset -- Would love to use this but the structure of the data makes it very difficult to import. There is an inconsistent # of specific issues for each observation
library(readr)
spec_issue <- read_delim("C:/Users/telsabawi/Dropbox/1-Research/drug policy and interest groups/Lobbying Data/lob_issue_rev.txt",
    ";", escape_double = FALSE, col_names = FALSE, 
    trim_ws = TRUE)

colnames(issue)<-c("SI_ID","Uniqid","IssueID","Issue","SpecificIssue","Year")


#Change Year variables to categorical
issue$Year <- as.factor(issue$Year)
main$Year <- as.factor(main$Year) 
indus$Year <- as.factor(indus$Year)

There are major issues with the underlying data that need to be addressed in order to decrease noise caused by external factors (like the changes in reporting requirements). “Specifically, Each series exhibits a similar trend: steady increases between 1998 and 2009, a high in 2009, and a rapid decline through 2012. They then hold flat from 2012 to 2017 with slight increases in 2018.” ( See LDA at 20) Authors of LDA at 20 suggest creating two separate comparisons before and after 2009 (pg. 266), but this article takes a different approach by using the total number as a control the alchol and drug abuse (ada) specific lobbying.

For counting the number of organizations lobbying on a specific issue, we can deal with the redundancy problem by counting by “client” instead of by report. If you only want to count the issue only once per client, then write the script to count only once per client. OR perhaps, its not bad to county multiple reports because it may mean that the group put in more resources (hired a lobbyiest, and had one of their own people work on it etc). Unclear if a separate report is filed if they lobby agencies ????????

To deal with the redundant data problem for amount spent…you could match lobbyists to client and then subtract the amount the lobbyists say they were paid from the amount the client said that they paid overall…????????

**Need to check to see when acholol and drug abuse were added as an issue because the types of issues that can be selected has changed over time…

Merge Datasets

The variable ‘Uniqid’ is shared by the “Lobbying,” “Lobbyists,” “Lobby issues”, “Agency”, “Lobbying specific issues” datasets. Uniqid is a unique number given to each filed LDA form. - the merge() function in R combines data based on common columns and would be appropriate for this application. In most cases, you join two data frames by one or more common key variables (in this case, ‘Uniqid’). It should be as follows:

merge(data frameA,data frameB,by.x=“Uniqid”)

I realized that I couldnt merge agency with the other datasets because the UniqueId (report) appears multiple times. There is a entry for each agency.So you could use that data to see who is lobbying which agency and how much those groups spend on lobbying, but you can’t combine it with the other datasets because it will add the amount for every agency. (E.g. if one company lobbied FDA and DEA and they spent $20,000 on lobbying total, there will be two entries for $20k, one listing the FDA and the other listing the DEA)

REPORTS WILL HAVE REDUNDANT INFORMATION. A lobbying firm could register on behalf of the client and report the amount that they earned and the client can register and include the amount that they paid the firm in their overall expenses. Also, in some rare circumstances the entire net income of an organization is used as the lobbying amount… (See the LDA at 20 ).

“The Ins and Outs of Calculating Lobbying Totals by Industry We use the individual expenditures in the lobbying table to calculate the total in the lobbying industries table. In most cases it is a straight forward scenario where you just take in account the ind=y. It is more complicated for cases where registrants include their non self filer subsidiaries’ activities (IncludeNSFS=y). For those, we examine the catcode of the parent and the catcode of the subsidiary (self = c and self =b). If they are from different industries then we subtract the total of the subsidiary from the total of the parent and count it toward the other industry. For example look a General Electric in 2007. IncludeNSFS signifies whether a filer includes expenditures from its own self filing. A value of”n’ means that the parent company does include the lobbying expenditures of its subsidiaries in its disclosure form and thus, the expenditures reported by subsidiaries should not be included in the total sum. Conversely, a value of “y” would mean the parent company’s disclosure report does not capture the lobbying expenditures of its subsidiaries and any expenditures by the subsidiaries should be added in addition to the parent companies lobbying expenditures. The field is also used to indicate if the filer is a subcontractor (making business on behalf of) with the “s” value. "

#Merging Data
combined2 <- merge(main, issue, by=c("Uniqid","Year")) # This combines the groups and issue by Uniqid and Year
## Warning: One or more parsing issues, see `problems()` for details
rm(issue)
rm(main)#Made room in the global environment by removing all of these extra datasets and it was still to big to merge...

I was able to merge all datasets.

Now I need to calculate the response variables of interest…

  1. Amount of money spent (minus the redundancies)

Summary Statistics

summary(combined2)
##     Uniqid              Year           Registrant_raw      Registrant       
##  Length:2285510     Length:2285510     Length:2285510     Length:2285510    
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##     Isfirm           Client_raw           Client             Ultorg         
##  Length:2285510     Length:2285510     Length:2285510     Length:2285510    
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##     Amount            Catcode             Source              Self          
##  Length:2285510     Length:2285510     Length:2285510     Length:2285510    
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##  IncludeNSFS            Use                Ind                Type          
##  Length:2285510     Length:2285510     Length:2285510     Length:2285510    
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##    Typelong           Affliate             SI_ID           IssueID         
##  Length:2285510     Length:2285510     Min.   :    419   Length:2285510    
##  Class :character   Class :character   1st Qu.: 782526   Class :character  
##  Mode  :character   Mode  :character   Median :1529336   Mode  :character  
##                                        Mean   :1468007                     
##                                        3rd Qu.:2170687                     
##                                        Max.   :2776133                     
##     Issue              NA         
##  Length:2285510     Mode:logical  
##  Class :character   NA's:2285510  
##  Mode  :character                 
##                                   
##                                   
## 

Need to remove 2021 because it is not complete

combined2<-subset(combined2, Year!="2021") #removed 2021 because it is not complete
## CODE NO LONGER NEEDED AFTER i MERGED DATASET BY BOTH UNIQ AND YEAR
#Checking to make sure the year variables match up so that I can remove the duplicative columns and clean up the data
combined$Year.x <- as.numeric(combined$Year.x)#Changing this variable into a factor since the other year is a factor variable
is.factor(combined$Year.x) #checking to make sure it isn't still a factor
combined$Year.y <- as.numeric(combined$Year.y)
identical(combined$Year.y, combined$Year.x) #making sure these two columns are identical.

Descriptive Statistics

combined2$Issue <- as.factor(combined2$Issue)
summary(combined2$Issue) # Revealed that relevant issue is Alcohol & Drug Abuse
##                     Accounting                    Advertising 
##                           3856                           3675 
##                      Aerospace                    Agriculture 
##                           8412                          50966 
##           Alcohol & Drug Abuse                        Animals 
##                           4526                           6921 
##  Apparel, Clothing, & Textiles           Arts & Entertainment 
##                           1804                           5380 
##            Automotive Industry  Aviation, Airlines & Airports 
##                           8580                          26564 
##                        Banking                     Bankruptcy 
##                          33036                           4996 
##              Beverage Industry              Chemical Industry 
##                           2931                           8718 
## Civil Rights & Civil Liberties              Clean Air & Water 
##                           8118                          31060 
##                    Commodities   Computers & Information Tech 
##                           2554                          14184 
##                   Constitution        Consumer Product Safety 
##                           3130                          23521 
##  Copyright, Patent & Trademark                        Defense 
##                          34607                         111014 
##  Disaster & Emergency Planning           District of Columbia 
##                          12220                           1169 
##   Economics & Econ Development                      Education 
##                          20296                          66261 
##         Energy & Nuclear Power        Environment & Superfund 
##                          92094                          69247 
##    Family, Abortion & Adoption    Fed Budget & Appropriations 
##                           4728                         256825 
##                        Finance    Firearms, Guns & Ammunition 
##                          51934                           2967 
##                  Food Industry              Foreign Relations 
##                          17619                          23909 
##                Fuel, Gas & Oil     Gaming, Gambling & Casinos 
##                          13240                           7667 
##              Government Issues        Hazardous & Solid Waste 
##                          41879                           5560 
##                  Health Issues              Homeland Security 
##                         164846                          41925 
##                        Housing                    Immigration 
##                          22843                          31406 
## Indian/Native American Affairs                      Insurance 
##                          22396                          22810 
##                   Intelligence   Labor, Antitrust & Workplace 
##                           4192                          45423 
##        Law Enforcement & Crime                  Manufacturing 
##                          25462                          11373 
##      Marine, Boats & Fisheries Media Information & Publishing 
##                          20873                           2346 
##   Medical Research & Clin Labs            Medicare & Medicaid 
##                          18615                          82773 
##  Mining, Money & Gold Standard Minting, Money & Gold Standard 
##                            543                            339 
##    Minting/Money/Gold Standard              Natural Resources 
##                            176                          41063 
##                       Pharmacy                         Postal 
##                          15161                           7371 
##        Radio & TV Broadcasting                      Railroads 
##                          20220                           9734 
##         Real Estate & Land Use                       Religion 
##                          11072                           1294 
##                     Retirement               Roads & Highways 
##                          17560                           8470 
##           Science & Technology                 Small Business 
##                          27662                          12914 
##             Sports & Athletics                        Tariffs 
##                           2838                           5322 
##                          Taxes             Telecommunications 
##                         172647                          43603 
##                        Tobacco                          Torts 
##                           7180                           7837 
##                          Trade                 Transportation 
##                          78143                          99394 
##               Travel & Tourism            Trucking & Shipping 
##                           5021                           4660 
##                   Unemployment              Urban Development 
##                           1378                          11860 
##                      Utilities               Veterans Affairs 
##                          12588                          16428 
##                        Welfare 
##                           4096

Most relevant issue is…

Alcohol & Drug Abuse which appears in 4,592 reports Compare this with… Law Enforcement & Crime = 25,884 Health Issues = 167,937

Let’s graph these over time and see how they change…

ada <- subset(combined2, Issue=="Alcohol & Drug Abuse")#subsetting the databases with the relevant issues only
le <- subset(combined2, Issue=="Law Enforcement & Crime")
he <- subset(combined2, Issue=="Health Issues")
rel <-rbind(ada, he, le)#and then appending them so they are in one dataset
summary(rel)
##     Uniqid              Year           Registrant_raw      Registrant       
##  Length:194834      Length:194834      Length:194834      Length:194834     
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##     Isfirm           Client_raw           Client             Ultorg         
##  Length:194834      Length:194834      Length:194834      Length:194834     
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##     Amount            Catcode             Source              Self          
##  Length:194834      Length:194834      Length:194834      Length:194834     
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##  IncludeNSFS            Use                Ind                Type          
##  Length:194834      Length:194834      Length:194834      Length:194834     
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##    Typelong           Affliate             SI_ID           IssueID         
##  Length:194834      Length:194834      Min.   :    419   Length:194834     
##  Class :character   Class :character   1st Qu.: 871808   Class :character  
##  Mode  :character   Mode  :character   Median :1574713   Mode  :character  
##                                        Mean   :1504398                     
##                                        3rd Qu.:2188987                     
##                                        Max.   :2776133                     
##                                                                            
##                      Issue           NA         
##  Health Issues          :164846   Mode:logical  
##  Law Enforcement & Crime: 25462   NA's:194834   
##  Alcohol & Drug Abuse   :  4526                 
##  Accounting             :     0                 
##  Advertising            :     0                 
##  Aerospace              :     0                 
##  (Other)                :     0

Calculating the Number of reports per issue per year

To determine the total number of reports filed per year, can use Uniqid. There will be multiple entries for each issue, but the Uniqid will be the same.

rel$Issue <- factor(rel$Issue) #re-calc levels
rel$Year <- factor(rel$Year) #turn year into a cat var
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
n_distinct(ada$Uniqid, na.rm = TRUE) #number of unique Uniqueid
## [1] 4506
n_distinct(le$Uniqid, na.rm = TRUE)
## [1] 25291
n_distinct(he$Uniqid, na.rm = TRUE)
## [1] 162990
n_distinct(combined2$Uniqid, na.rm = TRUE)
## [1] 1049490

This tells us that 4,506 LDA reports have indicated that they lobbied on ada policy. produces counts that measure repeated and non-exclusive occurrences of lobbyists, agencies, and other measures…meaning if an organization has to file reports and their lobbying agency files a report; it is counted double. We could argue that this indicates the issue was more salient (See LDA at 20 pg 264).

25,291 = reports identifying LE 162,990 = reports identifying health issues

Note: the unique reports were very similiar for most of these to the number of observations in the dataset; which indicates that there are not many Uniqid that are repeated in a particular issue group (the repeats are most likely because tehy are entered multiple times to account for the different issues)

Total UniqId’s in dataset = 1,049,490

Have the number of LDA reports filed identifying ADA changed over time? ADA by YEAR

Since filing requirements changed in 2007/2008 we will expect to see a drastic increase here. The law required that groups go from filing semi-annually to quarterly. And again this may count repeated and non-exclusive occurrences of lobbyists etc.

There will also be a decline in 2012-2018. These declines are attributed to more conservative LDA compliance stemming from increased HLOGA reporting requirements and increased journalistic and academic scrutiny of the reports (LaPira 2016; Thomas and LaPira 2017; LaPira and Thomas 2017). (See LDA at 20 pg 264).

#Unique reports by year for ada, he and le
rpts_ada <- aggregate(data = ada,                # Applying aggregate
                          Uniqid ~ Year,
                          function(x) length(unique(x))) #uses the number of unique "UniqueId"
rpts_ada   # Print counts
##    Year Uniqid
## 1  1998    112
## 2  1999    129
## 3  2000    137
## 4  2001    102
## 5  2002    151
## 6  2003    131
## 7  2004    140
## 8  2005    145
## 9  2006    148
## 10 2007    122
## 11 2008    237
## 12 2009    169
## 13 2010    164
## 14 2011    148
## 15 2012    205
## 16 2013    196
## 17 2014    233
## 18 2015    232
## 19 2016    301
## 20 2017    301
## 21 2018    374
## 22 2019    341
## 23 2020    288
#he
rpts_he <- aggregate(data=he,
                     Uniqid ~ Year, 
                     function(x) length(unique(x)))
rpts_he
##    Year Uniqid
## 1  1998   1964
## 2  1999   2101
## 3  2000   2595
## 4  2001   2466
## 5  2002   3151
## 6  2003   2902
## 7  2004   3177
## 8  2005   3555
## 9  2006   3665
## 10 2007   4122
## 11 2008   7908
## 12 2009  10193
## 13 2010   9839
## 14 2011   7581
## 15 2012   9756
## 16 2013   9682
## 17 2014   9825
## 18 2015  10183
## 19 2016  10383
## 20 2017  11522
## 21 2018  11470
## 22 2019  11635
## 23 2020  13315
#le
rpts_le <- aggregate(data=le,
                     Uniqid ~ Year, 
                     function(x) length(unique(x)))
rpts_le
##    Year Uniqid
## 1  1998    355
## 2  1999    424
## 3  2000    512
## 4  2001    450
## 5  2002    750
## 6  2003    543
## 7  2004    625
## 8  2005    637
## 9  2006    676
## 10 2007    758
## 11 2008   1510
## 12 2009   1438
## 13 2010   1509
## 14 2011   1140
## 15 2012   1425
## 16 2013   1408
## 17 2014   1343
## 18 2015   1469
## 19 2016   1501
## 20 2017   1517
## 21 2018   1722
## 22 2019   1731
## 23 2020   1848
#total unique reports by year
rpts_tots <- aggregate(data=combined2,
                     Uniqid ~ Year, 
                     function(x) length(unique(x)))
rpts_tots
##    Year Uniqid
## 1  1998  17810
## 2  1999  18511
## 3  2000  19565
## 4  2001  21172
## 5  2002  23253
## 6  2003  26220
## 7  2004  27598
## 8  2005  30549
## 9  2006  31245
## 10 2007  33323
## 11 2008  63727
## 12 2009  64837
## 13 2010  63095
## 14 2011  49260
## 15 2012  62434
## 16 2013  60795
## 17 2014  59672
## 18 2015  59386
## 19 2016  59232
## 20 2017  62488
## 21 2018  63839
## 22 2019  64473
## 23 2020  67006
#plotting 
#ada by year
plot(rpts_ada$Year, rpts_ada$Uniqid)

plot(rpts_he$Year, rpts_he$Uniqid)

plot(rpts_le$Year, rpts_le$Uniqid)

plot(rpts_tots$Year, rpts_tots$Uniqid)

All issues (except ada) generally follow the same pattern as tots. ada does have the general trend upward but it looks much different. Let’s take a look out whether there is a relationship between the le rpts and the ada rpts. Are these treated as two distinct issues? Also does tots influence ada rpts?

#append counts dataset for rpts
names(rpts_ada)[names(rpts_ada) == 'Uniqid'] <- 'Ada_rpt' #first change variable names so that the datasets merge properly
names(rpts_le)[names(rpts_le)== 'Uniqid'] <- 'Le_rpt'
names(rpts_he)[names(rpts_he)== 'Uniqid'] <- 'He_rpt'
names(rpts_tots)[names(rpts_tots)== 'Uniqid'] <- 'Tots_rpt'

rpts_1 <- merge(rpts_ada, rpts_le, by=c("Year"))
rpt_2 <- merge (rpts_he, rpts_tots, by=c("Year"))
rpts_all <- merge(rpts_1, rpt_2, by=c("Year"))


coplot(rpts_all$Ada_rpt~rpts_all$Year|rpts_all$Le_rpt, pch=16, panel=panel.smooth) 

coplot(rpts_all$Ada_rpt~rpts_all$Year|rpts_all$He_rpt, pch=16, panel=panel.smooth)

coplot(rpts_all$Ada_rpt~rpts_all$Year|rpts_all$Tots_rpt, pch=16, panel=panel.smooth)

library(ggplot2)

rpts_all$Year <- as.numeric(rpts_all$Year)
ggplot(rpts_all, aes(x=Year))+
  geom_line(aes(y = Tots_rpt),color = "darkred")+
  geom_line(aes(y = Le_rpt),color = "steelblue")+
  geom_line(aes(y = He_rpt),color = "black")+
  geom_line(aes(y = Ada_rpt),color = "purple")

ggplot(rpts_all, aes(x=Year))+
  geom_line(aes(y = Le_rpt),color = "steelblue")+
  geom_line(aes(y = He_rpt),color = "black")+
  geom_line(aes(y = Ada_rpt),color = "purple")

ggplot(rpts_all, aes(x=Year))+
  geom_line(aes(y = Le_rpt),color = "steelblue")+
  geom_line(aes(y = Ada_rpt),color = "purple")

Based on the above co-plot, the variance of ada report counts seems to be influenced by le rpt counts, but only after Le reaches a certain count. Same for he and tots… After we plot them all together though….it really looks like ada and le are flatter than increases in total reports filed…

These are interesting in showing trends but there really aren’t many observations (1 per year), so we really can’t do fancier statistics here. Let’s look to see how the industries changed…

Changes in Industry Participation

#Catcode is the variable that represents industry
library(readxl) #importing category names and merging it with combined2
cat_code_industry <- read_excel("C:/Users/talee/Dropbox/1-Research/drug policy and interest groups/Lobbying Data/cat_code_industry.xlsx")
combined3 <- merge(combined2,cat_code_industry,by="Catcode") #merging so that the dataset has the names of the industries...
combined3$Catname <- factor(combined3$Catname)
summary(combined3$Catname)
##                      Civil servant/public employee 
##                                             162955 
##                                 Schools & colleges 
##                                             109268 
##               Employer listed but category unknown 
##                                             107002 
##                       Pharmaceutical manufacturing 
##                                              55133 
##                                          Hospitals 
##                                              51584 
##                                        Non-Profits 
##                                              29736 
##                            Health & welfare policy 
##                                              28676 
##                           Electric Power utilities 
##                                              27870 
##                           Gas & Electric Utilities 
##                                              27646 
##                                  Computer software 
##                                              26800 
##           Other single-issue or ideological groups 
##                                              23722 
##                               Environmental policy 
##                                              22861 
##                        Biotech products & research 
##                                              22503 
##                         Medical Devices & Supplies 
##                                              22013 
##              Insurance companies, brokers & agents 
##                                              21693 
##                        Other physician specialists 
##                                              20537 
##                                      Indian Gaming 
##                                              20348 
##                                          Chemicals 
##                                              20077 
##                      Defense aerospace contractors 
##                                              20021 
##                                    Water Utilities 
##                                              19825 
##             Alternate energy production & services 
##                                              19739 
##        Industrial/commercial equipment & materials 
##                                              18872 
##                     Defense electronic contractors 
##                                              18122 
##          Commercial banks & bank holding companies 
##                                              17861 
##                Data processing & computer services 
##                                              17564 
##               Real Estate developers & subdividers 
##                                              16989 
##                  Computer components & accessories 
##                                              16889 
##                             Minority/Ethnic Groups 
##                                              16506 
##                               Health care services 
##                                              16418 
##                                 Auto manufacturers 
##                                              16312 
##            Security brokers & investment companies 
##                                              16108 
##               Electronics manufacturing & services 
##                                              15498 
##                        Accident & health insurance 
##                                              14632 
##                                      Sea transport 
##                                              12912 
##                                     Life insurance 
##                                              12606 
##                                Telephone utilities 
##                                              12530 
##                               Chambers of commerce 
##                                              12528 
##                                          Railroads 
##                                              12295 
##             Cable distributors & service providers 
##                                              11737 
##          Major (multinational) oil & gas producers 
##                                              11599 
##                Credit agencies & finance companies 
##                                              11511 
##                                               HMOs 
##                                              10928 
##                      Property & casualty insurance 
##                                              10927 
##                                          Education 
##                                              10829 
##                         Tobacco & Tobacco products 
##                                              10829 
##            Museums, art galleries, libraries, etc. 
##                                              10087 
##                              Attorneys & law firms 
##                                               9913 
##            Natural Gas transmission & distribution 
##                                               9847 
##                                           Airlines 
##                                               9773 
##                                  Business services 
##                                               9731 
##                       Aviation services & airports 
##                                               9362 
##                              Welfare & Social Work 
##                                               9231 
## Engineering, architecture & construction mgmt svcs 
##                                               9198 
##                       Lobbyists & Public Relations 
##                                               9078 
##            Food and kindred products manufacturing 
##                                               8967 
## Public works, industrial & commercial construction 
##                                               8668 
##                         Forestry & Forest Products 
##                                               8655 
##                           Defense-related services 
##                                               8643 
##                    Computer manufacture & services 
##                                               8619 
##                       Mortgage bankers and brokers 
##                                               8484 
##               Truck/Automotive parts & accessories 
##                                               8471 
##                     Petroleum refining & marketing 
##                                               8460 
##             Stone, clay, glass & concrete products 
##                                               8382 
##                   Sea freight & passenger services 
##                                               8249 
##                    Independent oil & gas producers 
##                                               8176 
##                           Health care institutions 
##                                               8171 
##                                       Farm bureaus 
##                                               8129 
##                             Milk & dairy producers 
##                                               7813 
##                  Management consultants & services 
##                                               7738 
##                                    Medical schools 
##                                               7734 
##                          Pro-business associations 
##                                               7684 
##                             Non-profit foundations 
##                                               7499 
##            Book, newspaper & periodical publishing 
##                                               7459 
##     Environmental services, equipment & consulting 
##                                               7368 
##                    Cell/wireless service providers 
##                                               7198 
##                     Commercial TV & radio stations 
##                                               7194 
##                Health, Education & Human Resources 
##                                               7129 
##                    Vegetables, fruits and tree nut 
##                                               7119 
##              Restaurants & drinking establishments 
##                                               7114 
##                                         Physicians 
##                                               6824 
##             Wine & distilled spirits manufacturing 
##                                               6793 
##                                      Manufacturing 
##                                               6701 
##            Plastics & Rubber processing & products 
##                                               6680 
##                                     Transportation 
##                                               6523 
##                                              Steel 
##                                               6491 
##                                   Waste management 
##                                               6476 
##                                        Accountants 
##                                               6414 
##                     Casinos, racetracks & gambling 
##                                               6327 
##           Department, variety & convenience stores 
##                                               6327 
##                       Search Engine/Email Services 
##                                               6249 
##                             Aircraft manufacturers 
##                                               6194 
##           Other non-physician health practitioners 
##                                               6150 
##  Agricultural chemicals (fertilizers & pesticides) 
##                                               6100 
##          Oilfield service, equipment & exploration 
##                                               5872 
##                                        Coal mining 
##                                               5728 
##                                Fiscal & tax policy 
##                                               5630 
##                     Elderly issues/Social Security 
##                                               5585 
##         Agricultural services & related industries 
##                                               5573 
##                      Other Communications Services 
##                                               5496 
##                                            (Other) 
##                                             626210

Lobby by Category

#merge dataset with ada to see who is lobbying on ada policy 
ada2 <- merge(ada,cat_code_industry,by="Catcode") 
ada2$Catname <- factor(ada2$Catname)
summary(ada2$Catname)
##                       Pharmaceutical manufacturing 
##                                                498 
##             Wine & distilled spirits manufacturing 
##                                                483 
##                 Drug & alcohol treatment hospitals 
##                                                294 
##                      Civil servant/public employee 
##                                                259 
##               Employer listed but category unknown 
##                                                255 
##                                               Beer 
##                                                182 
##                                 Schools & colleges 
##                                                170 
##                                 Liquor wholesalers 
##                                                149 
##   Outpatient health services (incl drug & alcohol) 
##                                                137 
##           Other single-issue or ideological groups 
##                                                126 
##                                        Non-Profits 
##                                                113 
##                            Health & welfare policy 
##                                                109 
## Professional sports, arenas & related equip & svcs 
##                                                107 
##                        Other physician specialists 
##                                                102 
##                      Psychiatrists & psychologists 
##                                                 91 
##                                          Hospitals 
##                                                 90 
##                                         Physicians 
##                                                 90 
##                             Mental Health Services 
##                                                 67 
##                               Health care services 
##                                                 54 
##                           Pharmaceutical wholesale 
##                                                 52 
##                               Medical laboratories 
##                                                 48 
##           Other non-physician health practitioners 
##                                                 45 
##                                        Pharmacists 
##                                                 42 
##                                            Alcohol 
##                                                 40 
##                      Property & casualty insurance 
##                                                 38 
##                                        Drug stores 
##                                                 37 
##                         Tobacco & Tobacco products 
##                                                 36 
##                                           Dentists 
##                                                 31 
##                                    Medical schools 
##                                                 30 
##                             Minority/Ethnic Groups 
##                                                 29 
##                              Attorneys & law firms 
##                                                 27 
##                    Household cleansers & chemicals 
##                                                 27 
##                              Welfare & Social Work 
##                                                 27 
##                     Casinos, racetracks & gambling 
##                                                 25 
##                             Non-profit foundations 
##                                                 25 
##                        Accident & health insurance 
##                                                 24 
##                        Biotech products & research 
##                                                 24 
##                       Lobbyists & Public Relations 
##                                                 24 
##                                  Computer software 
##                                                 23 
##                               Health professionals 
##                                                 21 
##                                  Business services 
##                                                 19 
##        Police & firefighters unions & associations 
##                                                 16 
##              Restaurants & drinking establishments 
##                                                 16 
##                                          Chemicals 
##                                                 15 
##                                          Education 
##                                                 15 
##                               Health care products 
##                                                 15 
##                                 Democratic/Liberal 
##                                                 14 
##                      Abortion policy/Anti-Abortion 
##                                                 13 
##           Department, variety & convenience stores 
##                                                 13 
##                 State & local govt employee unions 
##                                                 13 
##                                      Liquor stores 
##                                                 12 
##         Churches, clergy & religious organizations 
##                                                 11 
##                              Precision instruments 
##                                                 11 
##  Agricultural chemicals (fertilizers & pesticides) 
##                                                 10 
##                Health, Education & Human Resources 
##                                                 10 
##                              Transportation unions 
##                                                 10 
##               Electronics manufacturing & services 
##                                                  9 
##                                   Food wholesalers 
##                                                  9 
##        Industrial/commercial equipment & materials 
##                                                  9 
## Public school teachers, administrators & officials 
##                                                  9 
##                               Chambers of commerce 
##                                                  8 
##                         Medical Devices & Supplies 
##                                                  8 
##                            Republican/Conservative 
##                                                  8 
##                           AIDS treatment & testing 
##                                                  7 
##            Book, newspaper & periodical publishing 
##                                                  7 
##                             Christian Conservative 
##                                                  7 
##                Data processing & computer services 
##                                                  7 
##                           Health care institutions 
##                                                  7 
##                                      Indian Gaming 
##                                                  7 
##        Marijuana Production, Sales & Paraphernalia 
##                                                  7 
##                                             Nurses 
##                                                  7 
##                    Optometrists & Ophthalmologists 
##                                                  7 
##   Correctional facilities constr & mgmt/for-profit 
##                                                  6 
##                                        Food stores 
##                                                  6 
##                        Household & office products 
##                                                  6 
##                  Nutritional & dietary supplements 
##                                                  6 
##                                           Services 
##                                                  6 
##                                    Teamsters union 
##                                                  6 
##                                     Transportation 
##                                                  5 
##                       Amusement/recreation centers 
##                                                  4 
##                    Cell/wireless service providers 
##                                                  3 
##                         Internet & Online Services 
##                                                  3 
##                                           Military 
##                                                  3 
##                     Petroleum refining & marketing 
##                                                  3 
##                                   Waste management 
##                                                  3 
##                             Aircraft manufacturers 
##                                                  2 
##                                           Airlines 
##                                                  2 
##                                        Coal mining 
##                                                  2 
##                                    Consumer groups 
##                                                  2 
##                            Courts & Justice System 
##                                                  2 
##                           Defense-related services 
##                                                  2 
##                      Defense aerospace contractors 
##                                                  2 
##            Food and kindred products manufacturing 
##                                                  2 
##                           Gas & Electric Utilities 
##                                                  2 
##                                     Life insurance 
##                                                  2 
##                                  Lodging & tourism 
##                                                  2 
##                  Management consultants & services 
##                                                  2 
##            Museums, art galleries, libraries, etc. 
##                                                  2 
##          Oilfield service, equipment & exploration 
##                                                  2 
##                                            (Other) 
##                                                 31

Lobbying on Ada by Industry

ada2$Industry <- factor(ada2$Industry)
summary(ada2$Industry)
##     Abortion Policy/Anti-Abortion    Agricultural Services/Products 
##                                13                                11 
##                     Air Transport               Beer, Wine & Liquor 
##                                 7                               866 
##             Building Trade Unions             Business Associations 
##                                 1                                 9 
##                 Business Services                  Casinos/Gambling 
##                                21                                32 
##  Chemical & Related Manufacturing   Civil Servants/Public Officials 
##                                42                               261 
##  Clergy & Religious Organizations             Construction Services 
##                                11                                 2 
##                 Defense Aerospace                Democratic/Liberal 
##                                 2                                14 
##                         Education                Electric Utilities 
##                               224                                 3 
##           Electronics Mfg & Equip  Employer Listed/Category Unknown 
##                                39                               255 
##                       Environment                   Food & Beverage 
##                                 1                                16 
##           Food Processing & Sales               General Contractors 
##                                17                                 1 
##              Health Professionals              Health Services/HMOs 
##                               436                               315 
##           Hospitals/Nursing Homes                      Human Rights 
##                               391                               139 
##                         Insurance                          Internet 
##                                64                                 3 
##                 Lawyers/Law Firms                         Lobbyists 
##                                27                                24 
##                   Lodging/Tourism                         Marijuana 
##                                 3                                 7 
##                            Mining                     Misc Business 
##                                 2                                 7 
##                      Misc Defense                       Misc Health 
##                                 2                                10 
##                       Misc Issues Misc Manufacturing & Distributing 
##                               129                                27 
##                     Misc Services                    Misc Transport 
##                                 6                                 6 
##                       Misc Unions           Non-Profit Institutions 
##                                 2                               140 
##                         Oil & Gas                             Other 
##                                 6                                30 
##   Pharmaceuticals/Health Products             Printing & Publishing 
##                               603                                 7 
##              Public Sector Unions                         Railroads 
##                                31                                 1 
##                       Real Estate     Recreation/Live Entertainment 
##                                 3                               111 
##           Republican/Conservative                      Retail Sales 
##                                15                                50 
##           Securities & Investment                  Telecom Services 
##                                 1                                 3 
##                           Tobacco             Transportation Unions 
##                                36                                16 
##                   TV/Movies/Music                  Waste Management 
##                                 2                                 3

Lobbying on Ada by Sector

ada2$Sector <- factor(ada2$Sector)
summary(ada2$Sector)
##          Agribusiness  Communic/Electronics          Construction 
##                    64                    54                     3 
##               Defense   Energy/Nat Resource Finance/Insur/RealEst 
##                     4                    14                    68 
##                Health Ideology/Single-Issue                 Labor 
##                  1755                   311                    50 
##   Lawyers & Lobbyists         Misc Business                 Other 
##                    51                  1197                   666 
##        Transportation               Unknown 
##                    14                   255

Lobbying on LE by Category Name

#merge dataset with le to see who is lobbying on le policy 
le2 <- merge(le,cat_code_industry,by="Catcode") 
le2$Catname <- factor(le2$Catname)
summary(le2$Catname)
##                      Civil servant/public employee 
##                                               5345 
##               Employer listed but category unknown 
##                                               1519 
##           Other single-issue or ideological groups 
##                                               1338 
##                                 Schools & colleges 
##                                                965 
##        Police & firefighters unions & associations 
##                                                867 
##                            Courts & Justice System 
##                                                864 
##   Correctional facilities constr & mgmt/for-profit 
##                                                660 
##                                        Non-Profits 
##                                                575 
##                                  Security services 
##                                                487 
##                                  Computer software 
##                                                386 
##                             Minority/Ethnic Groups 
##                                                371 
##                              Attorneys & law firms 
##                                                350 
##                               Chambers of commerce 
##                                                306 
##                                       Human Rights 
##                                                279 
##                                  Children's rights 
##                                                263 
##                      Homeland Security contractors 
##                                                238 
##                              Welfare & Social Work 
##                                                236 
##                                      Indian Gaming 
##                                                231 
##         Churches, clergy & religious organizations 
##                                                227 
##                     Defense electronic contractors 
##                                                205 
##                      Psychiatrists & psychologists 
##                                                186 
##               Electronics manufacturing & services 
##                                                184 
##                Credit agencies & finance companies 
##                                                177 
##                                  Business services 
##                                                170 
##                       Pharmaceutical manufacturing 
##                                                166 
##                Data processing & computer services 
##                                                165 
##                        Biotech products & research 
##                                                158 
##        Marijuana Production, Sales & Paraphernalia 
##                                                151 
##                  Computer components & accessories 
##                                                147 
##                            Health & welfare policy 
##                                                145 
##                                       Retail trade 
##                                                145 
##                            Republican/Conservative 
##                                                132 
##                             Christian Conservative 
##                                                128 
##                                Employment agencies 
##                                                127 
##                                     Women's issues 
##                                                126 
##                       Lobbyists & Public Relations 
##                                                125 
##                         Internet & Online Services 
##                                                124 
##          Recycling of metal, paper, plastics, etc. 
##                                                124 
##                       Search Engine/Email Services 
##                                                121 
##                          Trial lawyers & law firms 
##                                                120 
##                                          Anti-Guns 
##                                                114 
##                                            Vendors 
##                                                114 
##                  Nutritional & dietary supplements 
##                                                111 
##                                           Pro-Guns 
##                                                110 
##          Major (multinational) oil & gas producers 
##                                                108 
##                             Non-profit foundations 
##                                                105 
##                      Other Communications Services 
##                                                104 
##          Commercial banks & bank holding companies 
##                                                103 
##                               Environmental policy 
##                                                101 
##                                        Food stores 
##                                                100 
##           Department, variety & convenience stores 
##                                                 99 
##                                     Foreign policy 
##                                                 98 
##               Hardware & building materials stores 
##                                                 98 
##                                Telephone utilities 
##                                                 98 
##                                          Hospitals 
##                                                 97 
##                      Gay & lesbian rights & issues 
##                                                 93 
##                                        Drug stores 
##                                                 92 
##              Restaurants & drinking establishments 
##                                                 81 
##                     Petroleum refining & marketing 
##                                                 78 
##                        Other physician specialists 
##                                                 75 
##               Real Estate developers & subdividers 
##                                                 74 
##                           Defense-related services 
##                                                 73 
##                                         Physicians 
##                                                 73 
##                                       Social Media 
##                                                 73 
##             Alternate energy production & services 
##                                                 70 
##                            Small arms & ammunition 
##                                                 70 
##                             Toiletries & cosmetics 
##                                                 70 
##             Cable distributors & service providers 
##                                                 69 
##                 State & local govt employee unions 
##                                                 67 
##                     Casinos, racetracks & gambling 
##                                                 66 
##                                        Accountants 
##                                                 65 
##  Technical, business and vocational schools & svcs 
##                                                 65 
##                      General business associations 
##                                                 64 
## Professional sports, arenas & related equip & svcs 
##                                                 64 
##                                          Chemicals 
##                                                 58 
##                  Management consultants & services 
##                                                 58 
##                                 Telecommunications 
##                                                 58 
##                      Defense aerospace contractors 
##                                                 56 
##                                    Hotels & motels 
##                                                 55 
##              Insurance companies, brokers & agents 
##                                                 55 
##                              Transportation unions 
##                                                 54 
##                                 Democratic/Liberal 
##                                                 53 
##                             Mental Health Services 
##                                                 52 
##                               Health care products 
##                                                 51 
##                        Household & office products 
##                                                 50 
##                                         Pro-Israel 
##                                                 47 
##                                          Education 
##                                                 46 
##                                     Life insurance 
##                                                 46 
##                                      Nursing homes 
##                                                 46 
##                Abortion policy/Pro-Abortion Rights 
##                                                 45 
##                      Property & casualty insurance 
##                                                 45 
##               Truck/Automotive parts & accessories 
##                                                 45 
## Entertainment Industry/Broadcast & Motion Pictures 
##                                                 44 
##                                       Labor Unions 
##                                                 44 
##                                Fiscal & tax policy 
##                                                 43 
##                          Pro-business associations 
##                                                 43 
##                                     Legal Services 
##                                                 42 
## Public school teachers, administrators & officials 
##                                                 42 
##                    Cell/wireless service providers 
##                                                 41 
##                                            (Other) 
##                                               2519

Lobbying on LE by Industry

le2$Industry <- factor(le2$Industry)
summary(le2$Industry)
##       Abortion Policy/Anti-Abortion Abortion Policy/Pro-Abortion Rights 
##                                  33                                  45 
##                         Accountants      Agricultural Services/Products 
##                                  65                                  86 
##                       Air Transport                          Automotive 
##                                  88                                  99 
##                 Beer, Wine & Liquor      Building Materials & Equipment 
##                                  44                                  54 
##               Business Associations                   Business Services 
##                                 436                                 867 
##                    Casinos/Gambling    Chemical & Related Manufacturing 
##                                 297                                  96 
##     Civil Servants/Public Officials    Clergy & Religious Organizations 
##                                6233                                 227 
##                    Commercial Banks               Construction Services 
##                                 105                                  47 
##  Crop Production & Basic Processing                               Dairy 
##                                   7                                   3 
##                   Defense Aerospace                 Defense Electronics 
##                                  56                                 205 
##                  Democratic/Liberal                           Education 
##                                  53                                1189 
##                  Electric Utilities             Electronics Mfg & Equip 
##                                  53                                 953 
##    Employer Listed/Category Unknown                         Environment 
##                                1519                                 101 
##        Environmental Svcs/Equipment            Finance/Credit Companies 
##                                  12                                 178 
##                Fisheries & Wildlife                     Food & Beverage 
##                                   1                                  97 
##             Food Processing & Sales            Foreign & Defense Policy 
##                                 108                                 134 
##          Forestry & Forest Products                 General Contractors 
##                                   6                                  38 
##                         Gun Control                          Gun Rights 
##                                 114                                 110 
##                Health Professionals                Health Services/HMOs 
##                                 418                                 111 
##             Hospitals/Nursing Homes                        Human Rights 
##                                 204                                1151 
##                   Industrial Unions                           Insurance 
##                                   7                                 161 
##                            Internet                   Lawyers/Law Firms 
##                                 454                                 519 
##                           Livestock                           Lobbyists 
##                                  18                                 125 
##                     Lodging/Tourism                           Marijuana 
##                                  68                                 151 
##                              Mining                    Misc Agriculture 
##                                  16                                   3 
##                       Misc Business     Misc Communications/Electronics 
##                                 663                                   4 
##                        Misc Defense                         Misc Energy 
##                                 367                                 108 
##                        Misc Finance                         Misc Health 
##                                 116                                   5 
##                         Misc Issues   Misc Manufacturing & Distributing 
##                                1441                                 488 
##                       Misc Services                      Misc Transport 
##                                  11                                  56 
##                         Misc Unions                    Non-contribution 
##                                  98                                   2 
##             Non-Profit Institutions                           Oil & Gas 
##                                 705                                 203 
##                               Other     Pharmaceuticals/Health Products 
##                                 249                                 531 
##               Printing & Publishing                          Pro-Israel 
##                                  39                                  47 
##                Public Sector Unions                           Railroads 
##                                1001                                  32 
##                         Real Estate       Recreation/Live Entertainment 
##                                 157                                  82 
##             Republican/Conservative                        Retail Sales 
##                                 260                                 470 
##                     Savings & Loans                       Sea Transport 
##                                   7                                  16 
##             Securities & Investment           Special Trade Contractors 
##                                  98                                  12 
##                    Steel Production                    Telecom Services 
##                                   3                                 280 
##                 Telephone Utilities                            Textiles 
##                                 112                                   1 
##                             Tobacco               Transportation Unions 
##                                  32                                 105 
##                            Trucking                     TV/Movies/Music 
##                                  18                                 163 
##                    Waste Management                      Women's Issues 
##                                  40                                 126

Lobbying on LE by Sector

le2$Sector <- factor(le2$Sector)
summary(le2$Sector)
##          Agribusiness  Communic/Electronics          Construction 
##                   263                  2005                   151 
##               Defense   Energy/Nat Resource Finance/Insur/RealEst 
##                   628                   433                   887 
##                Health Ideology/Single-Issue                 Labor 
##                  1269                  3615                  1211 
##   Lawyers & Lobbyists         Misc Business      Non-contribution 
##                   644                  3774                     2 
##                 Other        Transportation               Unknown 
##                  8603                   309                  1519

Who is lobbying on both le and addiction?

There are 173 clients that lobbied on both law enforcement and addiction…

library(fuzzyjoin); library(dplyr);

le2$Client <- factor(le2$Client)
ada2$Client <- factor(ada2$Client)

ada_client <-levels(ada2$Client) #created a list of all category levels in Client factor in ada, then put it in a dataframe
ada_client <-as.data.frame(ada_client)
names(ada_client)[names(ada_client) == 'ada_client'] <- "client" #need the variable names to match with the variable name in the other dataframe

le_client<-levels(le2$Client)
le_client <-as.data.frame(le_client)
names(le_client)[names(le_client) == 'le_client'] <- "client"

data_common <- inner_join(ada_client, le_client) #This function checks the data in common on the same variable between two dataframes.
## Joining, by = "client"
data_common
##                                                client
## 1                         Agricultural Retailers Assn
## 2                                  Alachua County, FL
## 3                          Alcohol Monitoring Systems
## 4                                        Alkermes Inc
## 5                    Alliance for Children & Families
## 6                       Alliance for Safety & Justice
## 7                        Allied Domecq Spirits & Wine
## 8                           Amalgamated Transit Union
## 9               American Academy of Family Physicians
## 10            American Assn/Marriage & Family Therapy
## 11                        American Beverage Licensees
## 12                  American Clinical Laboratory Assn
## 13           American College of Emergency Physicians
## 14                 American College of Nurse-Midwives
## 15                      American Council on Education
## 16             American Council/Regulatory Compliance
## 17                           American Counseling Assn
## 18  American Federation of State/Cnty/Munic Employees
## 19              American Foundation for AIDS Research
## 20                            American Insurance Assn
## 21                           American Optometric Assn
## 22          American Property Casualty Insurance Assn
## 23                          American Psychiatric Assn
## 24                        American Psychological Assn
## 25           American Psychological Assn Practice Org
## 26               American Psychological Assn Services
## 27                        American Public Health Assn
## 28                          Americans for Safe Access
## 29                           Americans for Tax Reform
## 30  Americans United for Separation of Church & State
## 31                                        Appriss Inc
## 32                         Arinc Engineering Services
## 33                           Babyland Family Services
## 34                                         Bayer Corp
## 35                              Berea Children's Home
## 36                                   Bexar County, TX
## 37                          Boehringer Ingelheim Corp
## 38                      Boys & Girls Clubs of America
## 39                                 Broward County, FL
## 40                          Cannabis Trade Federation
## 41                   Cannabis Trade Federation Action
## 42                                       Cephalon Inc
## 43                    Child Welfare League of America
## 44                                Christian Coalition
## 45                Church of Scientology International
## 46                              City of Baltimore, LA
## 47                                 City of Boston, MA
## 48                                City of Everett, WA
## 49                             City of Farmington, NM
## 50                            City of Gainesville, FL
## 51                                   City of Gary, IN
## 52                       City of Huntington Beach, CA
## 53                           City of Laguna Beach, CA
## 54                            City of Louiseville, KY
## 55                            City of Miami Beach, FL
## 56                          City of Mission Viejo, CA
## 57                                 City of Newark, NJ
## 58                           City of Philadelphia, PA
## 59                 Consortium of Social Science Assns
## 60                     Consumer Federation of America
## 61                  Consumer Healthcare Products Assn
## 62                  Council for Responsible Nutrition
## 63                                Cuyahoga County, OH
## 64                                       DARE America
## 65                                    DARE New Jersey
## 66                               Diageo North America
## 67                          Distilled Spirits Council
## 68                               Drug Policy Alliance
## 69                                    Elon University
## 70                                    Express Scripts
## 71                                   Facing Addiction
## 72                            Family Research Council
## 73                    Food Distributors International
## 74                           Food Marketing Institute
## 75                             Girl Scouts of the USA
## 76                   Health Insurance Assn of America
## 77                        Heritage Action for America
## 78                                         Identa Ltd
## 79                        Indiana Chamber of Commerce
## 80                                 Indiana University
## 81                Institute for A Drug-Free Workplace
## 82           International Community Corrections Assn
## 83                                  Johnson & Johnson
## 84                            Joseph E Seagram & Sons
## 85                                   Justice for Jake
## 86                            Kansas Dept of Commerce
## 87                                 Keeton Corrections
## 88                       Kendall-Jackson Wine Estates
## 89                               Kids First Coalition
## 90                     Magazine Publishers of America
## 91                              MAGNA Pharmaceuticals
## 92                                Major Cities Chiefs
## 93           Major League Baseball Commissioner's Ofc
## 94                           Marijuana Policy Project
## 95                  Marshall University Research Corp
## 96                                            Mcj Inc
## 97                              Mental Health America
## 98                                       Meth Project
## 99           Midwest City Memorial Hospital Authority
## 100                                   MillerCoors LLC
## 101                            Minot State University
## 102                     Mothers Against Drunk Driving
## 103                                             NAACP
## 104                     National Assn of Broadcasters
## 105                National Assn of Chain Drug Stores
## 106               National Assn of Convenience Stores
## 107             National Assn of Police Organizations
## 108                    National Beer Wholesalers Assn
## 109  National Council/Community Behavioral Healthcare
## 110                National Disability Rights Network
## 111                  National District Attorneys Assn
## 112                          National Football League
## 113                National Fraternal Order of Police
## 114                             National Grocers Assn
## 115                       National Mental Health Assn
## 116                                      National PTA
## 117                          National Restaurant Assn
## 118                            National Right to Life
## 119             Natl Assn of Drug Court Professionals
## 120                               New York University
## 121                     Northern Arapaho Indian Tribe
## 122                             Ohio State University
## 123                                    OhioGuidestone
## 124                                      Oriana House
## 125                                    Orphan Medical
## 126            Pacific Inst for Research & Evaluation
## 127               Partnership for a Drug Free America
## 128                       People for the American Way
## 129                          Philip Morris Management
## 130          Physicians Cmte for Responsible Medicine
## 131                                Prime Therapeutics
## 132        Property Casualty Insurers Assn of America
## 133                                     Purdue Pharma
## 134                                Rancho Cordova, CA
## 135                 Reckitt Benckiser Pharmaceuticals
## 136                             Reckitt Benckiser Plc
## 137                                        RetireSafe
## 138                                 RTI International
## 139                                Salt Lake City, UT
## 140                              Salt Lake County, UT
## 141                                        SAM Action
## 142                                 Sams, Letha et al
## 143                               San Juan County, NM
## 144                                     SAS Institute
## 145                       Save Our Society From Drugs
## 146                                          Seam Llc
## 147                                 Shelby County, TN
## 148                     Smart Approaches to Marijuana
## 149                          Society for Neuroscience
## 150                         Southern Ute Indian Tribe
## 151                                Starr Commonwealth
## 152                                  State of Indiana
## 153                                 State of Oklahoma
## 154              Strategic Applications International
## 155                              Susan B Anthony List
## 156                                   Teamsters Union
## 157                Therapeutic Communities of America
## 158                             United Parcel Service
## 159                                UnitedHealth Group
## 160                            University of Missouri
## 161                            University of Virginia
## 162                             US Anti-Doping Agency
## 163                            US Chamber of Commerce
## 164                     Ute Mountain Ute Indian Tribe
## 165                                Verde Technologies
## 166                                       Walgreen Co
## 167                                         Walgreens
## 168                                    Warner-Lambert
## 169                             Washington County, OR
## 170                       Washington State University
## 171             Wine & Spirits Wholesalers of America
## 172                    Yellowstone Boys & Girls Ranch
## 173                                   YMCA of the USA

Not quite sure what to do with the long list above…

Changes over time in Alchol & Drug Abuse Policy –

Maybe there will be something more meaningful that jumps out when we look at how the activity by industry changes over time…

library(knitr)
table <-table(ada2$Catname, ada2$Year)
kable(table)
1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
Abortion policy/Anti-Abortion 2 2 2 0 0 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0
Accident & health insurance 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 8 4 4
Agricultural chemicals (fertilizers & pesticides) 0 3 4 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
AIDS treatment & testing 0 0 0 0 0 0 0 0 0 0 4 2 1 0 0 0 0 0 0 0 0 0 0
Aircraft manufacturers 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0
Airlines 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Alcohol 0 0 0 0 0 0 1 1 2 2 3 4 2 3 4 4 4 1 0 2 2 4 1
Amusement/recreation centers 0 0 0 0 0 2 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Architectural services 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Attorneys & law firms 0 0 0 0 0 0 0 0 0 0 0 3 9 4 4 4 3 0 0 0 0 0 0
Aviation services & airports 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Beer 9 7 6 4 6 8 11 12 11 6 17 8 6 5 7 8 11 12 9 5 4 4 6
Biotech products & research 6 3 3 1 1 2 2 1 1 0 3 1 0 0 0 0 0 0 0 0 0 0 0
Book, newspaper & periodical publishing 0 0 0 0 0 2 0 3 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Building trades unions 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Business services 0 0 0 0 0 0 1 5 5 2 3 3 0 0 0 0 0 0 0 0 0 0 0
Casinos, racetracks & gambling 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 5 4 5 5 4
Cell/wireless service providers 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0
Chambers of commerce 2 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
Chemicals 0 0 0 0 0 0 0 1 2 1 0 0 0 0 0 0 0 0 4 3 4 0 0
Children’s rights 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Christian Conservative 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
Churches, clergy & religious organizations 0 0 0 0 1 1 1 3 4 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Civil servant/public employee 5 10 10 5 5 4 4 4 6 4 8 9 10 10 5 6 7 7 7 10 30 51 42
Coal mining 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Commercial TV & radio stations 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Commodity brokers/dealers 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Computer software 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 5 8 4 4
Consumer groups 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Correctional facilities constr & mgmt/for-profit 0 2 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Courts & Justice System 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Data processing & computer services 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0
Defense-related services 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2
Defense aerospace contractors 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Democratic/Liberal 0 0 0 0 0 0 0 0 0 3 5 0 3 1 2 0 0 0 0 0 0 0 0
Dentists 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 7 0 3 4 4 4 4
Department, variety & convenience stores 3 3 1 0 0 0 0 3 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0
Drug & alcohol treatment hospitals 5 4 7 6 6 9 11 8 11 5 15 15 21 18 25 24 17 16 15 12 17 12 15
Drug stores 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 5 8 3 4 4 4
Education 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 4 4 3
Electric Power utilities 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Electronics manufacturing & services 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 1 0 0 0
Employer listed but category unknown 1 0 4 3 10 17 18 13 9 3 7 2 3 7 14 12 13 15 21 16 23 20 24
Engineers - type unknown 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Environmental policy 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Express delivery services 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
Farm bureaus 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Fiscal & tax policy 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
Food and kindred products manufacturing 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Food stores 0 0 0 0 0 0 1 2 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0
Food wholesalers 2 2 1 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Freight & delivery services 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Gas & Electric Utilities 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
General aviation (private pilots) 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Glass products 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Health & welfare policy 3 4 1 1 3 1 3 3 6 5 11 5 3 4 4 5 5 8 13 12 8 1 0
Health care institutions 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 4 1 0 0 0 0
Health care products 1 0 0 0 0 0 2 2 2 0 0 0 0 0 0 0 0 0 0 0 2 4 2
Health care services 0 0 1 0 2 0 1 1 1 0 0 0 2 4 7 4 4 4 4 7 4 4 4
Health professionals 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 2 4 4 4 3 1
Health, Education & Human Resources 0 2 1 0 0 0 0 0 0 0 1 4 0 0 0 0 0 0 0 0 0 0 2
HMOs 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Home care services 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Hospitals 1 1 2 0 2 0 0 0 0 0 0 0 4 4 4 4 4 4 13 10 12 16 9
Hotels & motels 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Household & office products 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 0 0 0 0
Household cleansers & chemicals 0 0 0 0 0 0 0 0 0 0 3 3 3 2 4 4 4 4 0 0 0 0 0
Import/Export services 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Indian Gaming 0 0 0 0 0 0 0 0 1 2 4 0 0 0 0 0 0 0 0 0 0 0 0
Industrial/commercial equipment & materials 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0
International trade associations 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Internet & Online Services 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0
Life insurance 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Liquor stores 1 1 1 0 2 2 2 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Liquor wholesalers 1 4 2 2 2 2 4 4 4 4 6 8 7 17 18 12 12 8 11 4 4 5 8
Lobbyists & Public Relations 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 4 4
Lodging & tourism 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Management consultants & services 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0
Marijuana Production, Sales & Paraphernalia 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 3
Medical Devices & Supplies 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 0
Medical laboratories 3 5 2 3 2 1 5 2 3 0 0 0 4 3 4 0 0 0 0 0 3 4 4
Medical schools 2 3 4 2 4 3 4 2 1 2 2 1 0 0 0 0 0 0 0 0 0 0 0
Mental Health Services 1 2 1 0 0 0 0 0 0 0 0 1 2 3 1 1 5 8 8 9 8 9 8
Military 0 0 2 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Minority/Ethnic Groups 1 0 0 0 0 0 0 0 1 2 6 3 4 4 5 0 0 0 0 3 0 0 0
Museums, art galleries, libraries, etc. 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Natural Gas transmission & distribution 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Non-profit foundations 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 4 4 4 7 3 0
Non-Profits 4 4 4 3 7 3 2 5 3 4 12 10 4 4 4 4 6 4 5 4 5 6 6
Nurses 1 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 0 0
Nutritional & dietary supplements 2 1 0 0 0 0 0 0 0 0 0 1 0 0 2 0 0 0 0 0 0 0 0
Oilfield service, equipment & exploration 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Optometrists & Ophthalmologists 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 4 0 0 0 0 0 0
Other non-physician health practitioners 4 5 5 3 3 2 2 1 0 0 0 3 0 0 0 0 0 0 0 4 4 4 5
Other physician specialists 0 0 1 1 2 0 0 1 0 1 3 2 3 4 9 9 8 7 8 8 11 12 12
Other single-issue or ideological groups 8 3 5 8 8 7 4 5 5 13 17 10 3 0 0 3 1 1 7 0 0 9 9
Other unions 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Outpatient health services (incl drug & alcohol) 7 7 9 9 10 10 8 3 3 4 4 3 4 4 4 4 4 4 7 9 8 8 4
Petroleum refining & marketing 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0
Pharmaceutical manufacturing 1 6 2 2 3 7 12 16 12 8 18 11 13 13 17 28 42 52 57 52 56 42 28
Pharmaceutical wholesale 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 1 6 5 8 9 8 8 4
Pharmacists 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 8 9 8 8 4 4
Physicians 0 0 0 3 3 2 2 2 2 1 3 1 3 3 7 5 14 4 12 8 7 7 1
Police & firefighters unions & associations 0 1 2 2 2 3 1 3 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Precision instruments 0 0 0 0 0 0 3 3 2 2 1 0 0 0 0 0 0 0 0 0 0 0 0
Professional sports, arenas & related equip & svcs 0 0 0 2 4 5 4 9 7 4 13 8 9 3 5 6 4 4 4 4 4 4 4
Property & casualty insurance 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 4 5 8 13
Psychiatrists & psychologists 0 2 1 2 2 1 2 3 4 5 7 6 5 6 8 8 5 4 0 0 11 5 4
Public school teachers, administrators & officials 2 0 0 0 1 2 1 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Public works, industrial & commercial construction 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Railroads 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Real estate 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Real Estate developers & subdividers 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Recorded Music & music production 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Republican/Conservative 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 2 0 1 3 0
Restaurants & drinking establishments 0 2 5 1 2 2 3 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Schools & colleges 7 10 9 5 12 9 7 5 4 7 15 4 3 3 4 4 0 0 8 14 21 13 6
Services 0 0 0 1 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
State & local govt employee unions 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 5 4 1
Teamsters union 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 2 0 0
Tobacco & Tobacco products 6 8 10 7 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Transportation 1 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Transportation unions 0 0 0 2 2 2 2 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0
US Postal Service unions & associations 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0
Waste management 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0
Welfare & Social Work 1 0 0 0 2 3 0 0 1 5 4 2 2 1 4 2 0 0 0 0 0 0 0
Wine & distilled spirits manufacturing 7 13 12 9 13 11 13 14 17 16 31 33 28 23 34 28 27 24 24 28 29 22 27

This has interesting information….but it has a lot of information…thoughts on what to highlight?

library(knitr)
table3 <-table(ada2$Industry, ada2$Year)
kable(table3)
1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
Abortion Policy/Anti-Abortion 2 2 2 0 0 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0
Agricultural Services/Products 0 3 4 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Air Transport 0 0 1 0 3 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0
Beer, Wine & Liquor 18 25 21 15 23 23 31 31 37 28 57 53 43 48 63 52 54 45 44 39 39 35 42
Building Trade Unions 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Business Associations 2 2 3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
Business Services 0 0 0 0 0 0 1 5 5 2 3 3 1 1 0 0 0 0 0 0 0 0 0
Casinos/Gambling 0 0 0 0 0 0 0 0 1 2 4 0 0 0 0 0 0 2 5 4 5 5 4
Chemical & Related Manufacturing 0 0 0 0 0 0 0 1 2 1 3 3 3 2 4 4 4 4 4 3 4 0 0
Civil Servants/Public Officials 5 10 10 5 5 4 4 5 7 4 8 9 10 10 5 6 7 7 7 10 30 51 42
Clergy & Religious Organizations 0 0 0 0 1 1 1 3 4 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Construction Services 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Defense Aerospace 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Democratic/Liberal 0 0 0 0 0 0 0 0 0 3 5 0 3 1 2 0 0 0 0 0 0 0 0
Education 11 13 13 8 17 14 12 8 7 9 17 5 3 3 4 4 0 0 8 17 25 17 9
Electric Utilities 1 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Electronics Mfg & Equip 0 0 0 0 2 0 0 1 0 0 0 0 0 0 0 0 0 4 5 6 12 5 4
Employer Listed/Category Unknown 1 0 4 3 10 17 18 13 9 3 7 2 3 7 14 12 13 15 21 16 23 20 24
Environment 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Food & Beverage 0 2 5 1 2 2 3 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Food Processing & Sales 2 2 3 2 2 0 1 2 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0
General Contractors 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Health Professionals 5 7 7 11 10 5 6 7 6 10 13 12 11 13 26 28 39 25 36 38 51 39 31
Health Services/HMOs 11 14 15 12 14 11 14 6 7 4 8 6 13 14 16 9 13 16 19 25 23 25 20
Hospitals/Nursing Homes 6 5 9 6 8 9 11 8 11 5 15 15 25 22 29 28 23 24 29 22 29 28 24
Human Rights 4 4 1 1 3 1 3 4 7 7 17 8 7 8 9 5 5 8 13 15 8 1 0
Insurance 3 2 0 0 1 0 0 0 0 0 0 0 0 0 0 4 4 0 0 8 13 12 17
Internet 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0
Lawyers/Law Firms 0 0 0 0 0 0 0 0 0 0 0 3 9 4 4 4 3 0 0 0 0 0 0
Lobbyists 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 4 4
Lodging/Tourism 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Marijuana 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 3
Mining 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Misc Business 0 2 3 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Misc Defense 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2
Misc Health 0 2 1 0 0 0 0 0 0 0 1 4 0 0 0 0 0 0 0 0 0 0 2
Misc Issues 8 3 5 8 8 8 4 6 5 13 17 10 4 0 0 3 1 1 7 0 0 9 9
Misc Manufacturing & Distributing 0 1 1 0 0 0 3 3 2 2 7 0 0 0 0 0 0 0 0 0 4 4 0
Misc Services 0 0 0 1 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Misc Transport 1 2 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Misc Unions 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Non-Profit Institutions 6 4 4 3 7 3 2 5 3 4 12 10 4 4 4 4 9 8 9 8 12 9 6
Oil & Gas 0 0 1 0 0 0 0 0 1 1 0 0 0 0 3 0 0 0 0 0 0 0 0
Other 1 0 2 0 3 3 0 0 1 5 4 2 2 1 4 2 0 0 0 0 0 0 0
Pharmaceuticals/Health Products 10 10 5 3 4 9 16 19 15 8 24 13 13 13 19 29 48 57 69 65 66 54 34
Printing & Publishing 0 0 0 0 0 2 0 3 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Public Sector Unions 0 1 2 2 2 3 1 3 1 1 0 0 0 0 0 0 0 0 0 3 7 4 1
Railroads 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Real Estate 0 0 0 0 2 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Recreation/Live Entertainment 0 0 0 2 4 7 5 9 8 4 13 8 9 3 5 6 4 4 4 4 4 4 4
Republican/Conservative 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 2 0 1 3 0
Retail Sales 4 3 1 0 0 0 0 3 2 0 0 1 0 0 0 0 8 5 8 3 4 4 4
Securities & Investment 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Telecom Services 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0
Tobacco 6 8 10 7 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Transportation Unions 0 0 0 2 2 2 2 0 2 0 0 0 0 0 0 0 0 0 0 4 2 0 0
TV/Movies/Music 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Waste Management 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0

Perhaps it is worth picking all industries that are over 10 above and graphing them….over time….thoughts?

library(knitr)
table4 <-table(ada2$Sector, ada2$Year)
kable(table4)
1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
Agribusiness 8 13 17 11 8 0 1 2 1 2 0 0 0 0 0 0 0 0 0 1 0 0 0
Communic/Electronics 0 0 0 1 4 2 0 4 3 2 0 0 0 0 0 0 0 4 7 6 12 5 4
Construction 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Defense 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2
Energy/Nat Resource 3 0 1 2 1 0 0 0 1 1 0 0 0 0 3 0 0 0 0 0 2 0 0
Finance/Insur/RealEst 3 2 0 0 4 0 0 0 0 1 0 0 0 0 0 4 4 0 0 8 13 12 17
Health 32 38 37 32 36 34 47 40 39 27 61 50 62 62 90 94 123 122 153 150 169 146 111
Ideology/Single-Issue 17 11 9 9 11 11 9 10 12 23 39 18 14 9 11 9 7 10 22 16 9 16 9
Labor 0 1 2 4 4 7 3 3 3 1 0 0 0 0 0 0 0 0 0 7 9 4 2
Lawyers & Lobbyists 0 0 0 0 0 0 0 0 0 0 0 3 9 4 4 4 3 4 4 4 4 4 4
Misc Business 24 35 35 23 32 35 43 52 58 39 87 68 56 54 72 62 70 60 65 53 60 57 57
Other 23 27 29 16 33 25 19 21 22 22 42 26 19 18 17 16 16 15 24 35 67 77 57
Transportation 1 2 3 1 4 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0
Unknown 1 0 4 3 10 17 18 13 9 3 7 2 3 7 14 12 13 15 21 16 23 20 24

Could graph health….

Law Enforcement Lobbying Over Time

library(knitr)
table2 <-table(le2$Catname, le2$Year)
kable(table2)
1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
Abortion policy/Anti-Abortion 0 2 2 2 0 2 2 2 2 3 1 1 0 4 2 0 0 3 0 4 0 0 1
Abortion policy/Pro-Abortion Rights 0 1 0 2 0 0 0 0 0 0 0 0 0 0 0 0 3 9 6 8 9 4 3
Accident & health insurance 0 0 3 0 1 0 0 0 0 0 3 0 4 0 0 0 0 0 1 0 0 0 0
Accountants 0 0 0 0 4 4 2 2 2 1 8 10 15 6 4 5 2 0 0 0 0 0 0
Advertising & public relations services 2 2 0 0 0 1 1 0 0 0 0 0 3 0 3 4 0 0 0 0 0 0 0
Agricultural chemicals (fertilizers & pesticides) 0 0 2 0 1 2 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Agriculture 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0
Air transport 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 3 0 0 3 4 4
Air transport unions 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Aircraft manufacturers 0 5 3 2 3 1 1 1 0 0 1 0 1 0 0 0 0 5 2 0 0 0 0
Aircraft parts & equipment 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Airlines 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 4
Alcohol 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 5 4
Alternate energy production & services 0 0 1 0 0 0 0 1 2 1 5 7 4 3 4 4 4 4 4 4 7 7 8
Amusement/recreation centers 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 4 4
Animal feed & health products 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 5 4 4 4 2 0 0 0
Animal Rights 3 2 0 0 0 0 1 4 3 2 3 4 4 0 0 0 0 0 0 0 0 0 0
Anti-Guns 2 1 1 1 1 1 2 0 0 4 7 4 4 2 6 2 4 4 4 8 14 19 23
Apparel & accessory stores 0 0 0 0 1 3 4 2 2 1 2 4 1 0 0 0 0 0 0 0 0 0 0
Architectural services 0 0 0 0 0 0 2 2 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0
Attorneys & law firms 9 7 4 9 6 9 6 8 16 16 24 27 26 19 19 18 13 16 26 23 21 14 14
Auto dealers, foreign imports 0 0 1 1 2 2 3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Auto dealers, new & used 0 0 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0
Auto manufacturers 2 1 3 2 2 4 2 0 0 0 4 2 0 0 0 0 1 3 4 1 1 0 4
Automotive, Misc 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Aviation services & airports 0 2 5 2 6 3 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Banks & lending institutions 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
Beer 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 4 0 0 0 0 0 0
Beverages (non-alcoholic) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 4 2 0 0 0 0 2
Bicycles & other non-motorized recreational transp 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Biotech products & research 0 0 4 1 4 3 4 7 12 7 13 6 11 9 13 6 7 13 15 10 7 5 1
Book, newspaper & periodical publishing 1 0 2 0 4 4 3 4 2 1 6 2 2 1 0 0 0 0 0 2 0 0 1
Builders associations 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 1 2 1 0 0
Building materials 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Building operators and managers 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 2 0 3 4 0 0 0 0
Bus services 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 4 0 0 0 0 0 0 0
Business services 1 4 3 1 3 7 3 4 12 16 13 4 2 5 14 17 8 8 11 12 11 4 7
Business tax coalitions 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 4 4 4 4
Cable & satellite TV production 0 0 0 0 2 0 2 3 1 3 1 0 0 0 0 0 0 0 0 0 1 0 0
Cable distributors & service providers 0 0 1 1 0 0 0 0 2 0 3 5 6 11 10 8 8 5 7 2 0 0 0
Car rental agencies 2 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Casinos, racetracks & gambling 0 0 1 0 0 0 2 1 0 1 1 0 0 0 0 0 0 13 13 9 10 8 7
Cell/wireless service providers 0 0 0 2 4 3 3 4 3 0 2 5 1 0 0 0 0 2 2 5 1 1 3
Chambers of commerce 0 3 2 3 4 4 5 2 3 8 20 17 10 15 20 20 22 30 30 24 27 19 18
Chemicals 2 2 3 2 2 3 3 3 2 2 3 0 3 10 8 6 0 0 0 2 0 2 0
Children’s rights 0 0 0 1 2 0 4 4 6 13 24 24 22 17 30 13 11 12 13 12 18 17 20
Chiropractors 0 0 0 0 0 0 0 0 0 0 3 3 0 0 0 0 0 0 0 0 0 0 0
Christian Conservative 1 2 1 2 5 2 3 4 5 6 8 8 6 12 23 17 8 2 1 0 3 4 5
Churches, clergy & religious organizations 2 2 1 2 1 1 2 4 4 5 14 18 21 10 10 26 21 14 13 11 10 13 22
Civil servant/public employee 84 91 111 93 125 100 122 127 122 143 274 277 300 262 336 351 352 340 291 338 380 367 359
Civil service & government unions 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
Clothing & accessories 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 1
Commercial banks & bank holding companies 4 1 3 2 3 1 2 1 2 2 18 7 6 6 14 3 4 4 4 4 4 4 4
Commercial service unions 0 1 0 0 0 1 0 1 2 3 0 4 2 0 0 0 0 2 0 0 6 2 5
Commercial TV & radio stations 0 0 0 0 5 0 0 0 4 1 0 1 4 0 0 1 3 0 0 0 0 1 0
Commodity brokers/dealers 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0
Communications & Electronics 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4
Communications & hi-tech unions 0 0 0 0 0 0 0 0 0 0 3 2 0 0 0 0 0 0 0 0 0 0 1
Computer components & accessories 2 2 3 3 5 1 2 2 3 5 7 6 9 9 8 12 9 8 4 10 14 10 13
Computer manufacture & services 2 1 1 2 1 3 4 2 2 0 2 8 6 3 1 1 0 0 0 0 0 0 2
Computer software 4 5 3 2 4 3 3 8 8 11 9 6 11 16 11 17 15 43 41 44 48 40 34
Confectionery processors & manufacturers 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Construction equipment 3 0 0 0 0 0 0 0 0 0 0 0 0 2 3 4 0 0 0 0 0 2 8
Construction, unclassified 0 0 0 0 0 0 0 0 0 0 0 4 2 0 0 0 0 0 0 0 0 0 0
Consumer electronics & computer stores 0 0 0 0 0 0 0 2 0 0 3 3 0 0 0 0 0 0 0 0 0 0 0
Consumer groups 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Corporate lawyers & law firms 0 0 0 0 3 0 1 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0
Correctional facilities constr & mgmt/for-profit 14 11 12 13 14 21 15 19 16 17 39 37 41 26 30 32 22 20 40 40 55 65 61
Courts & Justice System 15 11 14 12 16 14 21 29 30 32 48 55 55 37 36 40 44 59 65 63 75 46 47
Credit agencies & finance companies 3 4 1 4 3 1 2 2 6 10 26 16 9 9 19 12 5 8 5 5 6 10 11
Credit reporting services & collection agencies 0 0 0 1 1 2 5 6 4 4 10 0 0 0 0 0 2 2 3 0 0 0 0
Crop production & basic processing 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Cruise ships & lines 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Data processing & computer services 1 2 1 3 9 3 6 9 9 17 16 9 7 11 12 7 7 6 4 4 6 7 9
Defense 1 2 2 2 2 2 1 2 1 0 6 0 0 0 0 0 0 0 0 0 0 2 0
Defense-related services 0 0 2 2 2 1 2 5 7 1 5 15 18 0 0 0 0 1 2 4 0 4 2
Defense aerospace contractors 2 3 5 4 7 6 1 0 0 0 4 8 0 0 0 5 2 0 0 5 4 0 0
Defense electronic contractors 5 10 13 9 12 7 7 2 7 6 14 15 15 17 15 6 13 8 6 2 8 4 4
Defense policy, hawks 0 2 2 2 2 0 2 1 2 2 1 4 3 1 1 4 4 0 0 0 0 0 0
Defense Research & Development 0 0 1 0 1 2 0 1 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0
Democratic/Liberal 1 2 1 1 1 0 0 1 0 0 9 5 3 3 6 4 4 2 2 8 0 0 0
Department, variety & convenience stores 0 0 0 1 2 0 0 1 3 8 21 22 16 11 5 2 0 1 0 0 0 0 6
Discount & Online Brokers 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Drug & alcohol treatment hospitals 0 0 0 0 0 1 2 2 3 1 3 2 4 2 0 0 2 5 4 0 0 0 0
Drug stores 0 0 0 0 1 0 0 1 3 2 4 7 7 3 13 11 11 14 15 0 0 0 0
Education 0 1 2 0 5 2 2 2 2 0 0 0 0 0 1 2 8 4 6 2 3 0 4
Elderly issues/Social Security 1 0 1 1 0 2 0 1 0 1 4 4 3 2 4 4 3 0 0 0 0 0 0
Electric Power utilities 0 0 0 0 2 0 1 1 0 0 0 7 0 0 0 0 0 0 0 0 0 0 0
Electrical contractors 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
Electrical lighting products 0 0 0 1 2 3 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Electronics manufacturing & services 0 2 2 2 6 5 4 2 9 3 2 2 2 0 0 5 15 17 26 30 24 11 15
Employer listed but category unknown 7 6 16 22 71 26 30 23 20 18 56 52 75 35 66 57 55 71 79 119 159 200 256
Employment agencies 0 0 0 0 0 0 0 2 2 3 11 10 15 8 12 11 12 9 8 6 8 6 4
Energy production & distribution 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Energy, Natural Resources and Environment 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 4 2
Engineering, architecture & construction mgmt svcs 3 0 0 0 1 0 1 4 0 0 0 1 0 3 1 0 0 0 0 0 0 0 0
Engineers - type unknown 0 0 0 3 1 2 5 3 3 3 4 1 0 0 0 0 0 0 0 0 0 0 0
Entertainment Industry/Broadcast & Motion Pictures 0 0 0 3 4 0 1 2 0 4 2 4 4 3 5 5 4 0 0 0 0 0 3
Environmental policy 0 0 0 0 2 4 3 3 1 0 0 0 0 1 4 6 9 12 17 8 9 11 11
Environmental services, equipment & consulting 0 0 1 2 2 0 0 0 0 2 1 1 2 1 0 0 0 0 0 0 0 0 0
Explosives 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 3 0 0 4 2 0 0 0
Express delivery services 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 4 4 1 0 0 0 0 2
Fabricated metal products 0 0 0 0 1 0 0 0 0 0 0 2 2 1 0 0 0 0 0 0 0 0 0
Farm bureaus 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Farm machinery & equipment 0 2 2 2 2 0 1 0 0 0 0 0 0 0 0 0 0 0 2 4 0 0 0
Farm organizations & cooperatives 0 1 1 3 2 3 4 2 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Federal employees unions 0 1 1 2 2 2 1 2 2 0 0 0 0 0 0 0 0 0 0 0 4 5 7
Feedlots & related livestock services 0 0 0 0 0 0 0 0 0 0 2 4 4 3 4 1 0 0 0 0 0 0 0
Finance, Insurance & Real Estate 0 0 0 0 0 0 0 2 1 0 2 3 3 4 9 3 0 0 0 0 0 0 0
Financial services & consulting 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 4 1 0
Fiscal & tax policy 1 0 0 1 0 1 1 1 3 3 2 2 1 0 0 2 4 4 5 4 4 0 4
Fishing 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Food & Beverage Products and Services 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1
Food and kindred products manufacturing 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1
Food catering & food services 0 0 0 0 0 0 0 0 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0
Food service & related unions 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 4
Food stores 0 0 0 1 2 0 2 1 6 11 13 20 13 1 5 6 9 1 0 0 1 4 4
Food wholesalers 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
For-profit Education 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0
Foreign Governments 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Foreign policy 2 2 1 1 0 0 0 0 0 6 2 2 0 0 0 0 0 13 6 14 9 17 23
Freight & delivery services 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 18 3
Furniture & wood products 0 0 0 1 2 2 2 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0
Gas & Electric Utilities 0 0 1 0 1 2 1 0 0 0 0 12 3 0 0 5 3 0 0 0 0 0 0
Gay & lesbian rights & issues 0 0 0 0 1 1 2 4 4 5 13 6 7 2 4 6 8 4 5 5 8 4 4
General business associations 4 1 0 0 0 2 2 2 2 3 6 8 3 2 2 2 1 4 4 4 4 4 4
General commerce 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0
Glass products 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Greeting card publishing 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Ground-based & other weapons systems 1 0 2 2 4 2 2 3 2 0 0 0 0 0 0 5 0 0 2 0 0 0 0
Hardware & building materials stores 0 0 0 0 0 0 1 1 0 1 15 17 15 6 4 7 4 4 5 4 5 4 5
Health & welfare policy 2 2 2 0 4 6 6 2 5 5 14 22 16 10 4 4 6 6 10 5 6 4 4
Health care institutions 0 0 0 3 2 4 0 0 0 0 3 0 0 0 3 6 4 2 3 0 0 0 0
Health care products 2 0 1 0 1 0 0 0 0 2 6 0 5 7 8 6 0 0 0 0 0 4 9
Health care services 0 0 1 0 1 0 0 0 0 0 1 2 1 0 3 0 0 0 0 0 0 0 0
Health professionals 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Health worker unions 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0
Health, Education & Human Resources 0 0 0 0 0 0 0 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Heavy industrial manufacturing 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Hedge Funds 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 4 3 3 0
HMOs 0 0 1 0 2 0 2 2 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0
Home care services 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Homeland Security contractors 4 6 5 3 6 4 8 7 16 11 16 20 14 6 4 6 4 4 14 14 19 23 24
Hospitals 2 0 1 1 3 2 3 2 2 2 3 7 9 4 4 9 4 8 9 4 4 6 8
Hosting/Cloud Services 0 0 0 0 0 0 0 0 0 2 1 0 0 0 0 0 0 0 0 0 0 1 0
Hotels & motels 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 4 4 10 11 15 6
Household & office products 2 1 1 3 4 2 2 1 0 0 0 0 0 0 0 0 2 4 4 5 4 7 8
Household appliances 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Household cleansers & chemicals 0 2 3 0 0 1 2 0 0 0 3 1 0 0 0 0 0 0 0 0 0 0 0
Human Rights 6 5 9 10 9 13 17 5 8 5 13 9 12 16 21 18 16 12 8 20 16 16 15
Independent oil & gas producers 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Independent power generation & cogeneration 0 0 0 0 0 0 0 0 0 0 3 2 0 0 0 0 0 0 0 0 0 0 0
Indian Gaming 0 0 0 3 2 5 3 8 3 2 9 13 15 13 23 21 12 15 16 19 20 16 13
Industrial/commercial equipment & materials 2 1 1 0 2 1 0 0 3 1 0 1 5 0 0 0 4 8 8 0 0 0 0
Insurance 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
Insurance companies, brokers & agents 5 5 7 4 10 2 5 2 2 1 0 0 0 0 0 0 0 0 3 4 0 3 2
Internet & Online Services 0 0 0 2 3 1 0 0 1 2 0 8 4 1 0 4 6 9 8 13 15 23 24
Investment banking 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Investors 0 0 0 0 1 0 0 0 0 2 6 5 3 3 0 0 0 0 0 0 0 0 0
Labor Unions 1 3 2 1 2 3 2 2 0 0 0 0 0 0 0 4 5 9 7 1 1 0 1
Law schools 0 0 0 0 1 0 0 0 3 0 5 1 0 0 0 0 0 2 4 4 4 4 4
Legal Services 2 2 0 0 0 0 0 0 0 0 0 0 3 3 4 1 0 0 0 3 10 7 7
Life insurance 0 3 4 3 7 4 5 0 0 0 0 0 0 0 0 0 5 8 4 0 0 0 3
Liquor wholesalers 2 3 2 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 4 0
Live theater & other entertainment productions 0 0 0 0 0 0 0 1 1 1 4 2 0 0 0 0 0 0 0 1 0 4 4
Lobbyists & Public Relations 0 0 1 1 3 2 2 4 5 5 3 8 19 14 16 13 7 8 8 6 0 0 0
Lodging & tourism 1 0 0 1 2 0 0 0 0 0 0 0 0 0 0 1 2 3 0 0 0 0 0
Long-distance telephone & telegraph service 0 0 1 0 1 0 6 1 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0
Major (multinational) oil & gas producers 3 5 3 4 5 4 2 4 2 3 10 4 4 3 7 9 6 4 4 5 7 6 4
Management consultants & services 0 2 3 1 4 1 1 2 3 5 8 5 6 0 0 0 5 1 4 1 2 0 4
Manufacturers of railroad equipment 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Manufacturing 0 0 0 1 2 1 2 0 0 0 2 0 0 0 3 3 1 4 3 4 0 0 0
Manufacturing unions 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Marijuana Production, Sales & Paraphernalia 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 4 4 5 8 14 24 48 41
Marketing research services 0 0 0 0 0 0 0 0 0 0 0 0 0 1 4 1 0 0 0 0 0 0 3
Medical Devices & Supplies 0 0 0 0 1 0 0 0 1 0 0 0 0 9 12 5 3 0 0 0 0 0 5
Medical laboratories 0 0 0 0 1 1 2 2 1 3 0 1 5 1 0 0 0 0 0 0 3 4 4
Medical schools 0 0 0 0 0 0 1 1 0 0 2 3 3 6 4 4 4 4 4 0 0 0 0
Mental Health Services 0 2 1 0 2 0 2 3 4 5 7 8 2 0 0 0 2 4 2 0 1 3 4
Metal cans & containers 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
Metal mining & processing 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
Military 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 3 4 0 0 0 0
Milk & dairy producers 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Mining 0 1 2 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mining services & equipment 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 3 0 0 0 0
Minority/Ethnic Groups 2 0 0 5 6 7 8 12 6 11 29 26 26 19 33 28 31 22 19 22 24 18 17
Miscellaneous retail stores 0 0 1 3 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0
Mortgage bankers and brokers 1 2 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Motion Picture production & distribution 0 1 1 2 4 1 2 1 2 2 9 3 4 2 4 3 0 0 0 0 0 0 0
Movie Theaters 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0
Museums, art galleries, libraries, etc. 0 0 0 0 2 0 0 0 0 0 0 0 0 0 2 1 1 0 3 8 4 4 0
Natural Gas transmission & distribution 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Non-Contribution, Miscellaneous 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0
Non-profit foundations 1 1 0 1 2 1 1 2 0 0 2 4 4 4 8 1 4 7 20 10 10 10 12
Non-Profits 9 7 14 13 25 18 18 19 22 28 61 45 44 30 27 31 24 19 23 23 29 21 25
Nuclear plant construction, equipment & svcs 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Nurses 0 2 3 1 2 0 0 0 0 0 0 1 0 0 2 3 2 0 0 0 1 4 4
Nursing homes 0 1 1 0 0 1 2 1 2 2 6 5 2 0 2 4 4 4 4 4 1 0 0
Nutritional & dietary supplements 0 0 4 0 0 0 0 0 0 0 0 2 21 10 13 10 11 12 12 11 5 0 0
Office machines 0 0 0 0 0 0 0 0 2 5 6 0 0 0 0 0 0 2 0 0 0 0 0
Oil & Gas 0 0 0 0 1 0 0 1 2 2 3 0 0 0 0 0 0 0 0 0 2 3 0
Oilfield service, equipment & exploration 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
Online Entertainment 0 0 0 0 0 0 0 0 0 0 0 0 0 3 8 1 0 0 0 0 0 0 6
Optometrists & Ophthalmologists 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7
Other 0 3 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Other commercial unions 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 2 5
Other commodities (incl rice, peanuts, honey) 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0
Other Communication Electronics 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 4 6 3 5 5 1
Other Communications Services 0 2 3 2 2 2 3 4 3 7 12 6 3 2 3 8 6 15 4 4 5 5 3
Other construction-related products 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Other financial services 0 0 0 0 0 0 0 0 1 2 0 0 0 3 4 4 4 3 0 0 0 0 0
Other non-physician health practitioners 3 3 1 0 3 0 1 0 0 2 2 0 0 0 0 0 0 0 0 0 0 0 2
Other physician specialists 2 1 5 1 0 2 0 1 0 0 0 0 0 3 4 8 4 12 11 13 8 0 0
Other single-issue or ideological groups 12 11 15 14 24 11 16 26 28 28 56 53 62 62 80 88 78 89 115 94 117 134 125
Other transportation unions 0 0 0 0 0 0 0 0 0 0 2 5 10 4 0 0 0 0 0 0 0 0 0
Other unions 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 0 0
Outpatient health services (incl drug & alcohol) 0 0 0 0 0 0 1 2 2 1 0 0 2 0 0 3 0 0 0 0 0 0 0
Paper & pulp mills and paper manufacturing 0 0 0 0 0 0 1 1 0 0 0 0 3 1 0 0 0 0 0 0 0 0 0
Paper, glass & packaging materials 0 0 0 0 1 2 2 1 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0
Payday lenders 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Personal health care products 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Petroleum refining & marketing 0 2 0 0 0 4 6 1 0 2 8 12 6 3 0 3 0 5 5 4 5 6 6
Pharmaceutical cannabis 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 3 0
Pharmaceutical manufacturing 5 12 13 7 6 1 1 3 9 8 14 5 7 10 6 1 10 10 8 3 7 12 8
Pharmaceutical wholesale 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Pharmacists 0 0 0 0 0 0 0 0 0 0 0 1 5 3 5 5 4 4 0 0 0 0 0
Photographic equipment & supplies 0 0 0 0 4 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Physicians 1 4 3 3 2 2 1 2 2 1 7 3 4 4 11 4 3 3 4 0 1 4 4
Plastics & Rubber processing & products 0 0 2 2 1 3 2 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Pleasure boats 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Plumbing & pipe products 0 0 0 0 0 0 0 2 2 0 2 3 4 3 1 4 0 0 0 0 0 0 0
Plumbing, heating & air conditioning 0 0 0 0 0 0 1 0 0 0 1 4 0 0 0 1 0 0 0 0 0 3 1
Police & firefighters unions & associations 14 16 21 22 19 19 18 14 18 17 49 42 48 51 70 60 65 61 55 41 48 51 48
Power plant construction & equipment 0 0 1 1 2 0 0 0 0 0 0 0 0 0 0 2 2 0 0 0 0 0 0
Precision instruments 2 1 0 3 2 0 3 3 4 0 0 0 0 0 2 0 2 0 0 4 4 0 2
Printing and publishing (printed & online) 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0
Private Equity & Investment Firms 0 0 0 0 0 1 1 2 4 5 4 7 7 2 0 0 0 0 0 0 0 2 0
Pro-Arab 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Pro-business associations 2 7 9 2 1 0 0 0 0 0 0 0 0 0 0 0 3 2 0 0 0 0 17
Pro-Guns 7 8 5 6 4 1 1 1 2 1 4 3 4 3 4 5 7 7 6 9 8 8 6
Pro-Israel 0 0 3 1 2 3 2 3 4 3 4 2 5 1 3 0 0 0 2 4 2 3 0
Professional sports, arenas & related equip & svcs 7 9 3 2 2 2 1 3 2 1 3 3 6 1 0 0 0 0 0 2 8 5 4
Property & casualty insurance 0 0 2 4 3 10 9 1 0 0 0 0 0 2 4 0 0 0 0 1 2 1 6
Psychiatrists & psychologists 6 5 3 6 3 2 6 6 7 9 14 11 10 1 0 6 12 15 20 8 16 10 10
Public official (elected or appointed) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 4 4 5 4 4
Public school teachers, administrators & officials 3 4 3 3 3 0 2 0 0 1 0 0 0 0 0 6 4 1 0 0 3 4 5
Public works, industrial & commercial construction 0 0 1 0 0 0 2 2 1 0 4 4 9 3 0 0 0 0 0 0 0 0 0
Railroads 0 0 0 0 6 2 6 6 5 2 0 2 0 0 0 0 0 0 0 0 0 0 2
Real estate 0 0 2 0 1 1 0 2 2 1 6 1 0 0 0 0 0 0 0 0 0 0 0
Real estate agents 0 0 0 0 0 0 0 0 0 2 0 5 3 2 4 4 4 5 4 4 3 0 0
Real Estate developers & subdividers 0 0 0 0 2 0 0 5 2 6 7 5 8 2 0 5 6 4 4 4 4 6 4
Recorded Music & music production 0 3 1 3 3 0 5 1 2 1 0 0 0 0 0 0 0 0 0 0 0 0 6
Recreation/Entertainment 0 0 0 0 0 0 0 0 0 2 1 0 0 0 4 0 0 1 0 0 0 0 0
Recycling of metal, paper, plastics, etc. 0 0 0 0 1 0 0 0 0 0 2 7 10 9 12 13 16 15 10 8 8 8 5
Republican/Conservative 4 4 2 2 4 2 4 3 2 2 5 6 10 7 8 5 5 3 2 3 17 16 16
Resorts 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Restaurants & drinking establishments 0 0 1 3 2 1 1 2 2 3 7 3 6 5 4 4 4 8 8 4 5 4 4
Retail trade 0 0 0 0 0 0 1 0 4 8 18 21 23 15 10 9 7 7 8 5 2 0 7
Rural electric cooperatives 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 0 0 0 0
Satellite communications 0 0 3 0 1 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0
Savings banks & Savings and Loans 0 0 0 0 0 3 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Schools & colleges 7 18 15 15 38 28 20 21 31 33 83 72 76 66 54 56 57 59 48 59 40 35 34
Sea freight & passenger services 0 0 1 0 0 0 1 3 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0
Sea transport 1 0 1 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
Search Engine/Email Services 0 2 2 0 0 0 0 0 0 0 0 0 0 1 0 4 10 17 11 23 24 12 15
Securities, commodities & investment 0 0 0 2 1 1 0 1 0 1 4 0 0 0 0 0 0 0 0 0 0 0 0
Security brokers & investment companies 0 1 2 1 3 0 0 0 0 3 8 2 2 0 0 0 0 0 0 5 5 0 0
Security services 6 10 10 12 18 17 27 23 18 23 38 29 30 21 23 29 25 24 26 26 30 13 9
Services 0 0 0 1 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Ship building & repair 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Small arms & ammunition 3 4 2 0 0 0 1 1 2 0 4 4 3 0 6 4 3 4 0 0 7 11 11
Small business associations 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
Smelting & non-petroleum refining 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Social Media 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 7 12 12 9 9 20
Space vehicles & components 0 0 1 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Sporting goods sales & manufacturing 0 0 0 0 1 2 1 1 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0
State & local govt employee unions 2 2 2 1 2 2 2 2 1 4 4 4 5 1 4 4 3 5 3 4 1 4 5
Steel 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Stone, clay, glass & concrete products 0 0 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3
Sugar cane & sugar beets 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Taxicabs 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0
Teachers unions 2 1 0 3 1 1 1 0 2 0 0 0 0 1 2 1 2 1 3 2 4 5 5
Teamsters union 0 0 0 0 2 2 1 2 2 2 2 4 4 0 0 0 0 2 1 0 4 0 0
Technical, business and vocational schools & svcs 0 0 0 0 0 0 0 0 0 0 0 4 3 3 4 4 5 4 6 8 8 8 8
Telecommunications 2 2 6 3 0 0 0 0 7 5 2 6 11 5 7 2 0 0 0 0 0 0 0
Telecommunications Devices 3 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Telephone utilities 5 8 3 3 4 3 2 0 2 3 2 2 8 14 9 3 4 5 8 0 2 4 4
Textiles & fabrics 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Title insurance & title abstract offices 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 4 2
Tobacco & Tobacco products 0 0 1 1 4 2 2 2 2 3 1 4 5 4 0 1 0 0 0 0 0 0 0
Toiletries & cosmetics 0 0 1 0 0 0 1 5 2 1 7 5 4 3 6 4 4 4 4 4 4 4 7
Transportation 0 0 0 0 1 0 0 0 0 0 0 0 0 0 7 8 7 0 0 0 0 0 0
Transportation unions 0 1 1 2 0 0 0 0 0 0 2 2 3 2 4 4 5 4 5 6 4 4 5
Travel agents 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Trial lawyers & law firms 2 1 2 2 2 3 2 3 2 3 8 10 9 4 4 0 0 0 6 11 14 17 15
Truck & trailer manufacturers 0 0 0 0 0 2 2 1 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0
Truck/Automotive parts & accessories 0 0 0 0 2 4 2 3 2 2 0 0 0 0 0 0 0 0 4 5 8 9 4
Trucking 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Trucking companies & services 0 4 2 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
Vending Machine Sales & Services 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Vendors 0 0 2 0 2 4 2 2 2 3 13 21 19 7 9 8 4 0 0 1 5 6 4
Venture capital 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
Veterinarians 0 0 0 0 0 0 0 0 0 0 0 1 0 0 4 5 4 4 4 0 0 0 0
Video rental 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Waste management 0 0 0 0 0 0 0 0 1 1 4 3 0 1 4 2 0 4 4 4 4 4 4
Water Utilities 0 0 1 0 1 0 0 0 0 0 0 2 6 5 5 0 0 0 0 0 0 0 0
Welfare & Social Work 6 9 8 9 5 9 10 9 3 9 19 13 10 15 20 12 4 6 16 10 10 15 9
Wheat, corn, soybeans and cash grain 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Wine & distilled spirits manufacturing 2 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 3 0 0
Women’s issues 2 2 0 0 0 4 4 3 2 5 1 4 5 17 19 10 8 8 5 7 4 6 10
library(knitr)
table4 <-table(le2$Industry, le2$Year)
kable(table4)
1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
Abortion Policy/Anti-Abortion 0 2 2 2 0 2 2 2 2 3 1 1 0 4 2 0 0 3 0 4 0 0 1
Abortion Policy/Pro-Abortion Rights 0 1 0 2 0 0 0 0 0 0 0 0 0 0 0 0 3 9 6 8 9 4 3
Accountants 0 0 0 0 4 4 2 2 2 1 8 10 15 6 4 5 2 0 0 0 0 0 0
Agricultural Services/Products 0 3 5 5 5 5 6 3 1 1 0 1 0 0 8 10 8 8 10 7 0 0 0
Air Transport 0 7 12 4 13 4 5 1 1 0 1 0 3 0 0 4 4 9 2 1 3 4 10
Automotive 4 2 4 4 8 10 7 4 2 2 6 2 0 0 0 0 1 3 8 6 9 9 8
Beer, Wine & Liquor 4 4 3 0 2 0 0 0 1 0 0 0 0 0 0 5 4 0 0 0 8 9 4
Building Materials & Equipment 3 1 2 0 1 2 1 3 2 0 2 3 4 5 4 8 0 0 0 0 0 2 11
Business Associations 6 11 11 5 5 6 7 4 5 11 26 25 13 17 22 22 27 36 40 32 35 27 43
Business Services 9 18 16 14 25 26 32 31 35 47 70 48 56 35 56 62 50 42 49 45 51 23 27
Casinos/Gambling 0 0 1 3 2 5 5 9 3 3 10 13 15 13 23 21 12 28 29 28 30 24 20
Chemical & Related Manufacturing 2 4 8 4 3 7 8 7 3 3 6 1 3 10 8 9 0 0 4 4 0 2 0
Civil Servants/Public Officials 99 102 125 105 141 114 143 156 152 175 322 332 355 299 372 391 396 402 360 405 460 417 410
Clergy & Religious Organizations 2 2 1 2 1 1 2 4 4 5 14 18 21 10 10 26 21 14 13 11 10 13 22
Commercial Banks 4 1 3 2 3 2 2 1 2 2 18 7 6 6 14 3 4 4 4 4 4 5 4
Construction Services 3 0 0 3 2 2 8 9 5 5 4 2 0 3 1 0 0 0 0 0 0 0 0
Crop Production & Basic Processing 0 0 1 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0
Dairy 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Defense Aerospace 2 3 5 4 7 6 1 0 0 0 4 8 0 0 0 5 2 0 0 5 4 0 0
Defense Electronics 5 10 13 9 12 7 7 2 7 6 14 15 15 17 15 6 13 8 6 2 8 4 4
Democratic/Liberal 1 2 1 1 1 0 0 1 0 0 9 5 3 3 6 4 4 2 2 8 0 0 0
Education 10 23 20 18 48 30 25 24 36 34 90 80 82 75 63 72 80 74 68 73 58 51 55
Electric Utilities 0 0 2 0 3 2 2 1 0 0 3 21 3 0 0 9 7 0 0 0 0 0 0
Electronics Mfg & Equip 12 12 10 12 26 15 19 23 31 36 36 31 35 39 32 42 48 78 81 91 97 73 74
Employer Listed/Category Unknown 7 6 16 22 71 26 30 23 20 18 56 52 75 35 66 57 55 71 79 119 159 200 256
Environment 0 0 0 0 2 4 3 3 1 0 0 0 0 1 4 6 9 12 17 8 9 11 11
Environmental Svcs/Equipment 0 0 1 2 2 0 0 0 0 2 1 1 2 1 0 0 0 0 0 0 0 0 0
Finance/Credit Companies 4 4 1 4 3 1 2 2 6 10 26 16 9 9 19 12 5 8 5 5 6 10 11
Fisheries & Wildlife 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Food & Beverage 0 0 2 3 3 1 1 2 2 5 9 3 6 5 4 6 8 10 8 4 5 4 6
Food Processing & Sales 1 0 1 1 3 0 2 2 6 11 13 20 14 1 5 6 9 1 0 1 1 4 6
Foreign & Defense Policy 2 4 3 3 2 0 2 2 4 8 3 6 3 1 1 4 4 13 6 14 9 17 23
Forestry & Forest Products 0 0 0 0 0 0 1 1 0 0 0 0 3 1 0 0 0 0 0 0 0 0 0
General Contractors 0 0 1 0 0 0 2 2 1 0 4 8 11 3 0 2 0 0 1 2 1 0 0
Gun Control 2 1 1 1 1 1 2 0 0 4 7 4 4 2 6 2 4 4 4 8 14 19 23
Gun Rights 7 8 5 6 4 1 1 1 2 1 4 3 4 3 4 5 7 7 6 9 8 8 6
Health Professionals 12 15 16 11 10 6 8 9 9 12 26 19 19 11 22 26 25 34 35 21 26 18 28
Health Services/HMOs 0 2 4 0 6 1 7 9 8 11 8 11 10 1 3 3 2 4 2 0 4 7 8
Hospitals/Nursing Homes 2 1 2 4 5 8 7 5 7 5 15 14 15 6 9 19 14 19 20 8 5 6 8
Human Rights 10 7 11 16 22 27 37 27 29 39 93 87 83 64 92 69 72 56 55 64 72 59 60
Industrial Unions 0 0 0 0 0 0 0 1 0 0 3 2 0 0 0 0 0 0 0 0 0 0 1
Insurance 5 8 16 11 21 16 20 4 2 1 3 0 4 2 4 0 5 8 9 5 2 4 11
Internet 0 2 4 2 5 5 2 2 3 7 14 29 23 12 17 17 24 33 31 49 53 51 69
Lawyers/Law Firms 13 10 6 11 11 12 9 11 18 20 34 37 38 26 27 19 13 16 32 37 45 38 36
Livestock 0 0 0 0 0 0 0 0 0 0 2 4 4 3 4 1 0 0 0 0 0 0 0
Lobbyists 0 0 1 1 3 2 2 4 5 5 3 8 19 14 16 13 7 8 8 6 0 0 0
Lodging/Tourism 1 2 0 1 2 0 0 0 1 0 0 0 0 0 0 1 7 7 4 10 11 15 6
Marijuana 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 4 4 5 8 14 24 48 41
Mining 0 1 2 0 4 0 0 0 0 0 0 0 0 0 0 0 1 5 3 0 0 0 0
Misc Agriculture 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0
Misc Business 14 11 12 13 14 21 15 19 16 17 39 37 44 26 30 32 22 20 40 40 55 65 61
Misc Communications/Electronics 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4
Misc Defense 6 8 12 9 15 11 13 18 26 12 27 38 32 6 4 11 4 5 18 18 19 29 26
Misc Energy 0 0 5 1 3 0 0 1 2 1 5 9 10 8 9 6 6 4 4 4 9 11 10
Misc Finance 0 0 0 1 2 3 6 8 6 8 18 8 6 10 13 7 6 5 3 1 4 1 0
Misc Health 0 0 0 0 0 0 0 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Misc Issues 19 13 16 16 25 14 18 32 34 34 65 63 70 64 84 94 85 93 120 98 121 134 129
Misc Manufacturing & Distributing 11 7 5 9 26 16 18 15 17 11 21 19 24 13 29 24 32 45 29 25 28 30 34
Misc Services 0 0 0 1 4 4 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Misc Transport 0 0 1 0 2 1 0 0 0 0 0 0 0 0 8 12 7 0 0 0 4 18 3
Misc Unions 1 5 3 1 2 5 2 3 2 3 0 4 2 0 0 4 5 11 7 7 9 7 15
Non-contribution 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0
Non-Profit Institutions 10 8 14 14 29 19 19 21 22 28 63 49 48 34 37 33 29 26 46 41 43 35 37
Oil & Gas 3 7 5 4 6 8 8 6 4 7 21 16 10 6 7 12 6 9 9 9 15 15 10
Other 6 12 9 10 5 9 10 9 3 9 19 13 10 15 20 12 5 9 20 10 10 15 9
Pharmaceuticals/Health Products 7 12 23 8 12 4 5 12 22 17 33 13 44 45 52 28 31 36 37 24 19 24 23
Printing & Publishing 1 1 2 0 4 4 3 4 2 2 8 2 2 1 0 0 0 0 0 2 0 0 1
Pro-Israel 0 0 3 1 2 3 2 3 4 3 4 2 5 1 3 0 0 0 2 4 2 3 0
Public Sector Unions 18 20 24 28 24 24 22 18 23 21 53 46 53 53 76 66 70 67 61 47 57 65 65
Railroads 0 0 0 0 7 2 6 6 5 2 0 2 0 0 0 0 0 0 0 0 0 0 2
Real Estate 2 2 2 0 6 1 0 7 4 10 13 11 11 4 4 11 10 12 12 9 9 10 7
Recreation/Live Entertainment 7 9 3 2 2 2 1 3 2 3 4 3 6 1 4 0 0 1 0 2 10 9 8
Republican/Conservative 5 6 3 4 9 4 7 7 7 8 13 14 16 19 31 22 13 5 3 3 20 20 21
Retail Sales 0 0 1 4 6 3 6 7 12 20 63 74 62 36 32 29 22 26 29 9 7 4 18
Savings & Loans 0 0 0 0 0 3 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Sea Transport 1 0 4 0 1 0 1 4 1 0 3 1 0 0 0 0 0 0 0 0 0 0 0
Securities & Investment 0 1 2 4 8 2 2 3 4 9 16 9 9 2 1 4 0 0 0 9 8 5 0
Special Trade Contractors 0 0 0 0 0 0 1 0 0 0 1 4 0 0 0 2 0 0 0 0 0 3 1
Steel Production 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Telecom Services 2 4 13 8 7 5 7 9 16 12 19 23 21 18 20 18 14 22 13 11 6 6 6
Telephone Utilities 5 8 4 3 5 3 8 1 2 3 7 2 8 14 9 3 4 5 8 0 2 4 4
Textiles 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Tobacco 0 0 1 1 4 2 2 2 2 3 1 4 5 4 0 1 0 0 0 0 0 0 0
Transportation Unions 2 1 1 2 2 2 1 2 2 2 6 11 17 6 4 4 5 6 6 6 8 4 5
Trucking 0 4 3 0 0 2 2 3 0 0 0 3 0 0 0 0 0 0 0 0 0 1 0
TV/Movies/Music 0 4 2 8 18 1 10 8 10 12 16 10 12 5 9 11 7 0 0 1 1 5 13
Waste Management 0 0 0 0 0 0 0 0 1 1 4 3 0 1 4 2 0 4 4 4 4 4 4
Women’s Issues 2 2 0 0 0 4 4 3 2 5 1 4 5 17 19 10 8 8 5 7 4 6 10
library(knitr)
table5 <-table(le2$Sector, le2$Year)
kable(table5)
1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
Agribusiness 1 3 9 7 17 7 11 8 9 15 17 29 26 9 17 18 20 9 12 8 1 4 6
Communic/Electronics 20 31 35 33 65 33 49 47 64 72 100 97 101 89 87 91 97 138 133 154 159 139 171
Construction 6 1 3 3 3 4 12 14 8 5 11 17 15 11 5 12 0 0 1 2 1 5 12
Defense 13 21 30 22 34 24 21 20 33 18 45 61 47 23 19 22 19 13 24 25 31 33 30
Energy/Nat Resource 4 8 15 7 18 10 10 8 7 11 34 50 25 16 20 29 20 22 20 17 28 30 24
Finance/Insur/RealEst 15 16 24 22 47 32 36 29 26 41 102 61 60 39 59 42 32 37 33 33 33 35 33
Health 21 30 45 23 33 19 27 37 49 45 82 57 88 63 86 76 72 93 94 53 54 55 67
Ideology/Single-Issue 48 46 45 52 68 60 78 81 85 105 200 189 193 179 252 216 209 212 226 235 268 281 287
Labor 21 26 28 31 28 31 25 24 27 26 62 63 72 59 80 74 80 84 74 60 74 76 86
Lawyers & Lobbyists 13 10 7 12 14 14 11 15 23 25 37 45 57 40 43 32 20 24 40 43 45 38 36
Misc Business 54 66 62 59 97 91 95 98 97 120 248 223 229 156 211 215 188 220 240 213 264 260 268
Non-contribution 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0
Other 127 147 169 149 224 173 199 214 217 251 508 492 516 433 502 534 531 525 507 540 581 531 533
Transportation 5 13 24 8 31 19 21 18 9 4 10 8 3 0 8 16 12 12 10 7 16 32 23
Unknown 7 6 16 22 71 26 30 23 20 18 56 52 75 35 66 57 55 71 79 119 159 200 256

We could graph some of these industries in law enforcement with ada and see the differences…

#########################################################OLD CODE / JUNK CODE###############################################################

#CODE NO LONGER NEEDED.

#Plot counts
ggplot(data_count_2, aes(Year1, Uniqid)) + 
  geom_point()
    geom_smooth()

names(data_count_1)[names(data_count_1) == 'Uniqid'] <- 'Ada' #changed names so wont have two varaibles with the same name when we merge    
uniq_no_rpt <- merge(data_count_2,data_count_1,by="Year1")

uniq_no_rpt$Year1 <- as.numeric(as.character(uniq_no_rpt$Year1))
lm4 <- lm(uniq_no_rpt$Ada ~ uniq_no_rpt$Year1 + uniq_no_rpt$Uniqid)
summary(lm4)

#combined3 <- merge(combined2,indus,by=“Client”) #groups by issue, agency, among spent, and industr– too big to merge. How to fix: https://www.programmingr.com/r-error-messages/cannot-allocate-vector-of-size/ #combined2 <- merge(combined,main,by=“Uniqid”)#This adds the total amount that they spent lobbying (not just on drug policy)

#Change Issue into factor combined2\(Issue <- as.factor(combined2\)Issue) summary(combined2$Issue) # Revealed that relevant issue is Alcohol & Drug Abuse

Alcho_DA <- subset(combined2, combined2$Issue==“Alcohol & Drug Abuse”) #n=23,981

combined3 <- merge(Alcho_DA,indus,by=“Client”) # Yay. Complete dataset #n=462,412

rem(combined2)#remove extra datasets <-


#There is something wrogn with the Amount variable in combined2. 

combined2[, 15] <- as.numeric(as.character( combined2[, 15] )) # had to make sure that Amount was numeric because error occurred when trying to aggregate; as.character put in to preserve info. See here (https://stackoverflow.com/questions/18045096/r-error-sum-not-meaningful-for-factors) 
combined2$Amount <- as.numeric(combined2$Amount) #can also use this notation instead.

typeof(combined2$Year.x) # Year is an integer, so need to change it to factor.

combined2$Year.x <- as.factor(combined2$Year.x) #changed year to factor

x <-as.data.frame(!is.na(as.numeric(combined2$Amount))) #checking to see if there is a mistake in one of the data entries in Amount, True = numeric, False = not numeric. There are a lot of entries that are "FALSE" meaning they are not numeric. Thankfully this problem didn't carry over to combined3 dataset.FIGURED OUT THE ISSUE. THERE ARE "NA". SO, NEED TO TELL function NA IS TRUE.

sum(combined2$Amount, na.rm=TRUE)

#switched to combined 3 dataset because was having too much problems with combined2


typeof(combined3$Amount)#tells us type of integer, which was factor
combined3$Amount <- as.numeric(combined3$Amount) # chagned it to numeric
sum(combined3$Amount)

names(combined3)[names(combined3) == 'Year.x'] <- 'Year1' #renamed the variable in case it was causing problems 
typeof(combined3$Year1)#it is an integer and needs to change it to a factor
combined3$Year1 <-as.factor(combined3$Year1) #changed year to factor
is.factor(combined3$Year1)#checked and it is a factor
colnames(combined3)[9]<-"unk" #for some reason there is a blank, unnamed column in the dataset and dplyr didn't like that so I named the column

 #Aggregated spending by year for alch and drug abuse
 tots <- aggregate(combined3$Amount, by=list(Category=combined3$Year1), FUN=sum)
 
 #Aggregated spending by year for all issues
 
 tots_all <-aggregate(combined2$Amount, by=list(Category=combined2$Year.x), FUN=sum)

$238,355,107,883 – amount reported spent on lobbying since 1999 by groups reporting lobbying on alcohol and drug abuse policy.

Total spending on all issues $5,789,444,000,000

Have the reported amounts spent by groups that say they lobbied on alcohol and drug abuse policy changed over time?

H1 = Reported amounts spent by groups lobbying on ALDA has increased over time.

Has this increase been constant or have there been ebbs and flows?

names(tots)[names(tots) == 'Category'] <- 'Year'
names(tots)[names(tots) == 'x'] <- 'Amount'#renamed columns

#Plot year by amount for drug policy and alcho.
library(ggplot2)
library(scales)
pl1 <- ggplot(data=tots, aes(x=Year, y=Amount, group=1)) +
  geom_line(color="blue")+
  geom_point()
pl1+scale_y_continuous(labels = comma)

There is something very wrong with the data (I’m guessing)…was the data aggregated differently after 2001?

  1. I checked the data dictionary and didn’t see anything noted about changes in measurement… (https://www.opensecrets.org/resources/datadictionary/UserGuide.pdf)

  2. Ok I figured out the problem. When you combine with Agency, it includes a different entry for each agency….so, we need to go back and use a different dataset to caculate total’s etc. Bah.

library(readr) # The following dataset will give us the dollar amounts. It will not contain a link by industry however...

main <- read_delim("C:/Users/talee/Dropbox/1-Research/drug policy and interest groups/Lobbying Data/lob_lobbying_rev.txt", 
    ";", escape_double = FALSE, col_names = FALSE, 
    trim_ws = TRUE)

colnames(main)<-c("Uniqid","Registrant_raw","Registrant","Isfirm","Client_raw","Client","Ultorg","Amount","Catcode","Source","Self","IncludeNSFS","Use","Ind","Year","Type","Typelong","Affliate")

issue <- read_delim("C:/Users/talee/Dropbox/1-Research/drug policy and interest groups/Lobbying Data/lob_issue_NoSpecficIssue_rev.txt", ";", escape_double = FALSE, col_names = FALSE, trim_ws = TRUE)

colnames(issue)<-c("SI_ID","Uniqid","IssueID","Issue","Year")

combined4 <- merge(main,issue,by="Uniqid")

ADA2 <- subset(combined4, combined4$Issue=="Alcohol & Drug Abuse")

#THIS NEW DATASET ADA2 SHOULD WORK...AND COMBINED4 WILL BE ALL OF THE LOBBYING ACTIVITY, redoing the above analysis

typeof(combined4$Amount)#tells us type of integer, which was factor
combined4$Amount <- as.numeric(combined4$Amount) # chagned it to numeric
sum(combined4$Amount, na.rm = TRUE)

names(combined4)[names(combined4) == 'Year.x'] <- 'Year1' #renamed the variable in case it was causing problems 
typeof(combined4$Year1)#it is an integer and needs to change it to a factor
combined4$Year1 <-as.factor(combined4$Year1) #changed year to factor
is.factor(combined4$Year1)#checked and it is a factor
colnames(combined4)[23]<-"unk" #for some reason there is a blank, unnamed column in the dataset and dplyr didn't like that so I named the column

####redoing the same thing for the ADA2 dataset
typeof(ADA2$Amount)#tells us type of integer, which was factor
ADA2$Amount <- as.numeric(ADA2$Amount) # chagned it to numeric
sum(ADA2$Amount, na.rm = TRUE)

names(ADA2)[names(ADA2) == 'Year.x'] <- 'Year1' #renamed the variable in case it was causing problems 
typeof(ADA2$Year1)#it is an integer and needs to change it to a factor
ADA2$Year1 <-as.factor(ADA2$Year1) #changed year to factor
is.factor(ADA2$Year1)#checked and it is a factor
colnames(ADA2)[23]<-"unk" #for some reason there is a blank, unnamed column in the dataset and dplyr didn't like that so I named the column

 #Aggregated spending by year for alch and drug abuse
 tots <- aggregate(ADA2$Amount, by=list(Category=ADA2$Year1), FUN=sum)
 
 #Aggregated spending by year for all issues
 
 tots_all <-aggregate(combined4$Amount, by=list(Category=combined4$Year1), FUN=sum)

New total spending across all issues $449,804,493,484 Spending by groups lobbying on ADA = $847,775,127

Have the reported amounts spent by groups that say they lobbied on alcohol and drug abuse policy changed over time?

H1 = Reported amounts spent by groups lobbying on ALDA has increased over time.

Has this increase been constant or have there been ebbs and flows?

names(tots)[names(tots) == 'Category'] <- 'Year'
names(tots)[names(tots) == 'x'] <- 'Amount'#renamed columns

getOption("scipen")
options(scipen = 10L) #changing R settings to decrease the use of scientific notation

#Plot year by amount for drug policy and alcho.
library(ggplot2)
library(scales)
ggplot(tots, aes(Year, Amount)) + 
  geom_point()
    geom_smooth()


#Turns out there was something wrong with the ggplot code, not the merging of the datasets....uggghhhh so annoyed....

Does this look different than how overall spending changed?

names(tots_all)[names(tots_all) == 'Category'] <- 'Year'
names(tots_all)[names(tots_all) == 'x'] <- 'Amount'#renamed columns

getOption("scipen")
options(scipen = 10L) #changing R settings to decrease the use of scientific notation

#Plot year by amount for drug policy and alcho.
library(ggplot2)
ggplot(tots_all, aes(Year, Amount)) + 
  geom_point()
    geom_smooth()

Overall spending definitely looks different… also it does not increase every year…

The changes in spending of groups lobbying on drug policy exist even after controlling for general changes in spending…

Let’s look at this systematically…

We need to remove some outliers: 2021, n and y

tots2<-subset(tots, Year!="2021") #removed 2021 because it is not complete
tots_all2 <-subset(tots_all, Year!="2021" & Year!="n" & Year!="y" ) #n and y must be errors in the dataset
#Removing outliers from other datasets while I am at it!
ADA2 <- subset(ADA2, Year1!="2021" & Year1!="n" & Year1!="y" )
combined4 <-subset(combined4, Year1!="2021" & Year1!="n" & Year1!="y" )

Currently year is a factor variable. As a factor variable, we can learn the changes in spending that occur by year after controlling for overall changes in spending. This changes in spending doesn’t mean that this is changes in spending specifically on lobbying on alcohol and drug abuse policy, but rather amount of money spent can be seen as an indicator of power of the groups lobbying.

We cant run a regression with year as a factor variable because there are as many levels as there are observations.

#need to combine tots into one dataset, 
names(tots_all2)[names(tots_all2) == 'Amount'] <- 'TotAmt' #must rename Amount for total so that there are two different varaibles...

#merge
tots_comb <- merge(tots_all2,tots2,by="Year")
tots_comb$Year <- as.numeric(as.character(tots_comb$Year)) #changing year to numeric
lm2 <- lm(tots_comb$Amount ~ tots_comb$Year + tots_comb$TotAmt)
summary(lm2)

The residuals of this model look a bit off…

“we did assume that these residuals were normally distributed, with mean 0. In particular it’s worth quickly checking to see if the median is close to zero, and to see if the first quartile is about the same size as the third quartile. If they look badly off, there’s a good chance that the assumptions of regression are violated.” https://bookdown.org/ekothe/navarro26/regression.html#regressiontests

After controlling for changes in total amount of spending, in the aggregate in ADA policy, we see an increase of $2,262,476.48 every year by groups lobbying ADA policy (p=0.0085)

So in this case, the model performs better than you’d expect by chance (F(2,20)=3.975, p=0.04), but the p value isn’t that low…R2 says that the model accounts for only 28.4% of the variability….this means that the overal changes in spending dont account for all of the overall changes in spending in drug abuse…

Did the number of groups lobbying predict the differences in amount spent?

names(data_count_1)[names(data_count_1) == 'Year1'] <- 'Year' #changed name to allow for 
tots3 <- merge(tots_comb,data_count_1,by.x ="Year")
tots3$Year <- as.numeric(as.character(tots3$Year)) #Changed year to numeric

lm3 <- lm(tots3$Amount ~ tots3$Year + tots3$TotAmt + tots3$Uniqid)
summary(lm3)  

The number of groups seems to be explaining the variance in amount per year, more than overall changes in amount spent per year…so, we should drop the total amount variable…but how do the total number of groups lobbying in drug policy compare to the changes in groups lobbying overall? Could the overall increases in lobbying groups explain the difference?

How do the numbers of groups lobbying in drug policy compare to the overall number of groups lobbying?



```r
data_count_2 <- aggregate(data = main,                # Applying aggregate
                          Uniqid ~ Year,
                          function(x) length(unique(x)))
data_count_2   # Print counts

#Plot counts
ggplot(data_count_2, aes(Year, Uniqid)) + 
  geom_point()
    geom_smooth()