A pattern-matched Twitter analysis of US cancer-patient sentiments

J Surg Res. 2016 Dec;206(2):536-542. doi: 10.1016/j.jss.2016.06.050. Epub 2016 Jun 25.


Background: Twitter has been recognized as an important source of organic sentiment and opinion. This study aimed to (1) characterize the content of tweets authored by the United States cancer patients; and (2) use patient tweets to compute the average happiness of cancer patients for each cancer diagnosis.

Methods: A large sample of English tweets from March 2014 through December 2014 was obtained from Twitter. Using regular expression software pattern matching, the tweets were filtered by cancer diagnosis. For each cancer-specific tweetset, individual patients were extracted, and the content of the tweet was categorized. The patients' Twitter identification numbers were used to gather all tweets for each patient, and happiness values for patient tweets were calculated using a quantitative hedonometric analysis.

Results: The most frequently tweeted cancers were breast (n = 15,421, 11% of total cancer tweets), lung (n = 2928, 2.0%), prostate (n = 1036, 0.7%), and colorectal (n = 773, 0.5%). Patient tweets pertained to the treatment course (n = 73, 26%), diagnosis (n = 65, 23%), and then surgery and/or biopsy (n = 42, 15%). Computed happiness values for each cancer diagnosis revealed higher average happiness values for thyroid (h_avg = 6.1625), breast (h_avg = 6.1485), and lymphoma (h_avg = 6.0977) cancers and lower average happiness values for pancreatic (h_avg = 5.8766), lung (h_avg = 5.8733), and kidney (h_avg = 5.8464) cancers.

Conclusions: The study confirms that patients are expressing themselves openly on social media about their illness and that unique cancer diagnoses are correlated with varying degrees of happiness. Twitter can be employed as a tool to identify patient needs and as a means to gauge the cancer patient experience.

Keywords: Cancer; Hedonometric; Social media; Twitter.

Publication types

  • Research Support, N.I.H., Extramural

MeSH terms

  • Attitude to Health*
  • Female
  • Happiness*
  • Humans
  • Male
  • Neoplasms / diagnosis
  • Neoplasms / psychology*
  • Neoplasms / therapy
  • Qualitative Research
  • Social Media*
  • United States