Skip to main content
COVID-19 UPDATE: CURBSIDE PICKUP AND MAILING NOW AVAILABLE
Library building closed except for Connection. See COVID-19 Service Updates and Resources

Twitter Data

Getting started with finding and using Twitter data in your research

Overview

Twitter data (in the form of individual tweets) can be a fascinating data source to explore research questions related to current events and public opinion.

There are a number of ways to get this data and your choice will depend on what kind of analysis you want to do, how comfortable you are with programming, and what your research question is.

Before getting started it's helpful to know a few things about how Twitter (a private commercial platform) works:

  • Twitter developer policy prevents the sharing of compete JSON files of tweets;  only Twitter IDs (numeric strings) are usually stored in shared datasets.
  • The Twitter Application Programming Interface (API) will only allow you access to the past week (7 days) of tweets. You will have to look for private sources or existing datasets for older data.
  • If you want to write your own script to capture Twitter data, you will need to have a Twitter account.
  • Python and R are fairly widely used by Twitter researchers - you will find more online tools and help if you work with one of these languages.

The Twitter developer portal is the most authoritative source of information about what is or is not allowed with the platform and its data.

Social Media Ethics

Using Twitter data, created by ordinary people who did not necessarily consent to being the subjects of research, brings with it some particular legal and ethical challenges. The linked resources below come from groups and institutions involved with internet and social media research particularly. 

Data Science & Digital Scholarship Coordinator

Jeanine Finn's picture
Jeanine Finn
Contact:
Digital Strategies & Scholarship Division
Honnold, 3rd floor
The Claremont Colleges Library
909-607-7958