Daniel Stokes, MD, MSc, is a research fellow with the Penn Center for Emergency Care Policy & Research and the Penn Medicine Center for Digital Health.

The opioid epidemic has had devastating effects in red states and blue states alike, making it a prime target for bipartisan action. But both federal and state policy have been characterized by sharp partisan differences in response to rising rates of opioid-related overdose deaths. In a study recently published in the Journal of General Internal Medicine, we sought to understand how partisanship might affect legislative progress on this seemingly bipartisan issue by analyzing the content of state legislators’ opioid-related social media posts over time.

We used natural language processing tools to analyze more than 40,000 state legislators’ opioid-related posts from 2014-19 (primarily to Facebook and Twitter), and we tracked partisan differences in attention to key topics over time. We found that while the volume of Democrats’ and Republicans’ opioid-related posts were equally correlated with state overdose death rates, the content of posts increasingly diverged over the study period.

Anish Agarwal, MD, MPH, MS is an LDI Senior Fellow and Assistant Professor of Emergency Medicine at the University of Pennsylvania

Much of the growing gap in state legislators’ opioid-related social media content could be attributed to unequal attention to three key topics: pharmaceutical company accountability, opioid use disorder (OUD) treatment, and manufacture and trade of illegal drugs. Democrats’ posts increasingly spoke to financial penalties for the pharmaceutical companies responsible for manufacturing and advertising commonly prescribed opioids; where these funds would be directed was often unclear. Democrats were also increasingly likely to post about OUD treatment and recovery. Republicans’ posts, on the other hand, increasingly spoke to curbing the illegal drug trade, particularly across international borders.

Beyond a topic analysis, we also analyzed word usage in Democrats’ and Republicans’ posts. The above figure shows a comparison of the most frequently used words, highlighting those words notably different in frequency of use between the two parties.

The extent to which legislators’ social media activity reflects their legislative activity is unclear. But our findings suggest fundamental differences in how Democrats’ and Republicans’ understand and react publicly to persistently climbing rates of overdose deaths. Partisanship in understanding the root causes of the overdose epidemic is likely to beget partisanship in proposing solutions.

Figure 1. Comparison of most frequently used words in Democrats’ and Republicans’ opioid-related social media posts. Source: Stokes et al., Journal of General Internal Medicine, 2021.

The topics increasingly prevalent among Democratic legislators—holding pharmaceutical companies accountable and OUD treatment—may both overemphasize the role of prescription opioids and appropriately center OUD as a medical illness with evidence-based treatments. Overdose deaths increasingly and overwhelmingly involve illicitly manufactured synthetic opioids, like fentanyl, rather than purely prescription opioids or heroin. While pharmaceutical companies have been found guilty of misconduct in their advertising of opioids, an overemphasis on prescription opioids may lead to less dialogue regarding the more substantial role that fentanyl and other synthetic opioids play in the overdose epidemic. On the other hand, the increasing prevalence of posts related to treatment and recovery may reflect growing acceptance and normalization of evidence-based medications for OUD treatment, such as buprenorphine and methadone.

Republicans’ increasing attention to the topic of the illegal manufacture and trade of opioids may both acknowledge the more prominent role of illicitly manufactured synthetic opioids in the overdose epidemic, and reinforce the harmful criminalization of opioid use. Evidence from New York City points to an association between greater local police activity and higher overdose mortality rates. Furthermore, the criminalization of drug use is experienced dramatically differently by Black and Latinx people in the U.S. For example, in 2014, Black and Latinx men in the U.S. 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. Prohibition-based drug policies, e.g., “the war on drugs,” have led to the growth and militarization of both criminal networks and police forces with devastating implications for communities affected by drug manufacture, transportation, and sales.

Natural language processing of publicly available text can help us to understand the nuances of political disagreement among both legislators and constituents. Hopefully, by better understanding where our thoughts on the overdose crisis diverge, we can move towards a common vision of the problem we face and how best to approach it.


The study, State Legislators’ 2019 Divergent Social Media Response to the Opioid Epidemic from 2014 to 2019: Longitudinal Topic Modeling Analysis, was published March 29, 2021 in the Journal of General Internal Medicine. Authors include Daniel C. Stokes, Jonathan Purtle, Zachary F. Meisel, and Anish K. Agarwal.