Abstract
Introduction
Transitions to and from daylight savings time (DST) are natural experiments of circadian disruption and are associated with negative health consequences. Yet, the majority of the United States and several other countries still adopt these changes. Large observational studies focused on understanding the impact of DST transitions on sleep are difficult to conduct. Social media platforms, like Twitter, are powerful sources of human behavior data. We used machine learning to identify tweets reporting sleep complaints (TRSC) during the week of the standard time (ST)-DST transition. Next, we evaluated the circadian patterns of TRSC and compared their prevalence before and after the transition.
Methods
Using data publicly available via the Twitter API, we collected 500 tweets with evidence of sleep complaints, and manually annotated each tweet to validate true sleep complaints. Next, we calculated term frequency-inverse document frequency of each word in each tweet and trained a random forest to classify TRSC using a 3-fold cross-validation design. The trained model was then used to annotate a collection of tweets captured between Oct. 30, 2019-Nov. 6, 2019, overlapping with the DST-ST transition, which occurred on Nov. 3, 2019.
Results
Random forest demonstrated good performance in classifying TRSC (AUC[95%CI]=0.85[0.82-0.89]). This model was applied to 3,738,383 tweets collected around the DST-ST transition, and identified 11,044 TRSC. Posting of these tweets had a circadian pattern, with peak during nighttime. We found a higher frequency of TRSC after the DST-ST transition (0.33% vs. 0.27%, p<0.00001), corresponding to a ~20% increase in the odds of reporting sleep complaints (OR[95%CI]=1.21[1.16-1.25]).
Conclusion
Using machine learning and Twitter data, we identified tweets reporting sleep complaints, described their circadian patterns and demonstrated that the prevalence of these types of tweets is significantly increased after the transition from DST to ST. These results demonstrate the applicability of social media data mining for public health in sleep medicine.
Support
NIH (K01LM012870); AASM Foundation (194-SR-18)