State Legislators’ Divergent Social Media Response to the Opioid Epidemic from 2014 to 2019: Longitudinal Topic Modeling Analysis

Daniel C. Stokes, Jonathan Purtle, Zachary F. Meisel, Anish K. Agarwal

Research output: Contribution to journalArticlepeer-review


Background: The opioid epidemic is widely recognized as a legislative priority, but there is substantial variation in state adoption of evidence-based policy. State legislators’ use of social media to disseminate information and to indicate support for specific initiatives continues to grow and may reflect legislators’ openness to opioid-related policy change. Objective: We sought to identify changes in the national dialogue regarding the opioid epidemic among Democratic and Republican state legislators and to estimate changing partisanship around understanding and addressing the epidemic over time. Design: Longitudinal natural language processing analysis. Participants: A total of 4083 US state legislators in office between 2014 and 2019 with any opioid-related social media posts. Main Measures: Association between opioid-related post volume and state overdose mortality, as measured by Kendall’s rank correlation coefficient. Latent Dirichlet allocation analysis of all social media posts to identify key opioid-related topics. Longitudinal analysis of differences in the prevalence of key topics among Democrats and Republicans over time. Key Results: In total, 43,558 social media posts met inclusion criteria, with the vast majority to Twitter (n=28,564; 65.6%) or Facebook (n=14,283; 32.8%). Posts were more likely to mention fentanyl and less likely to mention heroin over time. The volume of opioid-related content was positively associated with state-level unintentional overdose mortality among both Democrats (tau=0.42, P<.001) and Republicans (tau=0.39, P<.001). Democrats’ social media content has increasingly spoken to holding pharmaceutical companies accountable, while Republicans’ social media content has increasingly spoken to curbing illicit drug trade. Overall, partisanship across topics increased from 2016 to 2019. Conclusion: The volume of opioid-related social media posts by US state legislators between 2014 and 2019 is associated with state-level overdose mortality, but the content across parties is significantly different. Democrats’ and Republicans’ social media posts may reflect growing partisanship regarding how best to address the overdose epidemic.

Original languageEnglish (US)
Pages (from-to)3373-3382
Number of pages10
JournalJournal of general internal medicine
Issue number11
StatePublished - Nov 2021


  • natural language processing
  • opioid policy
  • social media
  • state legislators
  • Opioid Epidemic
  • Epidemics
  • Social Media
  • Humans
  • Analgesics, Opioid/adverse effects
  • Drug Overdose/drug therapy

ASJC Scopus subject areas

  • Internal Medicine


Dive into the research topics of 'State Legislators’ Divergent Social Media Response to the Opioid Epidemic from 2014 to 2019: Longitudinal Topic Modeling Analysis'. Together they form a unique fingerprint.

Cite this