Abstract
Longitudinal research using social media data has been under-explored in social and behavioral sciences. Despite its great potential, longitudinal analysis using social media data faces unique challenges. Researchers must consider many influential factors and incorporate them when designing their studies and conducting analyses. Over the past decade, best practices have originated from both studies focusing on social media data in general and those applying longitudinal designs. This tutorial aims to educate those unfamiliar with such a growing field, outlining the different steps that may exist within data collection, data processing, and data analysis of longitudinal social media data. To illustrate these techniques, we apply our basic steps to a Twitter dataset about the 2020 U.S. wildfires, examining sentiment throughout the wildfire period.
Introduction
Traditional longitudinal studies, which track subjects over extended periods, are often prohibitively expensive and logistically challenging. Social media platforms offer a massive, real-time repository of human behavior, yet social scientists frequently lack the technical framework to leverage this for longitudinal research. This tutorial addresses three primary hurdles: technical barriers in API navigation, the inherent irregularity of "unbalanced" datasets, and the need for methodological rigor regarding selection bias and ethics.
Methodology: From Collection to Analysis
The research workflow is divided into three critical stages: collection, processing, and analysis.
Data Collection and Processing
Data collection involves navigating APIs, such as the Twitter Academic Research API, to access historical data. Researchers must identify Meaningful Time Points (MTPs) relevant to their study. Once collected, text mining and sentiment analysis are employed. This study utilized "Emoxicon" analysis to generate sadness (SAD) scores, merging this with external environmental data like the EPA's Air Quality Index (AQI).
Data Analysis
Because social media users post at varying frequencies, the resulting datasets are "unbalanced." To account for this, we recommend Multilevel Modeling (MLM) or Growth Curve Modeling. Unlike traditional methods, MLM naturally accommodates time-unstructured data and varying numbers of measurements per participant.
Case Study: The 2020 U.S. Wildfires
To demonstrate these methods, we analyzed 1,403 tweets from 588 participants in Los Angeles and Portland during the 2020 wildfires.
Results and Sentiment Trends
A linear unconditional growth curve model was identified as the most parsimonious fit. Analysis revealed a statistically significant decrease in SAD scores over the wildfire period (average slope = -0.009, p < .01), indicating a gradual return to baseline sentiment as the crisis evolved.
Key Insights
- Visual Context: Tweets containing wildfire imagery were significantly more likely to convey sadness, highlighting the importance of visual covariates.
- Threshold Effects: Interestingly, AQI scores were not significant predictors of sadness once a certain pollution threshold (AQI > 100) was reached, suggesting that extreme conditions may plateau emotional response.
- Geographic Resilience: Portland residents showed a faster reduction in sadness compared to those in Los Angeles, likely due to the longer duration and greater extent of the fires in California.
Limitations and Future Directions
Social media data remains "messy." Challenges include low sample density (most participants only tweeted 2-3 times), the difficulty of text mining in capturing sarcasm, and ethical considerations regarding public data usage. Future research should strive for higher-frequency sampling and improved methods for inferring demographics to ensure representative findings.
Summary updated