Gunboat Capitalism
Professor Graham
Team Lead: Ryan Barr


THE Security and Political economy LAB
Applied Data Science Training
At the SPEC Lab, we devote significant effort to training students in applied data science—with a particular focus on data management and data visualization using R, an open-source statistical programming language widely used in both academia and industry.
​
Our training modules are designed to complement formal coursework in statistics and econometrics. Whereas traditional courses emphasize theory and mathematics, our approach focuses on the practical skills of statistical computing. These modules were developed in collaboration with our private sector and government partners, ensuring that students are prepared not only for academic research but also for careers in data science across government, nonprofit, and private sectors.
​
Our training modules are designed to be taken in sequence, but students are welcome to skip around. Each module includes:
-
A module guide
-
Lecture videos (via YouTube)
-
A walkthrough exercise (for solo or guided completion)
-
A group-work exercise (intended for small groups but also suitable for solo work)
-
A homework assignment to assess individual mastery
We also provide answer keys for the exercises and homework, as well as the R scripts featured in the lecture videos.​​
​
Lastly, we’ve compiled a Google Drive folder with additional online resources. It’s a great place to start exploring.
​
These materials are a constant work in progress and we welcome feedback at benjamin.a.graham@usc.edu. Funding for the creation of these materials was provided by the National Science Foundation, the Dornsife College of Letters, Arts, and Sciences at the University of Southern California, and individual SPEC Lab Donors.

data management I
Exploring and Manipulating Data
​
This module introduces the tidyverse package and covers how to subset data and create new variables, as well as how to group and arrange observations and summarize information. Functions covered include: select(), filter(), mutate(), summarise(), group_by(), arrange().
data management
IIA
Append IDs
​
This module covers how to use the append_ids function created by the SPEC Lab to append Gleditsch-Ward country ID numbers to datasets on the basis of country names. This module is narrowly geared toward the management of the type of country-year datasets common in the quantitative study of comparative politics and international relations and may not be useful to all students.