| aj <- animate(aj) | aj <- animate(aj) | ||||
| anim_save(here::here("images", "anti-join.gif"), 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")) |
| fj <- animate(fj) | fj <- animate(fj) | ||||
| anim_save(here::here("images", "full-join.gif"), 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")) |
| ij <- animate(ij) | ij <- animate(ij) | ||||
| anim_save(here::here("images", "inner-join.gif"), 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")) |
| lj <- animate(lj) | lj <- animate(lj) | ||||
| anim_save(here::here("images", "left-join.gif"), 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")) |
| lj_extra <- animate(lj_extra) | lj_extra <- animate(lj_extra) | ||||
| anim_save(here::here("images", "left-join-extra.gif"), 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")) |
| rj <- animate(rj) | rj <- animate(rj) | ||||
| anim_save(here::here("images", "right-join.gif"), 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")) |
| sj <- animate(sj) | sj <- animate(sj) | ||||
| anim_save(here::here("images", "semi-join.gif"), 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")) |