R for Social Data Science

R for Social Data Science will introduce participants to basic computer programming skills for social data analysis. In particular, it will introduce participants to the R programming language, which is an open-sourced and cross-platform tool for statistical analysis. The aim is for participants to acquire basic programming skills.

 

On successful completion of this module students will be able to:

  • Describe basic programming terminology, structures, and conventions.
  • Demonstrate familiarity with the R programming language, including the ability to write, execute and debug scripts.
  • Design project workflows through GitHub
  • Perform data wrangling and visualisation tasks using R.

 

What topics will you cover?

R for Social Data Science introduces participants to the core programming concepts, such as functions, variables, conditions, loops, working with libraries, and interacting with APIs. It also covers data management and visualisation. Best practices in project workflow and version control will also be introduced using Github.

 

The schedule of topics for the class is as follows:

  • Sessions 1 & 2, Introduction to Computation: Discuss core software development concepts such as computers, programming languages and algorithms. Learn how to share code using GitHub.
  • Sessions 3 & 4, R Basics: Introduce environments, variables, assignment, and object types. Start using some built-in functions to describe data.
  • Sessions 5 & 6, Control Flow: Branching, if-else statements, and loops.
  • Sessions 8 & 9, Functions: Main building block of a program implemented in any computing language, learning how to construct them.
  • Sessions 10 & 11, Debugging, Testing, Performance and Complexity: Learn how to eliminate errors in structured ways and debug, measure execution time and benchmarking of specific operations.
  • Sessions 12 & 13, Data Wrangling: Focus on data frames (base R) and its tidyverse cousin tibble. We will also discuss formats of data storage and functions for data I/O and descriptive analysis.
  • Sessions 14 & 15, Visualisation: Learn how to plot data in different formats using base R and gglot.
  • Sessions 16 & 17, Gathering Electronic Data: Fundamentals of web scraping, collecting data from online sources.