INTRODUCTION

The opioid epidemic in the United States (US) continues to evolve, with a 4% growth in opioid-related overdose deaths from December 2018 to November 2019, resulting in approximately 137 deaths per day.1 Rising overdose rates are fueled by an increasing proportion of deaths involving synthetic opioids or psychostimulants.2, 3 Trends differ considerably by state: Arkansas saw an 18.3% drop in estimated deaths, while South Dakota saw a 61.8% rise.1

Variations in state policy, and in implementation of evidence-based practices, contribute to mortality trends. Evidence-based interventions include laws regulating prescribing,4, 5 medication treatment for opioid use disorder,6, 7 and access to naloxone.8, 9 Political partisanship affects opioid-related policies, and rates of opioid use disorder may impact local politics. For instance, counties with greater rates of chronic opioid use were also more likely to vote Republican in the 2016 presidential election, with approximately two-thirds of the association explained by socioeconomic factors.10 Between 2014 and 2018, states with Republican control passed more legislation to address the opioid epidemic than states with Democrat control, but total spending on the opioid epidemic was smaller in Republican states after accounting for the impact of Medicaid expansion.11 Among state legislators, support for opioid use disorder parity laws—laws that require equal insurance benefits for behavioral health and physical health treatment—has been associated with Democratic affiliation. 12

The language used in public-facing content in traditional media and on social media both affects and reflects public sentiment. An analysis of traditional news language identified increasing mentions of medication for opioid use disorder nationally but more negative framing of medication treatment within states with high overdose mortality.13 Public language can contribute towards opioid use disorder stigma, which is associated with lower support for evidence-based interventions and higher levels of support for punitive interventions.14,15,16 Legislators’ social media posts may also reflect policy attention in real time and constituents’ priorities.17, 18 Cross-party interaction among legislators on social media occurs to a greater extent than co-sponsorship.19 Twitter and Facebook may therefore serve as repositories of political opinion and indicators of key shifts in political priorities and partisanship.

The objectives of this study were to examine state legislators’ opioid-related social media posts in order to understand the relationship between state overdose death rates and legislators’ social media activity; describe changing topics of discussion over time; and examine longitudinal transitions in opioid-related partisanship.

METHODS

Data Source

We identified state legislators’ social media posts about opioids from 2014 to 2019. We obtained social media data from Quorum (www.quorum.us), a software platform that collects documents with policy relevance at the state and national level, including the social media content of politicians during their time in office. We searched the social media content of all members of the upper and lower houses of the 50 US state legislatures for posts mentioning one of the following terms: “opioid(s),” “opiate(s),” “narcotic(s),” “heroin,” “fentanyl,” “oxycodone,” “oxycontin,” or “Percocet.” The term list reflects a combination of general terms for the opioid class and specific prescription opioids (oxycodone), synthetic opioids (fentanyl), and heroin.16, 20 We considered the inclusion of additional terms for medications in the opioid class, but inclusion of these terms did not substantially impact the final number of social media posts (Online Appendix Table 1). We did not explicitly search for posts containing words relative to overdose reversal (e.g., “naloxone”) or medication treatment for opioid use disorder (e.g., “buprenorphine”) so as not to artificially inflate the incidence of these topics relative to others. Further details regarding arrival at the final search criteria can be found in the Online Appendix. We included duplicated posts both within the same platform (e.g., retweets) and across platforms (e.g., Facebook and Twitter). In doing so, we assumed that a duplicate represented a re-endorsement of the original language and a wider audience for the content.

To control for the number of legislators, we obtained the yearly number of legislators by state and party from the National Conference of State Legislatures (NCSL).21 The total number of state legislators (N= 7383) and the number of legislators by state were constant across all years analyzed, while the number of legislators by party varied each year. These numbers were used in the calculations of social media posts per legislator and per legislator by party in the descriptive analysis, as described below, but did not affect the natural language processing analyses.

To assess correlations between the volume of state legislators’ social media activity and the state opioid overdose mortality rate, we obtained state-level unintentional overdose mortality rates from Centers for Disease Control and Prevention Wide-ranging Online Data for Epidemiologic Research (CDC WONDER) for all available years of overlap with the social media data (2014–2018).22

Descriptive Analysis

We used summary statistics to describe the volume of posts on each social media platform and across parties and legislative bodies. We calculated the total number of opioid-related social media posts per state legislator, and the number of posts per legislator mentioning each search term, per calendar quarter (3-month period). We estimated differences between Democratic and Republican use of each of the search terms using the Pearson chi-square test. We used NCSL data to calculate the number of posts per legislator in a given state both overall and by party (continuous, non-normally distributed data), and we compared these numbers to states’ mean unintentional overdose mortality (again continuous and non-normally distributed) using Kendall's rank correlation coefficient.

Natural Language Processing

To understand cross-party differences in language use, we looked at both words and topics. We compared the frequency of word use across social media posts in each party. To evaluate the thematic content of the opioid-related posts, we used latent Dirichlet allocation (LDA), a machine learning–based approach to defining naturally occurring topics.23, 24 LDA identifies a user-specified number of groupings of words across documents by iteratively fitting two probability distributions, a per-topic word distribution, and a per-document topic distribution, each summing to one. Documents are treated as a “bag of words” in that word order is ignored. As an example, a topic most strongly defined by the words “overdose,” “naloxone,” and “save” might represent a large proportion of the tweet, “Our state has started a naloxone distribution program to reduce overdoses, and it will save many lives.”

We excluded hashtags, links, and mentions of other users from our LDA analysis. Using a combination of model coherence scores and evaluations of topic interpretability, we elected to fit a 20-topic model. Authors DCS and AKA independently evaluated each topic for thematic meaning by reviewing the ten words and ten social media posts most associated with each topic. Topics for which authors DCS and AKA agreed on thematic meaning were included in subsequent analyses.25, 26 Further details regarding language pre-processing and model fitting are described (Online Appendix).

To analyze the distribution of LDA topics across political parties, we compared the mean per-document topic probability (a non-normal, continuous variable with minimum zero and maximum one) across all posts by Democrats and Republicans using the Wilcoxon signed-rank test. We considered a difference significant according to a cut-off of a Bonferroni corrected P<0.001 (corrected value P<5 × 10-5), consistent with prior LDA analyses.27, 28 To describe the change in topic prevalence over time, we calculated the mean topic probability across posts, stratified by party, for each of the 24 three-month quarters.29,30,31 In order to understand whether attention to topics was converging or diverging over time, for each topic, we calculated the absolute difference in mean topic probability among all Democrats’ and Republicans’ posts by calendar quarter. We then summed these absolute differences across all topics. If all topics were equally represented in Democrats’ and Republicans’ posts, this would have led to a sum of absolute differences of zero. If, on the other hand, Democrats and Republicans were perfectly opposed, such that the mean topic probability was 1 for one party and 0 for the other for all topics, the sum of absolute differences would have a theoretical maximum value equal to the final number of topics. We calculated and plotted these values both for the subset of consensus topics and for the total collection of 20 topics. Furthermore, we repeated all longitudinal LDA analyses after excluding retweets and duplicate posts (Online Appendix).

All statistical analyses were performed using R version 3.6.1.32 This study is exempt under University of Pennsylvania Institutional Review Board guidelines as it does not meet criteria for human subject research.

RESULTS

We identified 43,558 opioid-related social media posts meeting inclusion criteria from 4083 unique state legislators between 2014 and 2019. The numbers of posts by year, social media platform, legislator party, and legislative division are reported in Table 1. Most posts were to Twitter (28,564; 65.6%) and Facebook (14,283; 32.8%), with Republicans more likely to post to Facebook than Democrats. Among Twitter posts, 14,626 (51.2%) were retweets. Few posts were verbatim repeats across platforms (197; 0.5%). The number of opioid-related social media posts rose steadily between 2014 and 2018, but declined from 2018 to 2019. The number of posts mentioning “heroin” declined over the 6-year time period, while those mentioning “opioid(s)” or “fentanyl” rose (Fig. 1). Republicans were more likely to use the terms “heroin,” “fentanyl,” and “narcotic” (P<.001), while Democrats were more likely to use the terms “opioid,” and “oxycodone,” “oxycontin,” or “Percocet” (P<.001) (Online Appendix Table 3). The number of posts per state legislator was correlated with the state’s unintentional overdose mortality rate (tau=0.40, P<.001), with the strength of correlation similar among Democratic legislators (tau=0.42, P<.001) and Republican legislators (tau=0.39, P<.001).

Table 1 Descriptive Information Regarding the Number and Percent of Posts by Category, Both Overall and with Posts Divided between Democrats and Republicans
Figure 1
figure 1

Log of the total number of opioid-related social media posts overall and by keyword for each calendar quarter from 2014 to 2019.

Words more commonly used by Democratic state legislators included “crisis,” “addiction,” “health care,” and “treatment.” Words more commonly used by Republican state legislators included “legislation,” “budget,” “abuse,” “problem,” and “education.” Figure 2 compares the frequency of commonly used words among Democrats and Republicans.

Figure 2
figure 2

Comparison of most frequently used words in Democrats’ and Republicans’ opioid-related social media posts.

After the removal of hashtags, links, and mentions of other users, 43,080 (98.9%) posts still had text content and were included in the LDA topic analysis. Of 20 LDA topics, authors DCS and AKA agreed on the thematic meaning of 13 (Table 2). Representation of three topics was significantly higher among Republicans’ social media content, as defined by a Wilcoxon signed-rank test P<0.001 with Bonferroni correction (P<5 × 10-5): “drug trade,” “legislative work,” and “local initiatives involving police.” The difference in prevalence between Democrats and Republicans grew dramatically for the topic “drug trade” with posts often referencing the need to control drug trafficking at the US–Mexico border (Fig. 3).

Table 2 Sample Words and Posts for Latent Dirichlet Allocation Topics and Mean Percent Topic Representation Among State Legislators' Posts By Party
Figure 3
figure 3

Mean percent topic representation by three-month quarter in opioid-related social media posts of Democrat and Republican state legislators between 2014 and 2019. “Mean percent topic representation” was defined as the average topic distribution per social media post (normalized such that the total topic distribution for each social media post sums to 100%) across all social media posts for the given party.

Representation of six topics was significantly higher among Democrats’ social media content: “pharmaceutical company accountability,” “treatment and recovery,” “medical marijuana for alternative pain treatment,” “overdose deaths and reversal,” “funding,” and “impact on families and communities.” The gap in prevalence widened over time for the topics “treatment and recovery” and “pharmaceutical company accountability” (Fig. 3). The remaining topics were not significantly different in representation across parties (Table 2).

Partisanship in opioid-related social media content, as estimated by the quarterly sum of the absolute difference between Democrats and Republicans in mean topic representation across all topics, declined between 2014 and 2016, before increasing again between 2016 and 2019 (Fig. 4). The longitudinal trends in topic representation and in the partisanship estimate were robust to exclusion of retweets and other duplicate posts (Online Appendix).

Figure 4
figure 4

Partisanship in opioid-related social media content as estimated by the quarterly sum across all topics of the absolute difference between Democrats’ and Republicans’ mean topic representation in social media posts. Topic representation (and therefore mean topic representation) ranges from 0 to 1, and the sum of absolute differences therefore theoretically ranges from 0 to the number of topics (13 or 20).

DISCUSSION

This study applied natural language processing to identify important themes and longitudinal changes in partisanship in the opioid-related social media content of state legislators. It has three key findings. First, state legislators are actively using social media to discuss the opioid epidemic, and the volume and language of their social media content are consistent with trends in overdose mortality. Second, some topics related to evidence-based interventions, e.g., “treatment and recovery,” were not equally represented among the parties’ social media posts, while others were e.g. regulations regarding “opioid prescribing.” Third, longitudinal trends indicate that the gap between Democrats and Republicans on key opioid-related topics is growing, particularly in the areas of pharmaceutical accountability, treatment of those with opioid use disorder, and stemming the illicit manufacture and trade of opioids. Addressing the opioid epidemic is a priority across the nation, but the two parties appear to be trending increasingly away from a consensus approach.11

State legislators are increasingly utilizing social media as a platform to discuss the opioid epidemic. Both Democrats and Republicans published over 20,000 posts mentioning opioids between 2014 and 2019, and over two-thirds of posts were published in the final 3 years. The majority of the opioid-related content was posted to Facebook and Twitter, the most popular social media platforms in the USA.33 The posts were consistent with national- and state-level trends in opioid mortality in several ways: legislators’ increasingly used the word “fentanyl,” rather than “heroin,” mirroring synthetic opioids’ growing share of overdose mortality, and the association between the number of opioid-related social media posts and overdose mortality in legislators’ home states was consistent across Democrats and Republicans.1

The topics and words that legislators used more frequently were notably different, including in their emphasis on potentially evidence-based policy interventions. Among Democrats, greater representation of the topics “treatment and recovery” and “overdose deaths and reversal” may reflect support for treating opioid use disorder as an illness. While some forms of medical treatment are associated with decreased overdose mortality, including medication treatment with methadone, suboxone, and naltrexone and overdose reversal with naloxone, others, such as inpatient detox, are not.6, 9, 34 Prior research has shown that Republican-controlled states are more likely to pursue treatment expansion covertly, in order to avoid endorsing Medicaid expansion.11 Consistent with those findings, posts highly represented by the topic “local initiatives involving police,” a topic more common to Republican content, often referred to programs in which police were involved in connecting people to treatment, as in the example in Table 2, or in administering naloxone; an Ohio-based study found that training police officers to administer naloxone was associated with fewer opioid overdose deaths locally.35 These results justify future studies explicitly examining legislators’ posts about medication treatment for opioid use disorder and naloxone for overdose reversal. Both parties spoke equally to the regulation of prescription drugs, another evidence-based intervention.36

Differences in opioid-related topic emphasis by party have grown steadily since a nadir in the 4th quarter of 2015, which may signal a widening gap in Democrats' and Republicans' priorities related to the  opioid epidemic. On social media, Democrats’ increasing focus on pharmaceutical company litigation is sometimes, though not always, linked to funding potentially evidence-based interventions, as in the example provided in Table 2.37 Whether “treatment” refers to effective interventions, like medication treatment, or ineffective ones, like inpatient detox, however, is unclear. Since the beginning of 2017, Republicans’ social media has increasingly focused on the “drug trade,” both internationally and locally. A focus on curbing drug-related crimes may dissuade some illegal opioid sales, but it may also have unintended consequences. For instance, one study of New York City precincts found that increased rates of misdemeanor arrests were associated with higher overdose rates.38 Arrests for drug-related crimes are also made unequally: in 2014, Black and Latinx men in the USA were five times and two times more likely than white men to be imprisoned for drug-related crimes, respectively, despite comparable rates of drug use across all three groups.39 A focus on preventing drug-related crime contributes to a culture of criminalizing, rather than treating, substance use disorders.

This is the first study to use natural language processing of state legislators’ social media content to measure and describe partisanship around an issue over time. State legislators’ word choices on social media carry influence. They can reflect both the changing public landscape, as in more frequent mentions of fentanyl, and changing legislative priorities, as in more mentions of suing pharmaceutical companies. Word choice can also either challenge or propagate stigma. Democrats and Republicans both used the stigmatizing word “abuse” relatively frequently in opioid-related posts.16 Anti-stigma training among state legislators may lead to more appropriate language choices and down-stream reductions in stigma among constituents.

Limitations

This study has several limitations. We were unable to control for years in office in our measures of legislators’ number of opioid-related social media posts, as Quorum reports only whether an individual is a current or former legislator at the time of data download. We also did not have access to the total number of social media posts for each legislator and were therefore unable to control for a legislators’ general social media activity. These limitations did not affect our measures of the use of opioid-related topics over time; however, as these were specific to the use among opioid-related social media posts, not all social media posts.

In our language analysis, we considered single words and several two-word phrases, as described in the Online Appendix, but we did not account for context or sentiment. We were therefore able to speak to the prevalence of words or topics, but not to whether they were being endorsed or criticized.

We measured partisanship nationally, rather than at the state level, and we gave equal weight to posts from legislators in their states’ majority or minority party. Future analyses may look to the impact that state house or senate control has on the partisanship of legislators’ posts.

Legislators who use social media are not representative of all legislators, and as such, measures of topic representation and partisanship among social media posts over time do not necessarily reflect trends across the Democratic and Republican parties more broadly. For instance, social media use may select for younger or more argumentative legislators. Our analyses are, however, representative of the social media content generated by state legislators with which the public engages, which may affect public sentiment.

Finally, social media language does not necessarily lead to specific votes or policy decisions. Identifying relationships between state legislator social media content and state legislator voting patterns was beyond the scope of this project.

Conclusion

Social media can provide valuable insight into trends in state legislators’ opioid-related talking points. We demonstrate a growing divide between Democrats and Republicans. Democrats increasingly posted content related to pharmaceutical company litigation, and Republicans increasingly posted content related to curbing the drug trade. Neither approach is directly focused on treatment, and the latter approach may lead to greater morbidity and mortality, especially among marginalized communities, through further criminalization of opioid use disorder.