Skip to content

Commit c12f8f6

Browse files
committed
general revisions to sprint report
1 parent 7d4c8c3 commit c12f8f6

27 files changed

+3034
-2957
lines changed

r_project_sprint/report/R/experience.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ activities2 |>
7070
panel.grid.minor = element_blank(),
7171
panel.grid.major.y = element_blank())
7272

73-
ggsave("sprint_activities.png", path = here(dir, "figures"), device = "png",
74-
dpi = 320, width = 8, height = 5)
7573
ggsave("sprint_activities.pdf", path = here(dir, "figures"), device = cairo_pdf,
7674
width = 8, height = 5)
7775
ggsave("sprint_activities.svg", path = here(dir, "figures"), device = svg,
@@ -131,8 +129,6 @@ firsts2 |>
131129
panel.grid.minor = element_blank(),
132130
panel.grid.major.y = element_blank())
133131

134-
ggsave("first_activities.png", path = here(dir, "figures"), device = "png",
135-
dpi = 320, width = 11, height = 3)
136132
ggsave("first_activities.svg", path = here(dir, "figures"), device = svg,
137133
width = 11, height = 3)
138134
ggsave("first_activities.pdf", path = here(dir, "figures"), device = cairo_pdf,

r_project_sprint/report/R/participants.R

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
library(dplyr)
2-
library(forcats)
32
library(ggplot2)
43
library(here)
54
library(readr)
@@ -15,6 +14,7 @@ location <- read_csv(here(dir, "data", "location.csv"))
1514
dat <- location |>
1615
mutate(Country = case_when(
1716
`Country of residence` == "Russian Federation" ~ "Russia",
17+
`Country of residence` == "United States of America" ~ "United States",
1818
.default = `Country of residence`
1919
)) |>
2020
count(Country)
@@ -27,25 +27,21 @@ my_world <- rnaturalearth::ne_countries(scale = "medium", returnclass = "sf") |>
2727
my_world |>
2828
full_join(dat, by = "Country") |>
2929
ggplot() +
30-
geom_sf(aes(fill = n)) +
30+
geom_sf(aes(fill = n), linewidth = 0.2) +
3131
coord_sf(crs = "+proj=eqearth +wktext") +
3232
scale_fill_viridis_c(
3333
option = "C",
3434
breaks = seq(1, 13, 2),
3535
na.value = "grey85"
3636
) +
3737
theme(
38-
panel.background = element_rect(fill = "azure"),
38+
panel.background = element_blank(),
3939
panel.grid = element_line(color = "#ebebeb"),
4040
legend.position = c(0.97, 0.84),
4141
legend.background = element_blank(),
42-
panel.border = element_rect(fill = NA),
42+
panel.border = element_blank(),
4343
)
4444

45-
ggsave("participant_map.png",
46-
path = here(dir, "figures"), device = "png",
47-
dpi = 320, width = 10, height = 5
48-
)
4945
ggsave("participant_map.svg",
5046
path = here(dir, "figures"), device = svg,
5147
width = 10, height = 5
@@ -81,8 +77,6 @@ contributor_level |>
8177
panel.grid.minor = element_blank(),
8278
panel.grid.major.x = element_blank())
8379

84-
ggsave("contributor_level.png", path = here(dir, "figures"), device = "png",
85-
dpi = 320, width = 5, height = 3)
8680
ggsave("contributor_level.svg", path = here(dir, "figures"), device = svg,
8781
width = 5, height = 3)
8882
ggsave("contributor_level.pdf", path = here(dir, "figures"), device = cairo_pdf,
@@ -104,8 +98,6 @@ translator_level |>
10498
panel.grid.minor = element_blank(),
10599
panel.grid.major.x = element_blank())
106100

107-
ggsave("translator_level.png", path = here(dir, "figures"), device = "png",
108-
dpi = 320, width = 5, height = 3)
109101
ggsave("translator_level.pdf", path = here(dir, "figures"), device = cairo_pdf,
110102
width = 5, height = 3)
111103
ggsave("translator_level.svg", path = here(dir, "figures"), device = svg,

r_project_sprint/report/R/review.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ review |>
7272
labs(x = NULL, y = NULL) +
7373
coord_flip() +
7474
facet_grid(~ Timepoint) +
75-
theme_minimal() +
75+
theme_minimal(base_size = 12) +
7676
theme(axis.text.y = element_text(colour = mid_text, size = rel(1)),
7777
panel.grid.minor = element_blank(),
7878
panel.grid.major.y = element_blank())

r_project_sprint/report/R/translations.R

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
library(anytime)
21
library(dplyr)
3-
library(forcats)
42
library(ggplot2)
5-
library(lubridate)
6-
library(RColorBrewer)
7-
library(tidyr)
83
library(readr)
4+
library(viridis)
95

106
here::i_am("r_project_sprint/report/R/translations.R")
117
dir <- "r_project_sprint/report"
12-
unit_summary <- read_csv(here::here(dir, "data", "unit_summary.csv"))
138

9+
unit_summary <- read_csv(here::here(dir, "data", "unit_summary.csv"))
1410

1511
# Pre-processing - only leaves changes from R project (not recommended packages)
1612

@@ -29,20 +25,25 @@ unit_summary <- unit_summary |>
2925
"translation uploaded")) |>
3026
mutate(progress = factor(progress, progress_lev))
3127

32-
#Across languages
28+
# plot changes across languages
29+
30+
pal <- viridis_pal(option = "C")(4)
31+
32+
col <- c("#7f7f7f",
33+
colorRampPalette(c(pal[1], "white"))(4)[-4],
34+
colorRampPalette(c(pal[2], "white"))(3)[-3],
35+
colorRampPalette(c(pal[3:4], "yellow"))(4)[-4])
3336

34-
col <- c(brewer.pal(4, "Greens")[-1], brewer.pal(4, "Oranges")[2:3], brewer.pal(4, "Blues"))
3537
unit_summary |>
3638
ggplot(aes(fill = progress, x = fct_infreq(translation))) +
3739
geom_bar() +
38-
scale_fill_manual(values = col) +
40+
scale_fill_manual(values = rev(col)) +
3941
labs(x = NULL, y = NULL) +
4042
theme_minimal(base_size = 36) +
4143
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust = 1),
4244
legend.title=element_blank(),
4345
panel.grid.minor = element_blank(),
4446
panel.grid.major.x = element_blank())
4547

46-
ggsave(here::here(dir, "figures", "translations.png"), width = 20, height = 11, units = "in", device = "png", dpi = 320)
4748
ggsave(here::here(dir, "figures", "translations.svg"), width = 20, height = 11, units = "in", device = svg)
4849
ggsave(here::here(dir, "figures", "translations.pdf"), width = 20, height = 11, units = "in", device = cairo_pdf)
-1.32 KB
Binary file not shown.
-77 KB
Binary file not shown.

0 commit comments

Comments
 (0)