Skip to main content
Dryad

Code for: Sleepless in America: A social sensing study of pandemic-era sleeplessness using nighttime social media data

Data files

Jun 12, 2026 version files 2.75 MB
Jul 21, 2026 version files 2.74 MB

Click names to download individual files

Abstract

Sleeplessness is a widespread public health concern that was further intensified during the COVID-19 pandemic, yet large-scale, real-time monitoring of sleep disturbance remains limited. This study introduces a scalable social sensing framework that leverages temporally filtered nighttime social media activity (10:00 p.m. - 6:00 a.m. local time) to infer population-level patterns of sleep disturbance. To demonstrate the framework, we conducted a comprehensive analysis of geotagged tweets posted by users in the United States from March 1, 2020 to June 30, 2021, using pre-pandemic tweets as a baseline for comparison. Spatial, temporal, sentiment, and topical patterns were analyzed to characterize nighttime sleep disturbances at the U.S. state level. Three distinct temporal patterns of nighttime disturbance were identified during the pandemic, including single peak, multiple peaks, and smooth patterns, indicating heterogeneous impacts across states. Correlations between nighttime tweet ratios and daily new COVID-19 case counts varied across states but were similar among states with comparable demographic and economic characteristics. In addition, more negative emotions expressed in nighttime tweets were associated with increased sleep disturbance. Nighttime tweets were more likely to focus on local news and events. Greater topical diversity among the population was associated with reduced negative emotional impacts during the pandemic. Overall, the findings demonstrate that nighttime social media data provide an effective and scalable social sensing approach for assessing sleeplessness across large geographic regions and extended time periods. Beyond sleep-related applications, this framework offers a transferable method for monitoring other forms of nighttime human activity and broader social dynamics, including crime, disaster response, and social unrest.