Three classes of flipbooks (or "getting organized")

I kept sending links in e-mails to students for reference. Here’s the link for the data cleaning examples. Here’s the link for reshaping data. Here’s the link for ggplot basics. But would they actually be able to find these references again? Did I expect them to go through the jumble of emails I’d sent? Last quarter, I created a resources page for one of my classes, with a collection of the links that I’d sent and some visual cues to remind them of contents. An improvement, but not totally orderly and not sustainable.

A fundamental problem was my chucking every flipbook into the same github repository; this repository was getting bloated.

Over the last couple weeks, I’ve been taking on a new approach - breaking up the big repo into smaller, thematic ones — Visualization, Manipulation, and Statistical Analysis — and working on directories for each. A race to get references organized before my students’ race to get things done at the end of the quarter.

I think the strategy has worked fairly well. Students are working more independently through their data manipulation problems — definitely more so than when I just started teaching. There are several factors at play here, but I think having the flipbook references and having them organized is playing a part. When students do come in for office hours for trouble shooting, I often direct them to an example in a flipbook where they see their problem mirrored.

Now I have three main portal’s of flipbooks: Visualization with ggplot2, Data Manipulation, and Statistical Analysis.

Visualization with ggplot2

Flipbooks were originally developed for a single use case: data visualization with {ggplot2}. {ggplot2} is an implementation of the Grammar of Graphics (Wilkinson 1999); the package was developed by Hadley Wickham and now has many contributors. ggplot2’s flexibility allows working incrementally and sequentially — building up a plot decision by decision. This fact means that a single input of ggplot2 code can be automatically parsed, reconstructed, and presented in a flipbook that communicates meaningfully, giving feedback in the output at every additional code reveal. The organization needed for effective communicationn in flipbooks is a style that I’ve called “SLOWggplot2” (Nerd fun: SLOWggplot2’s Literally Only the Wonderful/Wayfaring/Wickham’s ggplot2… like ‘YAML ain’t markup language’ or ‘FIJI is just Imagej’). SLOWggplot2 is a bit verbose but it is native to ggplot2 and fully supported, and delivers valuable feedback. the ggplot2 flipbook is one of the earliest use cases of flipbooks and provides a lot of examples of using ggplot2. But I’ve written a more theoretical treatment, a ggplot grammar guide embedded below, which provides more explanation and discussion about the specific grammar of {ggplot2}.


The second use-case explored for flipbooks was data manipulation. While less visually compelling, I think these flipbooks can help newcomers and seasoned practitioners alike navigate getting wrangling tasks done. The magrittr pipe operator, %>%, is usually the break point at which intermediate output is shown. The data manipultaion flipbooks mostly demonstrate dplyr and tidyr data manipulation functions. Wrangling with base R and data.table is also possible using flipbooks with or without the magrittr pipe, and I’m building up examples using these workflows too.

Statistical Analysis

A third class of flipbooks are about statistical analysis and communication. This feels like the most experimental (and for me, right now, is perhaps the most exciting area!). Not only is the task of communicating how-to of statistical tasks an objective, but flipbooks may serve to illustrate concepts, like bootstrapping and false positive rates under statistical independence. They may even be used for walking through how statistics themselves are calculated.

That’s it! Student’s should now be able to more easily find a relevant flipbook for the problem they are working on.

[UPDATE 2020-03-21] - I’m trying to do a meta organization - “flipbooks textbook”. A go-to guide for getting stuff done in R.

Evangeline Reynolds
Visiting Teaching Assistant Professor

My research interests include international institutions, causal inference, data visualization, and computational social science and pedagogy.