/computational-sociology

SOC577 Computational Sociology, Rutgers University

Primary LanguageR

Computational Sociology (SOC577)

Wiki

Last updated January 8, 2024.

Setting up the computational stack

This section will help to familiarize students with the tools we will be using throughout the semester. Please read it carefully and ensure you have completed the following checklist by the second week of classes.

Checklist

  • Install RStudio
    • Install tidyverse package
  • Setup Github integration
    • Make an account on Github
    • Install Git
    • Sync with RStudio
    • Clone course repository

I have an up-to-date copy of the syllabus here. Here you will find links to all of the readings for the semester. All of the books are available for free online. Below are some helpful resources for learning about R, RStudio, RMarkdown, and Github.

R

The most useful thing you can do to prepare for this course is to familiarize yourself with R.

Chris Bail at Duke has recorded a series of short videos introducing R. You can find the lectures here. These videos are intended to serve as an introduction to programming in R for a social science audience. They were created as a resource for participants in the Summer Institute in Computational Social Science without much prior experience.

The main textbook we will be using this semester is R for Data Science (R4DS) by Hadley Wickham and Garrett Grolemund (which Bail also uses in the videos discussed above). We will work through most of this book over the first few weeks of the semester. I have indicated the relevant chapters each week. The textbook focuses on using R to work with data, drawing upon a set of packages known as the tidyverse (the first author Hadley Wickham is the lead developer). It is a well-organized and easy-to-follow introduction to the fundamentals of R. If you have the time, I would recommend starting to read (or skim) through the chapters listed in the syllabus and using RStudio to test out some of the examples (if you use the online version of the book you can easily copy over the code).

RStudio

We will be using RStudio for assignments in this class. You can download the free version of RStudio Desktop here. RStudio is an integrated development environment (IDE) that has a great deal of helpful functionality. You can use it for a range of tasks, including to write and run code, finding help, viewing plots, and inspecting data.

Once you have set up RStudio, run the command install.packages("tidyverse") to install tidyverse, a set of packages that we will be using extensively this semester.

RMarkdown

RMarkdown is a framework designed by the developers of RStudio that allows you to combine code, text, and other elements into the same document. RMarkdown can create slideshows and other documents. For example, the course syllabus and the slides I will use in the lectures are both created in RMarkdown. Course assignments (and potentially your final papers) will be written using RMarkdown. I recommend taking a look at this tutorial.

Github

Github is a website used to store and share code. The most useful aspect of Github is version control. If you regularly store your code on Github then it is easy to keep a record of your work over time (similar to tracked changes in Word documents). All course materials will be hosted in a Github repository. You will be using Github to submit your course assignments.

You can sign up to Github here (no need to pay, sign up for a free account). Once you have made your account, follow the instructions here to integrate it with RStudio.

We will go over the core functionality in class, but this tutorial will introduce you to most of what you will need to know.