R for Political Data Science: A Practical Guide is a handbook for political scientists new to R who want to learn the most useful and common ways to interpret and analyze political data. It was written by political scientists, thinking about the many real-world problems faced in their work. The book has 16 chapters and is organized in three sections. The first, on the use of R, is for those users who are learning R or are migrating from another software. The second section, on econometric models, covers OLS, binary and survival models, panel data, and causal inference. The third section is a data science toolbox of some the most useful tools in the discipline: data imputation, fuzzy merge of large datasets, web mining, quantitative text analysis, network analysis, mapping, spatial cluster analysis, and principal component analysis.

Key features:

  • Each chapter has the most up-to-date and simple option available for each task, assuming minimal prerequisites and no previous experience in R
  • Makes extensive use of the Tidyverse, the group of packages that has revolutionized the use of R
  • Provides a step-by-step guide that you can replicate using your own data
  • Includes exercises in every chapter for course use or self-study
  • Focuses on practical-based approaches to statistical inference rather than mathematical formulae
  • Supplemented by an R package, including all data

As the title suggests, this book is highly applied in nature, and is designed as a toolbox for the reader. It can be used in methods and data science courses, at both the undergraduate and graduate levels. It will be equally useful for a university student pursuing a PhD, political consultants, or a public official, all of whom need to transform their datasets into substantive and easily interpretable conclusions.

part Part I|86 pages

Introduction to R

chapter 1|12 pages

Basic R

ByAndrés Cruz

chapter 2|22 pages

Data Management

ByAndrés Cruz

chapter 3|34 pages

Data Visualization

BySoledad Araya

chapter 4|16 pages

Data Loading

BySoledad Araya, Andrés Cruz

part Part II|187 pages


chapter 5|42 pages

Linear Models

ByInés Fynn, Lihuen Nocetto

chapter 6|15 pages

Case Selection Based on Regressions

ByInés Fynn, Lihuen Nocetto

chapter 7|25 pages

Panel Data

ByFrancisco Urdinez

chapter 8|36 pages

Logistic Models

ByFrancisco Urdinez

chapter 9|26 pages

Survival Models

ByFrancisco Urdinez

chapter 10|39 pages

Causal inference

ByAndrew Heiss

part Part III|150 pages


chapter 11|29 pages

Advanced Political Data Management

ByAndrés Cruz, Francisco Urdinez

chapter 12|19 pages

Web Mining

ByGonzalo Barría

chapter 13|29 pages

Quantitative Analysis of Political Texts

BySebastián Huneeus

chapter 14|17 pages


ByAndrés Cruz

chapter 15|19 pages

Principal Component Analysis

ByCaterina Labrín, Francisco Urdinez

chapter 16|30 pages

Maps and Spatial Data

ByAndrea Escobar, Gabriel Ortiz