Computational Analysis of Communication

An open access computational social science textbook giving a practical introduction to the analysis of texts, networks, and images with code examples in Python and R

Wouter van Atteveldt, Damian Trilling & Carlos Arcila


March 11, 2022

This is the online version of the book Computational Analysis of Communication published with Wiley-Blackwell. To buy a hard copy or eBook version of the book, please visit your local academic or independent bookstore or use the link above to order.

Table of Contents

  1. Introduction
  2. Fun with Data
  3. Programming Concepts
  4. How to write code
  5. Files and Data Frames
  6. Data Wrangling
  7. Exploratory data analysis
  8. Machine Learning
  9. Processing text
  10. Text as data
  11. Automatic analysis of text
  12. Scraping online data
  13. Network Data
  14. Multimedia data
  15. Scaling up and distributing
  16. Where to go next

This website contains the full contents (text, code examples, and figures) of the book and is (and will be) available completely free and open access. We hope that this will make computational techniques accessible (and fun!) to as many students and researchers as possible, regardless of means and institutional support. We also hope that this will make it easy for students and professors to use a sub set of chapters without forcing students to buy the whole book. We would really like to thank Wiley-Blackwell for their confidence in making this open access option possible.

Status of this book

This is the book as published in 2022 by Wiley-Blackwell. Note that most of the content is written in 2021, and in some areas the technology moves very quickly. For that reason, we are working on an updated version. This version is hosted at and should be considered a draft / work in progress. Please visit that site and/or the github page to learn more.

In the chapters where we (are planning to) do a more major rewrite, a note will also be placed in this version of the book so you can see where we think the content would benefit from an update.

What can you do to help:

  • Create a github issue if you see any errors, find anything hard to understand, or have any other sort of suggestions or feedback.
  • Fix typo’s or other issues directly by editing the relevant file on github and creating a pull request

Any contributors will be acknowledged on this page and in a possible second edition of the book. If you are willing to contribute in a more major way (e.g. rewrite or add an entire chapter), please get in touch with us and we can work something out.


We would like to thank colleagues, friends, and students who provided feedback and input on earlier versions of parts of the manuscript: Dmitry Bogdanov, Andreu Casas, Modesto Escobar, Anne Kroon, Nicolas Mattis , Cecil Meeusen, Jesús Sánchez-Oro, Nel Ruigrok, Susan Vermeer, Mehdi Zamani, Marthe Möller. Of course, we also want to thank all others that we might have forgotten to mention here (sorry!) – please contact us if you feel that your name should be here.

Citing this book

To cite this book, use:

Van Atteveldt, W., Trilling, D., & Calderón, C. A. (2022). Computational Analysis of Communication. Wiley Blackwell.


  title={Computational Analysis of Communication},
  author={{Van Atteveldt}, Wouter and Trilling, Damian and Calder{\'o}n, Carlos Arc{\'\i}la},
  publisher={Wiley Blackwell}