final updates to commit analysis
This commit is contained in:
parent
7ce420ce20
commit
2c694ed7b4
BIN
0316-bot-frameworks-commits-event.png
Normal file
BIN
0316-bot-frameworks-commits-event.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
BIN
commit_analysis/case1/0316-ve-core-event-new-commits.png
Normal file
BIN
commit_analysis/case1/0316-ve-core-event-new-commits.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 860 KiB |
BIN
commit_analysis/case1/0316-ve-core-testing-new-commits.png
Normal file
BIN
commit_analysis/case1/0316-ve-core-testing-new-commits.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 MiB |
BIN
commit_analysis/case1/0316-ve-core-year-new-commits.png
Normal file
BIN
commit_analysis/case1/0316-ve-core-year-new-commits.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 MiB |
BIN
commit_analysis/case1/0316-ve-ve-year-new-commits.png
Normal file
BIN
commit_analysis/case1/0316-ve-ve-year-new-commits.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 MiB |
@ -4,7 +4,7 @@ library(lubridate)
|
||||
library(tidyr)
|
||||
library(purrr)
|
||||
|
||||
ve_commit_fp <- "/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/mediawiki_core_commits.csv"
|
||||
ve_commit_fp <- "/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/extensions_visualeditor_commits.csv"
|
||||
|
||||
transform_commit_data <- function(filepath){
|
||||
#basic, loading in the file
|
||||
@ -51,8 +51,7 @@ transform_commit_data <- function(filepath){
|
||||
mutate(relative_week = relative_week(commit_date, event_date)) |>
|
||||
arrange(relative_week) |>
|
||||
group_by(author_email) |>
|
||||
mutate(first_commit_date = first(commit_date),
|
||||
new_author = as.numeric(difftime(commit_date, first_commit_date, units = "days") <= 7),
|
||||
mutate(new_author = ifelse(row_number() <= 5, 1, 0),
|
||||
new_author_wmf = if_else(grepl("@wikimedia", author_email), new_author, 0),
|
||||
new_author_unaff = if_else(!grepl("@wikimedia", author_email), new_author, 0)) |>
|
||||
ungroup()
|
||||
@ -144,7 +143,7 @@ transform_commit_data <- function(filepath){
|
||||
}
|
||||
|
||||
transformed <- transform_commit_data(ve_commit_fp)
|
||||
output_filepath <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/en-testing_0312_mediawiki_core_weekly_commit_count_data.csv"
|
||||
output_filepath <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/en-testing_0316_extensions_ve_weekly_commit_count_data.csv"
|
||||
|
||||
write.csv(transformed, output_filepath, row.names = FALSE)
|
||||
|
||||
|
@ -1,17 +1,17 @@
|
||||
library(tidyverse)
|
||||
entest_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/en-testing_0312_mediawiki_core_weekly_commit_count_data.csv"
|
||||
entest_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/en-testing_0314_bot_frameworks_weekly_commit_count_data.csv"
|
||||
entest_df <- read.csv(entest_fp, header = TRUE) |> mutate(rd_event = "en-testing")
|
||||
|
||||
widetest_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/wide-testing_0312_mediawiki_core_weekly_commit_count_data.csv"
|
||||
widetest_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/wide-testing_0314_bot_frameworks_weekly_commit_count_data.csv"
|
||||
widetest_df <- read.csv(widetest_fp, header = TRUE) |> mutate(rd_event = "wide-testing")
|
||||
|
||||
event_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/event_0312_mediawiki_core_weekly_commit_count_data.csv"
|
||||
event_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/event_0314_bot_frameworks_weekly_commit_count_data.csv"
|
||||
event_df <- read.csv(event_fp, header = TRUE) |> mutate(rd_event = "default")
|
||||
|
||||
#input_df <- bind_rows(entest_df, widetest_df, event_df)
|
||||
#dropping the event (2013-07-01) from the modeling
|
||||
input_df <- bind_rows(entest_df, widetest_df)
|
||||
#input_df <- event_df
|
||||
#input_df <- bind_rows(entest_df, widetest_df)
|
||||
input_df <- event_df
|
||||
|
||||
input_df <- input_df |>
|
||||
mutate(nonbot_commit_count = commit_count - bot_commit_count)|>
|
||||
@ -22,32 +22,37 @@ input_df <- input_df |>
|
||||
|
||||
#get into mlm format
|
||||
long_df <- input_df |>
|
||||
tidyr::pivot_longer(cols = c(other_commit_count, wikimedia_commit_count),
|
||||
tidyr::pivot_longer(cols = c(nonbot_commit_count, other_commit_count, wikimedia_commit_count),
|
||||
names_to = "commit_type",
|
||||
values_to = "lengthened_commit_count")
|
||||
|
||||
summarized_df <- long_df |>
|
||||
group_by(relative_week, commit_type) |>
|
||||
summarise(total_commit_count = sum(lengthened_commit_count, na.rm = TRUE)) |>
|
||||
mutate(rd_event="release")
|
||||
#long_df <- input_df |>
|
||||
# tidyr::pivot_longer(cols = c(wmf_ft_commit_count, unaff_ft_commit_count, nonbot_commit_count),
|
||||
# names_to = "commit_type",
|
||||
# values_to = "lengthened_commit_count")
|
||||
|
||||
intermediate_long_df <- long_df |>
|
||||
mutate(commit_share = lengthened_commit_count / (nonbot_commit_count)) |>
|
||||
mutate(log_commits = log1p(lengthened_commit_count))|>
|
||||
mutate(scaled_long_commits = lengthened_commit_count / 10)
|
||||
#intermediate_long_df <- long_df |>
|
||||
# mutate(commit_share = lengthened_commit_count / (nonbot_commit_count)) |>
|
||||
# mutate(log_commits = log1p(lengthened_commit_count))|>
|
||||
# mutate(scaled_long_commits = lengthened_commit_count / 10)
|
||||
|
||||
|
||||
window_num <- 4
|
||||
final_long_df <- intermediate_long_df |>
|
||||
final_long_df <- summarized_df |>
|
||||
filter(relative_week >= (- window_num) & relative_week <= (window_num))
|
||||
|
||||
affiliationColors <-
|
||||
setNames( c('#5da2d8', '#c7756a')
|
||||
,c("other_commit_count", "wikimedia_commit_count"))
|
||||
setNames( c('black','#5da2d8', '#c7756a')
|
||||
,c("nonbot_commit_count","other_commit_count", "wikimedia_commit_count"))
|
||||
|
||||
|
||||
commit_plot <- final_long_df |>
|
||||
ggplot(aes(x=relative_week,
|
||||
y=lengthened_commit_count,
|
||||
y=total_commit_count,
|
||||
color=factor(commit_type),
|
||||
linetype = rd_event)) +
|
||||
geom_line() +
|
||||
@ -56,13 +61,13 @@ commit_plot <- final_long_df |>
|
||||
scale_color_manual(values = affiliationColors,
|
||||
labels = c("other_commit_count" = "Unaffiliated", "wikimedia_commit_count" = "WMF Affiliated")) +
|
||||
scale_linetype_discrete(labels = c("enwiki testing (2012-12-11)", "wide testing (2013-04-25)")) +
|
||||
ggtitle("mw-core Commits Around Opt-In Testing Events (by Affiliation)") +
|
||||
ggtitle("bot-frameworks Commits Around Wide Release (by Affiliation)") +
|
||||
theme_bw() +
|
||||
theme(legend.position = "top")
|
||||
commit_plot
|
||||
|
||||
|
||||
ggsave(filename = "0314-ve-core-testing-new-commits.png", plot = commit_plot, width = 15, height = 9, dpi = 800)
|
||||
ggsave(filename = "0316-bot-frameworks-commits-event.png", plot = commit_plot, width = 15, height = 9, dpi = 800)
|
||||
|
||||
total_commit_plot <- final_long_df |>
|
||||
ggplot(aes(x=relative_week,
|
||||
|
@ -1,18 +0,0 @@
|
||||
1. SSH tunnel from your workstation using the following command:
|
||||
|
||||
ssh -N -L 8787:n3439:32903 mjilg@klone.hyak.uw.edu
|
||||
|
||||
and point your web browser to http://localhost:8787
|
||||
|
||||
2. log in to RStudio Server using the following credentials:
|
||||
|
||||
user: mjilg
|
||||
password: bkiSrTlWE0y9QQnCxd2p
|
||||
|
||||
When done using RStudio Server, terminate the job by:
|
||||
|
||||
1. Exit the RStudio Session ("power" button in the top right corner of the RStudio window)
|
||||
2. Issue the following command on the login node:
|
||||
|
||||
scancel -f 24842187
|
||||
slurmstepd: error: *** JOB 24842187 ON n3439 CANCELLED AT 2025-03-14T14:28:50 ***
|
Loading…
Reference in New Issue
Block a user