Przeglądaj źródła

Add static images

pull/5/merge
Garrick Aden-Buie 7 lat temu
rodzic
commit
9ecbb7a607
14 zmienionych plików z 47 dodań i 0 usunięć
  1. +5
    -0
      R/anti_join.R
  2. +5
    -0
      R/full_join.R
  3. +5
    -0
      R/inner_join.R
  4. +3
    -0
      R/left_join.R
  5. +23
    -0
      R/left_join_extra.R
  6. +3
    -0
      R/right_join.R
  7. +3
    -0
      R/semi_join.R
  8. BIN
      images/full-join.png
  9. BIN
      images/inner-join.png
  10. BIN
      images/left-join-extra-input.png
  11. BIN
      images/left-join-extra.png
  12. BIN
      images/left-join.png
  13. BIN
      images/right-join.png
  14. BIN
      images/semi-join.png

+ 5
- 0
R/anti_join.R Wyświetl plik

@@ -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"))

+ 5
- 0
R/full_join.R Wyświetl plik

@@ -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"))

+ 5
- 0
R/inner_join.R Wyświetl plik

@@ -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"))

+ 3
- 0
R/left_join.R Wyświetl plik

@@ -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"))

+ 23
- 0
R/left_join_extra.R Wyświetl plik

@@ -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"))

+ 3
- 0
R/right_join.R Wyświetl plik

@@ -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"))

+ 3
- 0
R/semi_join.R Wyświetl plik

@@ -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"))

BIN
images/full-join.png Wyświetl plik

Before After
Width: 2833  |  Height: 2245  |  Size: 168KB

BIN
images/inner-join.png Wyświetl plik

Before After
Width: 2833  |  Height: 2245  |  Size: 153KB

BIN
images/left-join-extra-input.png Wyświetl plik

Before After
Width: 2833  |  Height: 2245  |  Size: 186KB

BIN
images/left-join-extra.png Wyświetl plik

Before After
Width: 2833  |  Height: 2245  |  Size: 175KB

BIN
images/left-join.png Wyświetl plik

Before After
Width: 2833  |  Height: 2245  |  Size: 162KB

BIN
images/right-join.png Wyświetl plik

Before After
Width: 2833  |  Height: 2245  |  Size: 160KB

BIN
images/semi-join.png Wyświetl plik

Before After
Width: 2833  |  Height: 2245  |  Size: 147KB

Ładowanie…
Anuluj
Zapisz