tidyverse-gifs icon indicating copy to clipboard operation
tidyverse-gifs copied to clipboard

Code for using `flair`, `xaringan`, `pagedown`, and `magick` to build gif of steps in a series of piped operations. Example pulled from "Many Models" chapter of "R for Data Science"

tidyverse-gifs

Provides an example of how to create a gif using:

flair --> xaringan + pagedown --> magick

  • flair for the code highlighting
  • xaringan for the slides
  • pagedown to convert the html slides into pdf
  • magick to convert the pdf into images, crop images, and then stitch them together into a gif

Steps:

  1. Create slides (e.g. "xaringan-slides-example.Rmd")
  2. Render slides into a gif (e.g. "render-gif.R")

Example of resulting output:

Example gif

Improved method:

I posted an easier approach (largely superseding this one) that uses:

flipbookr --> pagedown --> magick to create types of gifs in a way that does not require nearly as much copying and pasting of code brshallo/flipbookr-gifs-examples.