
This course provides hands-on experience for learning programming in R, a free and open-source language for statistical computing. This course is designed for newcomers without any prior programming background.
This course will be run in one session per day running over over 5 days.
The course hours are 9.30 am - 12.00pm each day
Dr. Thiago Nascimento da Silva is a Senior Lecturer in the School of Politics and International Relations (SPIR) and the Deputy Director of the Australian Centre for Federalism at the Australian National University (ANU). He is also the co-chair of the Quantitative Methods Group at the Australian Political Studies Association. Thiago’s research focuses on comparative politics, with a particular emphasis on political institutions and political economy. He applies quantitative methods to examine how institutional variations in democracies influence government formation, policymaking, party competition, voter behaviour, and opposition dynamics. He is the co-author of the recently published books Voter's Perceptions of Party Brands (Cambridge University Press) and Learning to Govern Together in Representative Democracy (Oxford University Press). His work has also been published or is forthcoming in prestigious academic journals such as the American Political Science Review, the Journal of Politics, the European Journal of Political Research, Political Science Research and Methods, Legislative Studies Quarterly, and others.
Designed for newcomers without any prior programming background, the course covers foundational programming concepts, including basic R commands, operators, package utilization, functions, conditionals, and loops.
Emphasis is then placed on the core areas of data science applied to political analysis, including:
- data types such as categorical, continuous, discrete, and nominal;
- data structures like vectors, matrices, data frames, and lists;
- data wrangling techniques from data import/export to cleaning, addressing missing values, outliers, and transformations;
- exploratory data analysis focusing on measures of central tendency and descriptive statistics;
- and crafting data visualizations to create professional academic tables and figures for presenting distributions, crosstabulations, and correlations.
Supplemental online resources, including in-depth mathematical materials, will be available to provide further elaboration on the discussed topics.
Day 1 – Introduction to R and RStudio
- RStudio interface; Console vs Script
- Objects, vectors, loops and functions
- Basic commands and operations
- First steps in writing and running code
Day 2 – Packages, Data Types and Working With Data
- Installing/loading packages
- Reading data (CSV, RData, URLs)
- Understanding variables and measurement levels
- Creating and transforming variables
Day 3 – Data Wrangling and Cleaning
- Importing data (Stata, SPSS, CSV)
- Subsetting, recoding, creating new variables
- Handling missing values and basic cleaning
- Case study: Political economy dataset
Day 4 – Exploratory Data Analysis
- Descriptives and distributions
- Identifying and handling outliers
- Intro to graphical illustrations
- Case study: Political surveys data
Day 5 – Visualisation and Correlation
- ggplot2 basics (bar plots, histograms, box plots)
- Correlation and scatterplots
- Simple regression analysis: interpreting coefficients
- Case study: Systems and types of governments
This course will run online using Zoom.
Please install the following before class
1. R
Download from CRAN: https://cran.r-project.org/
Install the latest version for your operating system.
2. RStudio Desktop
Download from: https://posit.co/download/rstudio-desktop/
Install the free version.
Read and follow the Tutorial: Getting Started with R and RStudio. to install R and RStudio correctly (and in the right order: first R, then RStudio).
This course is designed for newcommers without any prior programming background.
Wickham, Hadley, Mine Çetinkaya-Rundel, and Garrett Grolemund. 2023. R for data science: import, tidy, transform, visualize, and model data." Sebastopol: O'Reilly.
Open access at: https://r4ds.hadley.nz/

