About the Book

Explore

An online version of this book is available at <https://dspatterns.netlify.app>.

We are writing this book right now! Please feel free to explore, but also please be mindful that all of the content is undergoing active iteration. We are still forming our own ideas and opinions as we work.

This version of the book was built with:

Finding R package dependencies ... Done!
 setting  value
 version  R version 4.3.2 (2023-10-31)
 os       Ubuntu 22.04.3 LTS
 system   x86_64, linux-gnu
 ui       X11
 language (EN)
 collate  C.UTF-8
 ctype    C.UTF-8
 tz       UTC
 date     2023-12-30
 pandoc   2.19.2 @ /usr/bin/ (via rmarkdown)

Along with these packages:

Understand

Want to know what goes into the sausage? Here is an overview of our book’s tech stack.

Writing tools

  • The book is built with Quarto. It is a Quarto project because the actual book is a collection of chapters, where each chapter is an individual Quarto file (*.qmd).

Collaboration tools

Automation tools

Pretty soon we realized that we should set up an automated build for our book.

  • We used GitHub Actions (GHA) for the automated build.

  • Since we had an HTML version of the book, we also needed each new build to be deployed automatically. That way we could be sure that the website always stayed in sync with the source in our main branch. We used Netlify for hosting.

The combination of GitHub Actions (GHA) and Netlify means that the book is automatically updated after every commit to the main branch on GitHub.

Hygiene tools

  • Rich made us a snazzy dspatterns data package so we weren’t lugging all of our data files around locally.

  • We introduced renv package to our stack, following renv with Quarto docs. This ensured that we were both working on and building the book locally with the exact same versions for all of our R packages.

Explain

OK, but how exactly is the sausage actually made though?

We (Alison and Rich) wrote this book together. We wrote separately for the most part, but we did write for at least one hour a week together. We did this over Zoom.

We also (coincidentally!) discovered that we both have Apple Music. So we would make fun playlists and share audio while we wrote. Here are the Zoom instructions for playing music without sharing your screen.

Since we automated a lot of things, our everyday workflow after getting all the initial pieces in place involved:

Share

We are excited that you are excited about our book! We’ll update here when the book is ready to be shared. In the meantime, you are welcome to start a conversation over at our GitHub Discussions.


  1. Every Quarto project includes a configuration (“config”) file.

    Our Quarto config file: https://github.com/dspatterns/dspatterns-book/blob/main/_quarto.yml↩︎

  2. Every GitHub Action includes a workflow configuration file.

    Our GHA workflow file: https://github.com/dspatterns/dspatterns-book/blob/main/.github/workflows/build-book.yml↩︎

  3. Every GitHub Action workflow has a link to view logs for workflow runs.

    Our GHA workflow runs: https://github.com/dspatterns/dspatterns-book/actions/workflows/build-book.yml↩︎

  4. Every renv project includes a “lock” file.

    Our renv lock file: https://github.com/dspatterns/dspatterns-book/blob/main/renv.lock↩︎