cis-ds / course-site

Course site for Computing for Information Science (INFO 5940)
43 stars 41 forks source link

Animate join functions in slides #320

Closed bensoltoff closed 2 years ago

bensoltoff commented 2 years ago

Use tidyexplain and animations to demo these techniques.

bensoltoff commented 2 years ago

Example

library(tidyverse)
library(rcfss)
library(tidyexplain)
#> Loading required package: gganimate

data("superheroes")

# need to have exactly one row for each publisher in each table
# otherwise tidyexplain triggers an error
superheroes <- slice(.data = superheroes, c(1, 4, 7))

animate_full_join(x = superheroes, y = publishers, by = "publisher",
                  text_size = 5, cell_width = 1.3)
#> Warning: `data_frame()` was deprecated in tibble 1.1.0.
#> Please use `tibble()` instead.

Created on 2021-11-15 by the reprex package (v2.0.1)