-
Notifications
You must be signed in to change notification settings - Fork 2
/
traducao-r4ds.R
54 lines (43 loc) · 1.43 KB
/
traducao-r4ds.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Importar ----
traducao_r4ds <- readr::read_csv("traducao-r4ds.csv")
nomes <- readr::read_csv("contributors.csv")
# tratamento e join ------
traducao_tratado <- traducao_r4ds |>
tidyr::pivot_longer(
cols = -c(secao, ordem, capitulo, n_issue, n_pr),
values_to = "github",
names_to = "contribuicao"
) |>
dplyr::left_join(nomes) |>
dplyr::mutate(
contribuicao = dplyr::case_when(
contribuicao == "traducao" ~ "Tradução",
stringr::str_starts(contribuicao, pattern = "revisao") ~ "Revisão"
),
url_issue = paste0(
"https://github.com/cienciadedatos/pt-r4ds/issues/",
n_issue
),
url_pr = paste0("https://github.com/cienciadedatos/pt-r4ds/pull/", n_pr)
)
# Equipe sumarizado ----
equipe_sumarizado <- traducao_tratado |>
dplyr::count(contribuicao, github) |>
tidyr::pivot_wider(values_from = n, names_from = contribuicao)
# Equipe incompleto ---
traducao_tratado |>
dplyr::filter(github != "???", is.na(nome)) |>
dplyr::distinct(github) |>
dplyr::pull(github) |>
writeLines()
# Equipe - Falta o email
traducao_tratado |>
dplyr::filter(github != "???", is.na(email) | email == "???") |>
dplyr::distinct(github) |>
dplyr::mutate(url_github = paste0("https://github.com/", github),
handle = paste0("@", github)) |>
dplyr::pull(handle) |>
writeLines()
# Precisamos de ajuda! ----
help_wanted <- traducao_tratado |>
dplyr::filter(github == "???")