| @@ -33,3 +33,8 @@ aj <- initial_dfs %>% | |||
| aj <- animate(aj) | |||
| anim_save(here::here("images", "anti-join.gif"), aj) | |||
| anti_join(x, y, by = "id") %>% | |||
| proc_data() %>% | |||
| plot_data("anti_join(x, y)") %>% | |||
| ggsave(file = here::here("images", "anti-join.png")) | |||
| @@ -20,3 +20,8 @@ fj <- initial_dfs %>% | |||
| fj <- animate(fj) | |||
| anim_save(here::here("images", "full-join.gif"), fj) | |||
| full_join(x, y, "id") %>% | |||
| proc_data() %>% | |||
| plot_data("full_join(x, y)") %>% | |||
| ggsave(file = here::here("images", "full-join.png")) | |||
| @@ -18,3 +18,8 @@ ij <- initial_dfs %>% | |||
| ij <- animate(ij) | |||
| anim_save(here::here("images", "inner-join.gif"), ij) | |||
| inner_join(x, y, by = "id") %>% | |||
| proc_data() %>% | |||
| plot_data("inner_join(x, y)") %>% | |||
| ggsave(file = here::here("images", "inner-join.png")) | |||
| @@ -18,3 +18,6 @@ lj <- initial_dfs %>% | |||
| lj <- animate(lj) | |||
| anim_save(here::here("images", "left-join.gif"), lj) | |||
| plot_data(joined_dfs, "left_join(x, y)") %>% | |||
| ggsave(file = here::here("images", "left-join.png")) | |||
| @@ -44,3 +44,26 @@ lj_extra <- anim_df %>% | |||
| lj_extra <- animate(lj_extra) | |||
| anim_save(here::here("images", "left-join-extra.gif"), lj_extra) | |||
| ## Save static images | |||
| df_names <- data_frame( | |||
| .x = c(1.5, 4.5), .y = 0.25, | |||
| value = c("x", "y"), | |||
| size = 12, | |||
| color = "black" | |||
| ) | |||
| g_input <- proc_data(y_extra) %>% | |||
| mutate(.x = .x + 3) %>% | |||
| bind_rows(proc_data(x)) %>% | |||
| plot_data() + | |||
| geom_text(data = df_names, family = "Fira Mono", size = 24) + | |||
| annotate("text", label = "↑ duplicate keys in y", x = 4.5, y = -4.75, | |||
| family = "Fira Sans", color = "grey45") | |||
| ggsave(g_input, file = here::here("images", "left-join-extra-input.png")) | |||
| left_join(x, y_extra, by = "id") %>% | |||
| proc_data() %>% | |||
| plot_data("left_join(x, y)") %>% | |||
| ggsave(file = here::here("images", "left-join-extra.png")) | |||
| @@ -23,3 +23,6 @@ rj <- initial_dfs %>% | |||
| rj <- animate(rj) | |||
| anim_save(here::here("images", "right-join.gif"), rj) | |||
| plot_data(joined_dfs, "right_join(x, y)") %>% | |||
| ggsave(file = here::here("images", "right-join.png")) | |||
| @@ -16,3 +16,6 @@ sj <- initial_dfs %>% | |||
| sj <- animate(sj) | |||
| anim_save(here::here("images", "semi-join.gif"), sj) | |||
| plot_data(joined_df, "semi_join(x, y)") %>% | |||
| ggsave(file = here::here("images", "semi-join.png")) | |||