Introduction¶
This course is about building social media data science pipelines. These are systems that collect social media data continuously, store it in a form you can query, measure what happens on the platforms, test hypotheses about it, and present the results. Each of the four words in the title carries part of the course:
- Social media: the platforms, their data models, and their rules
- Data: what is recorded, what is missing, and how to keep it
- Data science: measurements, statistics, visualization, and network analysis
- Pipelines: the parts run together, on a schedule, and survive restarts
Learning objectives¶
- Build a continuous data collection system for social media
- Manage the collected data so that it can be queried and shared
- Design and execute measurements on social media
- Model and analyze online behavior through social media data
- Create visualizations that help understand social media phenomena
What social media are¶
Social media are hard to define, and the platforms differ more than the label suggests. Our working definition is "I know it when I see it": a service where people post content, see what others post, and interact with it. Some of the most used platforms in the United States, by the share of adults who say they ever use them (Pew Research Center, 2025):
| Platform | Share | Platform | Share |
|---|---|---|---|
| YouTube | 84% | Snapchat | 25% |
| 71% | X (formerly Twitter) | 21% | |
| 50% | Threads | 8% | |
| TikTok | 37% | Bluesky | 4% |
| 32% | Truth Social | 3% | |
| 26% |
Source: Pew Research Center, Social Media Fact Sheet.
Why social media are useful for data science¶
- There are many platforms, each with its own community and norms
- They are digital: most user behavior is recorded as data, including posts, likes, reposts, replies, social networks, and profiles
- The data is larger than a survey can reach
- Many platforms provide their data to the public through an API
Why social media data are hard to use¶
- Platforms are scattered: each platform has its own data, rules, and API, so a study of several platforms takes more work
- Exposure is not recorded: the data show what people post, but not what they see
- The scale is large: the data can be too large for one script or one computer to handle
- Access is shrinking: fewer platforms share their data than before, but good options remain
- There are no demographics: platforms rarely provide the age, gender, or location of their users
- The data are noisy: fake accounts, spam, and automated posts are mixed with real behavior
The pipeline¶
The course follows the stages of a pipeline, one topic each.
| Stage | Topic | What you learn |
|---|---|---|
| Collect | Data Collection | Query platform APIs, page through results, respect rate limits, choose a sampling strategy |
| Store | Data Format and Management | Choose a data format and a schema, store raw and derived data, keep the collection running |
| Measure | Measurements and Metrics | Turn posts and accounts into numbers that answer a question |
| Test | Hypothesis Testing and Statistical Analysis | Decide whether a difference is real, and how large it is |
| Show | Visualization | Present the results so that a reader understands them |
| Connect | Network Analysis | Represent who follows, replies to, or reposts whom, and analyze the structure |
Reading research papers¶
Research on social media moves fast, and the best way to keep up is to read the papers. The research papers page lists readings by topic: datasets and collection, algorithms, inauthentic behaviors, ethics and data access, generative AI and social media, and social media for AI agents. Read the papers on a topic when you study that topic, and note which data and methods each paper uses.
Build your own pipeline¶
The best way to learn the material is to build a pipeline of your own. The Build Your Own Pipeline guide describes the stages in order. You start with research questions, then collect data from two or more platforms and keep the collector running. Next, you explore the data, run a classifier, and check the classifier against your own labels. Finally, you answer your research questions and share the results in an interactive dashboard. Each stage lists the questions to consider and links to the topic pages that teach the methods.
Other useful resources¶
- The demos page holds interactive demos used in lectures
- The Build Your Own Pipeline guide describes how to build a pipeline of your own, stage by stage
- The resources page lists libraries and tools for each stage