Andreas Jungherr
  • Home
  • About
  • Blog
  • Publications
    • Digital Transformations of the Public Arena (2022)
    • Retooling Politics: How Digital Media Are Shaping Democracy (2020)
    • Analyzing Political Communication with Digital Trace Data (2015)
    • Das Internet in Wahlkämpfen: Konzepte, Wirkungen und Kampagnenfunktionen (2013)
  • Podcast: Tech and Politics
  • Media
  • Teaching
  • Impressum
  • Home
  • About
  • Blog
  • Publications
    • Digital Transformations of the Public Arena (2022)
    • Retooling Politics: How Digital Media Are Shaping Democracy (2020)
    • Analyzing Political Communication with Digital Trace Data (2015)
    • Das Internet in Wahlkämpfen: Konzepte, Wirkungen und Kampagnenfunktionen (2013)
  • Podcast: Tech and Politics
  • Media
  • Teaching
  • Impressum
07 Jan 2016
Andreas Jungherr Publications
2016/01/07 Andreas Jungherr

Tutorial for Social Scientists on Using Twitter Data in Research

For the last seven years or so, Pascal Jürgens and I have tried to tease meaning out of data collected on Twitter in our research. As classically trained social scientists, this has not always been a smooth ride. Working with Twitter data has been tremendously interesting and rewarding but as we were both trained neither in software development nor code-based data collection or management, it is fair to say that our learning curve was very steep. As Twitter has become an increasingly popular research object and environment, we decided to share some of our experiences in form of a tutorial and an accompanying starter-kit with code examples for the code-based collection, preparation, and analysis of Twitter data.

We are very happy now to be able to share this tutorial with you. Yesterday we published the tutorial on SSRN and our starter-kit with code examples on GitHub.

A Tutorial for Using Twitter Data in the Social Sciences: Data Collection, Preparation, and Analysis

Abstract: The ever increasing use of digital tools and services has led to the emergence of new data sources for social scientists, data wittingly or unwittingly produced by users while interacting with digital tools. The potential of these digital trace data is well-established. Still, in practice, the process of data collection, preparation and storage, and subsequent analysis can provide challenges. With this tutorial, we provide a guide for social scientists to the collection, preparation, and analysis of digital trace data collected on the microblogging service Twitter. This tutorial comes with a set of scripts providing researchers with a starter kit of code allowing them to search, collect, and prepare Twitter data following their specific research interests. We will start with a general discussion of the research process with Twitter data. Following this, we will introduce a set of scripts for data collection on Twitter. After this, we will introduce various scripts for the preparation of data for analysis. We then present a series of examples for typical analyses that could be run with Twitter data. Here, we focus on counts, time series, and networks. We close this tutorial with a discussion of challenges in establishing digital trace data as a normal data source in the social sciences.

Our imaginary reader was very much a social scientists starting out in the code-based work with data collected on Twitter. This and our own background as social scientists and not as computer scientists might make the tutorial and our code examples seem rather quaint to more formally trained eyes. Still, we hope what the tutorial lacks in this regard it makes up through our perspective in approaching Twitter data as object for research in the social sciences.

While we aim to update the tutorial and our code in the future, please let us know in the meantime if you find mistakes or run into trouble with the code. The easiest option for this is by opening an issue in the GitHub repository with our example code.

You are of course free to use and adapt the scripts provided in our code examples in your research or teaching. If you do so, please cite the package by providing the following information:

Pascal Jürgens and Andreas Jungherr. 2016. twitterresearch [Computer software]. Retrieved from https://github.com/trifle/twitterresearch

If you want to cite this tutorial please provide the following information:

Pascal Jürgens and Andreas Jungherr. 2016. A Tutorial for Using Twitter Data in the Social Sciences: Data Collection, Preparation, and Analysis. Available at SSRN: http://ssrn.com/abstract=2710146

A Tutorial for Using Twitter Data in the Social Sciences: Data Collection, and Analysis, Big Data, Computational Social Science, Digital Trace Data, How To, Pascal Jürgens, Preparation, Python, R, Social Media, SQLite, Twitter
  • Recent Posts

    • New working paper: What do people expect from Artificial Intelligence? Public opinion on alignment in AI moderation from Germany and the United States
    • Neuer Kurs: Forschungsprojekt in der Computational Social Science
    • New Course: Misinformation, disinformation and other digital fakery (Summer 2025)
    • New Course: Artificial Intelligence and Democracy (Summer 2025)
    • Interview zu übertriebenen Ängsten vor Desinformation und digitaler Regulierungslust
  • Categories

    • Conferences
    • Interviews
    • Lecture Podcast
    • News
    • Notes
    • Public Speaking
    • Publications
    • Teaching
    • Videos
  • Archives

    • May 2025 (1)
    • April 2025 (3)
    • March 2025 (3)
    • February 2025 (7)
    • January 2025 (3)
    • November 2024 (4)
    • September 2024 (1)
    • July 2024 (2)
    • June 2024 (5)
    • April 2024 (4)
    • February 2024 (2)
    • January 2024 (1)
    • December 2023 (1)
    • November 2023 (1)
    • July 2023 (2)
    • June 2023 (1)
    • April 2023 (1)
    • March 2023 (1)
    • February 2023 (2)
    • December 2022 (1)
    • November 2022 (1)
    • October 2022 (3)
    • July 2022 (1)
    • June 2022 (4)
    • May 2022 (2)
    • April 2022 (1)
    • February 2022 (1)
    • January 2022 (2)
    • December 2021 (3)
    • November 2021 (1)
    • October 2021 (2)
    • September 2021 (3)
    • July 2021 (1)
    • June 2021 (4)
    • April 2021 (3)
    • March 2021 (2)
    • January 2021 (1)
    • December 2020 (1)
    • November 2020 (2)
    • October 2020 (2)
    • September 2020 (1)
    • July 2020 (1)
    • June 2020 (1)
    • April 2020 (5)
    • March 2020 (2)
    • February 2020 (1)
    • January 2020 (4)
    • November 2019 (1)
    • October 2019 (2)
    • September 2019 (1)
    • July 2019 (1)
    • April 2019 (3)
    • January 2019 (1)
    • November 2018 (1)
    • September 2018 (2)
    • March 2018 (1)
    • February 2018 (1)
    • December 2017 (1)
    • October 2017 (1)
    • September 2017 (1)
    • July 2017 (2)
    • June 2017 (1)
    • May 2017 (3)
    • April 2017 (2)
    • March 2017 (2)
    • January 2017 (2)
    • December 2016 (1)
    • November 2016 (1)
    • October 2016 (17)
    • July 2016 (11)
    • June 2016 (1)
    • March 2016 (1)
    • February 2016 (2)
    • January 2016 (1)
    • November 2015 (3)
    • October 2015 (1)
    • September 2015 (3)
    • May 2015 (1)
    • April 2015 (3)
    • March 2015 (3)
    • February 2015 (3)
    • January 2015 (1)
    • October 2014 (2)
    • August 2014 (2)
    • April 2014 (1)
    • March 2014 (1)
    • February 2014 (2)
    • December 2013 (1)
    • October 2013 (3)
    • September 2013 (3)
    • August 2013 (4)
    • July 2013 (3)
    • June 2013 (2)
    • May 2013 (1)
    • April 2013 (1)
    • March 2013 (1)
    • February 2013 (1)
    • December 2012 (1)
    • November 2012 (2)
    • October 2012 (3)
    • September 2012 (3)
    • August 2012 (2)
    • June 2012 (1)
    • April 2012 (8)
    • March 2012 (1)
    • February 2012 (1)
    • October 2011 (2)
    • September 2011 (1)
    • August 2011 (1)
    • July 2011 (5)
    • June 2011 (2)
    • May 2011 (4)
    • April 2011 (1)
    • March 2011 (2)
    • February 2011 (3)
    • January 2011 (2)
    • December 2010 (3)
    • November 2010 (1)
    • October 2010 (1)
    • September 2010 (3)
    • July 2010 (1)
    • June 2010 (2)
    • May 2010 (1)
    • April 2010 (4)
    • March 2010 (3)
    • February 2010 (6)
    • January 2010 (1)
    • December 2009 (3)
    • August 2009 (1)
    • April 2009 (1)
    • March 2009 (3)
    • January 2009 (2)
    • December 2008 (3)
    • November 2008 (3)
    • October 2008 (9)
    • August 2008 (1)
  • On the web

    • instagram
    • linkedin
    • xing
    • youtube
  • Navigation

    • Home
    • About
    • Blog
    • Publications
      • Digital Transformations of the Public Arena (2022)
      • Retooling Politics: How Digital Media Are Shaping Democracy (2020)
      • Analyzing Political Communication with Digital Trace Data (2015)
      • Das Internet in Wahlkämpfen: Konzepte, Wirkungen und Kampagnenfunktionen (2013)
    • Podcast: Tech and Politics
    • Media
    • Teaching
    • Impressum
  • Contact

    • Feldkirchenstraße 21
      96052 Bamberg, Germany

    • https://andreasjungherr.net/https://andreasjungherr.net/
    • andreas.jungherr[at]uni-bamberg.de
Andreas Jungherr POWERED BY United Themes™