1
0

updating plots

This commit is contained in:
Matthew Gaughan 2026-01-19 15:04:38 -08:00
parent e39a684b91
commit 187174d8b9
9 changed files with 40 additions and 32 deletions

View File

@ -24,7 +24,7 @@ known_affil_emails <- c("krinkle@fastmail.com", "roan.kattouw@gmail.com",
"trevorparscal@gmail.com", "krinklemail@gmail.com", "moriel@gmail.com") "trevorparscal@gmail.com", "krinklemail@gmail.com", "moriel@gmail.com")
active_names<- c("Timo Tijhof", "Krinkle", "Roan Kattouw", "Catrope", active_names<- c("Timo Tijhof", "Krinkle", "Roan Kattouw", "Catrope",
"Trevor Parscal", "Ed Sanders") "Trevor Parscal", "Ed Sanders", "Moriel Schottlender", "Gabriel Wicke", "C. Scott Ananian")
#jforrester@wikimedia.org #jforrester@wikimedia.org
#(author_name %in% active_names) ~ "ActiveEmails", #(author_name %in% active_names) ~ "ActiveEmails",
joint_df <- joint_df |> joint_df <- joint_df |>
@ -48,14 +48,14 @@ authors_in_both <- joint_df |>
joint_df_filtered <- joint_df |> joint_df_filtered <- joint_df |>
filter(author_email %in% authors_in_both) filter(author_email %in% authors_in_both)
c1_event_date <- as.Date("2013-07-01") c1_event_date <- as.Date("2013-07-01")
c1_core_weekly <- joint_df_filtered |> c1_weekly <- joint_df |>
mutate(week_index = relative_week(commit_date, c1_event_date)) |> mutate(week_index = relative_week(commit_date, c1_event_date)) |>
group_by(week_index, isAuthorWMF, repo)|> group_by(week_index, isAuthorWMF, repo)|>
summarise(count = n(), .groups = 'drop')|> summarise(count = n(), .groups = 'drop')|>
filter(week_index >= -33 & week_index <= 13) |> filter(week_index >= -33 & week_index <= 13) |>
mutate(source = 'c1') mutate(source = 'c1')
counts <- c1_core_weekly |> counts <- c1_weekly |>
filter(isAuthorWMF != "Gerrit")|> filter(isAuthorWMF != "Gerrit")|>
filter(isAuthorWMF != "localization")|> filter(isAuthorWMF != "localization")|>
filter(source == 'c1') filter(source == 'c1')
@ -72,10 +72,8 @@ commits_created <-
) )
) + ) +
facet_grid(repo ~ ., facet_grid(repo ~ .,
scales = "free_y", labeller = labeller(repo = c("ve" = "extensions/visualeditor",
labeller = labeller(source = c("c1" = "VisualEditor", "core" = "mediawiki/core"))) +
"c2" = "HTTPS-login",
"c3" = "HTTP-deprecation"))) +
geom_col(position = position_dodge(width = 0.9), width = 0.8) + geom_col(position = position_dodge(width = 0.9), width = 0.8) +
geom_vline(data = counts |> filter(source == "c1"), geom_vline(data = counts |> filter(source == "c1"),
aes(xintercept = -29), aes(xintercept = -29),
@ -88,24 +86,33 @@ commits_created <-
linetype = "3313", color = "black", linewidth = 0.5) + linetype = "3313", color = "black", linewidth = 0.5) +
geom_vline(xintercept = 0, linetype = "dashed", color = "black", linewidth = 0.5) + geom_vline(xintercept = 0, linetype = "dashed", color = "black", linewidth = 0.5) +
geom_text( geom_text(
data = subset(counts, source == "c1" & week_index == 3), data = subset(counts, repo == "core" & week_index == 4),
aes(x=week_index, y=100, label='Opt-out deployment'), aes(x=week_index, y=75, label='Opt-out deployment'),
size = 2.5) + size = 3) +
geom_text( geom_text(
data = subset(counts, source == "c1" & week_index == -27), data = subset(counts, repo == "core" & week_index == -27),
aes(x=week_index, y=100, label='Opt-in Testing'), aes(x=week_index, y=75, label='Opt-in Testing'),
size = 2.5) + size = 3) +
geom_text( geom_text(
data = subset(counts, source == "c1" & week_index == -4), data = subset(counts, repo == "core" & week_index == -8),
aes(x=week_index, y=100, label='Deployment Announcement'), aes(x=week_index, y=75, label='Deployment Announcement'),
size = 2.5) + size = 3) +
theme_minimal() + theme_minimal() +
scale_fill_viridis_d() + scale_fill_viridis_d(
breaks = c("FALSE", "TRUE", "BzImport"),
labels = c("External Contributor", "WMF-affiliate", "BzImport")
) +
labs( labs(
x = "Weeks from Feature Deployment", x = "Weeks from VisualEditor Deployment on Wikipedia",
y = "Weekly count of new Commits", y = "Count of New Commits",
fill = "Commit Author Affiliated with WMF?" fill = "Commit Author"
) + ) +
theme(legend.position = "top") theme(legend.position = "top")
commits_created commits_created
ggsave(
filename = "011925_ve_commits_created.png",
plot = commits_created,
width = 8, # inches
height = 4, # inches
dpi = 800 # high resolution
)

View File

Before

Width:  |  Height:  |  Size: 530 KiB

After

Width:  |  Height:  |  Size: 530 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 KiB

View File

@ -68,7 +68,7 @@ tasks_created <- ggplot(
theme_minimal() + theme_minimal() +
scale_fill_viridis_d( scale_fill_viridis_d(
breaks = c("FALSE", "TRUE", "BzImport"), breaks = c("FALSE", "TRUE", "BzImport"),
labels = c("Nonaffiliate", "WMF-affiliate", "BzImport") labels = c("External Contributor", "WMF-affiliate", "BzImport")
) + ) +
labs( labs(
x = "Weeks from Feature Deployment", x = "Weeks from Feature Deployment",
@ -78,7 +78,7 @@ tasks_created <- ggplot(
theme(legend.position = "top") theme(legend.position = "top")
tasks_created tasks_created
ggsave( ggsave(
filename = "011025_tasks_created.png", filename = "011925_tasks_created.png",
plot = tasks_created, plot = tasks_created,
width = 8, # inches width = 8, # inches
height = 4, # inches height = 4, # inches
@ -148,7 +148,7 @@ ttr_boxplot <- dsl_df |>
filter(priority == "Needs Triage" | filter(priority == "Needs Triage" |
priority == "Unbreak Now!" | priority == "Unbreak Now!" |
priority == "High"), source == "c1" & week_index == 12), priority == "High"), source == "c1" & week_index == 12),
aes(x=week_index, y=80, label='Opt-in Testing'), aes(x=week_index, y=80, label='Opt-out Deployment'),
color = "black", color = "black",
size = 3) + size = 3) +
geom_vline(xintercept =14, linetype = "dashed", color = "black", linewidth = 0.5) + geom_vline(xintercept =14, linetype = "dashed", color = "black", linewidth = 0.5) +
@ -159,17 +159,15 @@ ttr_boxplot <- dsl_df |>
theme(legend.position = "top") theme(legend.position = "top")
ttr_boxplot ttr_boxplot
ggsave( ggsave(
filename = "011025_ttr_boxplot.png", filename = "011925_ttr_boxplot.png",
plot = ttr_boxplot, plot = ttr_boxplot,
width = 8, # inches width = 8, # inches
height = 4, # inches height = 4, # inches
dpi = 800 # high resolution dpi = 800 # high resolution
) )
#4.3 plot comparing machine labels of information type #4.3 plot comparing machine labels of information type
dsl_df <- dsl_df |>
filter(isAuthorWMF != "BzImport")
dsl_df_long <- dsl_df %>% dsl_df_long <- dsl_df %>%
filter(isAuthorWMF != "BzImport")|>
pivot_longer( pivot_longer(
cols = c(olmo_EP_prop_adac, olmo_RK_prop_adac, olmo_TSOL_prop_adac), cols = c(olmo_EP_prop_adac, olmo_RK_prop_adac, olmo_TSOL_prop_adac),
names_to = "tag", names_to = "tag",
@ -197,7 +195,10 @@ olmo_comparison <- ggplot(
"c3" = "HTTP-deprecation"))) + "c3" = "HTTP-deprecation"))) +
geom_boxplot() + geom_boxplot() +
theme_minimal() + theme_minimal() +
scale_fill_viridis_d() + scale_fill_viridis_d(
breaks = c("FALSE", "TRUE", "BzImport"),
labels = c("External Contributor", "WMF-affiliate", "BzImport")
) +
labs( labs(
x = "Issue Information Type Category", x = "Issue Information Type Category",
y = "% of sentences machine-labeled", y = "% of sentences machine-labeled",
@ -207,7 +208,7 @@ olmo_comparison <- ggplot(
theme(legend.position = "top") theme(legend.position = "top")
olmo_comparison olmo_comparison
ggsave( ggsave(
filename = "011025_machine_label_comparison.png", filename = "011925_machine_label_comparison.png",
plot = olmo_comparison, plot = olmo_comparison,
width = 8, # inches width = 8, # inches
height = 4, # inches height = 4, # inches

View File

@ -111,7 +111,7 @@ adac_style <- main_df |>
ylim(-50, 50) + ylim(-50, 50) +
scale_fill_viridis_d( scale_fill_viridis_d(
breaks = c("FALSE", "TRUE", "BzImport"), breaks = c("FALSE", "TRUE", "BzImport"),
labels = c("Nonaffiliate", "WMF-affiliate", "BzImport") labels = c("External Contributor", "WMF-affiliate", "BzImport")
) + ) +
theme_minimal() + theme_minimal() +
theme(legend.position = "top") + theme(legend.position = "top") +
@ -123,7 +123,7 @@ adac_style <- main_df |>
adac_style adac_style
#"PCs for Pre-Resolution Comments Written by Task Author (by Author Affiliation, Case, and Comment Type)" #"PCs for Pre-Resolution Comments Written by Task Author (by Author Affiliation, Case, and Comment Type)"
ggsave( ggsave(
filename = "011125_adac_affil_style.png", filename = "011925_adac_affil_style.png",
plot = adac_style, plot = adac_style,
width = 10, # inches width = 10, # inches
height = 5, # inches height = 5, # inches