Utilizing Twitter data for analysis of chemotherapy

Ling Zhang, Magie Hall, Dhundy Bastola

Research output: Contribution to journalArticlepeer-review

46 Scopus citations


Objective: Twitter has become one of the most popular social media platforms that offers real-world insights to healthy behaviors. The purpose of this study was to assess and compare perceptions about chemotherapy of patients and health-care providers through analysis of chemo-related tweets. Materials and methods: Cancer-related Twitter accounts and their tweets were obtained through using Tweepy (Python library). Multiple text classification algorithms were tested to identify the models with best performance in classifying the accounts into individual and organization. Chemotherapy-specific tweets were extracted from historical tweetset, and the content of these tweets was analyzed using topic model, sentiment analysis and word co-occurrence network. Results: Using the description in Twitter users’ profiles, the accounts related with cancer were collected and coded as individual or organization. We employed Long Short Term Memory (LSTM) network with GloVe word embeddings to identify the user into individuals and organizations with accuracy of 85.2%. 13, 273 and 14,051 publicly available chemotherapy-related tweets were retrieved from individuals and organizations, respectively. The content of the chemo-related tweets was analyzed by text mining approaches. The tweets from individual accounts pertained to personal chemotherapy experience and emotions. In contrast with the personal users, professional accounts had a higher proportion of neutral tweets about side effects. The information about the assessment of response to chemotherapy was deficient from organizations on Twitter. Discussion: Examining chemotherapy discussions on Twitter provide new lens into content and behavioral patterns associated with treatments for cancer patients. The methodology described herein allowed us to collect relatively large number of health-related tweets over a greater time period and exploit the potential power of social media, which provide comprehensive view on patients’ perceptions of chemotherapy. Conclusion: This study sheds light on using Twitter data as a valuable healthcare data source for helping oncologists (organizations) in understanding patients’ experiences while undergoing chemotherapy, in developing personalize therapy plans, and a supplement to the clinical electronic medical records (EMRs).

Original languageEnglish (US)
Pages (from-to)92-100
Number of pages9
JournalInternational Journal of Medical Informatics
StatePublished - Dec 2018


  • Cancer
  • Chemotherapy
  • Deep learning
  • Side effect
  • Social media
  • Twitter

ASJC Scopus subject areas

  • Health Informatics


Dive into the research topics of 'Utilizing Twitter data for analysis of chemotherapy'. Together they form a unique fingerprint.

Cite this