About this website

Course materials and website for Visualizing Social Data, which I am teaching at Duke University in the Spring of 2023.


Many thanks to the frighteningly energetic and exceedingly helpful Andrew Heiss for, as usual, being ahead of the adoption curve with these tools and making several of his own courses publicly available. Much of the back-end code and the targets pipeline used here has been lightly-adapted from Andrew’s work.


Previously I built this and similar sites using a combination of RMarkdown, hugo, a Makefile, and various pieces of string. This time around I’m experimenting with Quarto to produce the website (instead of hugo), alongside the targets package to manage the build pipeline (instead of make), and the renv package to control the build environment (instead of, uh, nothing). I suppose I should really be using Quarto to make all the slides as well. But I have a lot of pre-existing plain-text slides that I am not going to redo from scratch right now. So the slides are still made using xaringan, with assistance from xaringanExtra and my own convenience kjhslides package.

The idea is that you can build the whole thing—site, slides, and all—in a controlled way with a recent version of R and RStudio.

  1. The repository for the whole project is on GitHub.
  2. Open vsd.Rproj to launch the project in RStudio. (Learn more about RStudio projects.)
  3. RStudio should ask whether you want to install the renv package, or you can install it yourself by running install.packages("renv") in the R console.
  4. Run renv::restore() in the R console to install all the required packages for the project.
  5. Run targets::tar_make() in the R console to build everything.

In practice there will probably be some hiccups, but in my experience renv really has greatly narrowed the yawning abyss of dependency hell that one much traverse to reproduce a complex project.