update to VE commit analysis
This commit is contained in:
parent
df7be39071
commit
f08f21a67e
BIN
commit_analysis/case1/021525_core-ve_event_mlm.rda
Normal file
BIN
commit_analysis/case1/021525_core-ve_event_mlm.rda
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 67 KiB |
Binary file not shown.
Before Width: | Height: | Size: 32 KiB |
Binary file not shown.
Before Width: | Height: | Size: 30 KiB |
Binary file not shown.
Before Width: | Height: | Size: 29 KiB |
@ -3,7 +3,7 @@ library(dplyr)
|
||||
library(lubridate)
|
||||
library(tidyr)
|
||||
|
||||
ve_commit_fp <- "/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/visualeditor_commits.csv"
|
||||
ve_commit_fp <- "/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/mediawiki_core_commits.csv"
|
||||
|
||||
transform_commit_data <- function(filepath){
|
||||
#basic, loading in the file
|
||||
@ -131,8 +131,7 @@ transform_commit_data <- function(filepath){
|
||||
|
||||
test <- read.csv(ve_commit_fp, header = TRUE)
|
||||
transformed <- transform_commit_data(ve_commit_fp)
|
||||
output_filepath <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/announcement_0215_ve_weekly_commit_count_data.csv"
|
||||
project_id <- "test"
|
||||
output_filepath <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/announcement_0215_core_weekly_commit_count_data.csv"
|
||||
|
||||
write.csv(transformed, output_filepath, row.names = FALSE)
|
||||
|
||||
|
@ -4,18 +4,24 @@ input_df <- read.csv(count_data_fp, header = TRUE)
|
||||
|
||||
input_df$nonbot_commit_count <- input_df$commit_count - input_df$bot_commit_count
|
||||
|
||||
window_num <- 19
|
||||
input_df <- input_df |>
|
||||
filter(relative_week >= (- window_num) & relative_week <= (window_num))
|
||||
|
||||
library(scales)
|
||||
library(ggplot2)
|
||||
|
||||
time_plot <- input_df |>
|
||||
ggplot(aes(x=relative_week, y=jenkins_commit_count)) +
|
||||
labs(x="Weekly Offset", y="Gerrit/Jenkins Commit Count") +
|
||||
ggplot(aes(x=relative_week, y=wikimedia_commit_count)) +
|
||||
labs(x="Weekly Offset", y="Wikimedia Commit Count") +
|
||||
geom_smooth() +
|
||||
geom_vline(xintercept = 0)+
|
||||
theme_bw() +
|
||||
theme(legend.position = "top")
|
||||
time_plot
|
||||
|
||||
library(dplyr)
|
||||
|
||||
share_df <- input_df |>
|
||||
mutate(wikimedia_share = wikimedia_commit_count / nonbot_commit_count) |>
|
||||
mutate(wikia_share = wikia_commit_count / nonbot_commit_count) |>
|
||||
@ -25,7 +31,7 @@ share_df <- input_df |>
|
||||
drop_na()
|
||||
|
||||
share_long <- share_df |>
|
||||
select(relative_week, wikimedia_share, wikia_share, gerrit_share, mw_dev_share, other_share) |>
|
||||
dplyr::select(relative_week, wikimedia_share, wikia_share, gerrit_share, mw_dev_share, other_share) |>
|
||||
pivot_longer(cols = c(wikimedia_share, wikia_share, gerrit_share, mw_dev_share, other_share), names_to = "category", values_to = "share")
|
||||
|
||||
share_plot <- share_long |>
|
||||
@ -33,7 +39,7 @@ share_plot <- share_long |>
|
||||
geom_smooth() +
|
||||
geom_vline(xintercept = 0)+
|
||||
labs(x = "Relative Week", y = "Share of Nonbot Commit Count", color = "Affiliation") +
|
||||
ggtitle("Weekly Share of Nonbot Commit Count by Category") +
|
||||
ggtitle("Weekly Share of Nonbot Commit Count by Affiliation") +
|
||||
theme_bw() +
|
||||
theme(legend.position = "top")
|
||||
share_plot
|
||||
|
@ -1,5 +1,5 @@
|
||||
library(tidyverse)
|
||||
count_data_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/event_0215_ve_weekly_commit_count_data.csv"
|
||||
count_data_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/event_0215_core_weekly_commit_count_data.csv"
|
||||
input_df <- read.csv(count_data_fp, header = TRUE)
|
||||
|
||||
library(rdd)
|
||||
@ -18,23 +18,29 @@ get_optimal_bandwidth <- function(df){
|
||||
|
||||
optimal_bandwidth <- get_optimal_bandwidth(input_df)
|
||||
|
||||
window_num <- 19
|
||||
window_num <- 13
|
||||
input_df <- input_df |>
|
||||
filter(relative_week >= (- window_num) & relative_week <= (window_num)) |>
|
||||
mutate(other_commit_count = commit_count - bot_commit_count - mediawiki_dev_commit_count - wikia_commit_count - wikimedia_commit_count - jenkins_commit_count)
|
||||
|
||||
library(MASS)
|
||||
|
||||
simple_model <- glm.nb(commit_count~before_after*relative_week, data=input_df)
|
||||
summary(simple_model)
|
||||
|
||||
library(lme4)
|
||||
library(dplyr)
|
||||
|
||||
#get into mlm format
|
||||
long_df <- input_df |>
|
||||
pivot_longer(cols = c(other_commit_count, wikimedia_commit_count, jenkins_commit_count, wikia_commit_count, mediawiki_dev_commit_count),
|
||||
names_to = "commit_type",
|
||||
values_to = "lengthened_commit_count")
|
||||
|
||||
long_df <- long_df |>
|
||||
mutate(commit_share = lengthened_commit_count / (commit_count - bot_commit_count)) |>
|
||||
mutate(log_commits = log1p(lengthened_commit_count))
|
||||
|
||||
mlm <- glmer.nb(lengthened_commit_count ~ before_after*relative_week + (before_after*relative_week|commit_type),
|
||||
control=glmerControl(optimizer="bobyqa",
|
||||
optCtrl=list(maxfun=2e5)), nAGQ=0,
|
||||
@ -42,4 +48,4 @@ mlm <- glmer.nb(lengthened_commit_count ~ before_after*relative_week + (before_a
|
||||
summary(mlm)
|
||||
ranefs <- ranef(mlm)
|
||||
print(ranefs)
|
||||
saveRDS(mlm, "021525_ve_event_mlm.rda")
|
||||
saveRDS(mlm, "021525_core-ve_event_mlm.rda")
|
||||
|
18
mgaughan-rstudio-server_24263466.out
Normal file
18
mgaughan-rstudio-server_24263466.out
Normal file
@ -0,0 +1,18 @@
|
||||
1. SSH tunnel from your workstation using the following command:
|
||||
|
||||
ssh -N -L 8787:n3439:56403 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: 8aREIl1dg0jceqBTNl9a
|
||||
|
||||
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 24263466
|
||||
slurmstepd: error: *** JOB 24263466 ON n3439 CANCELLED AT 2025-02-15T16:52:54 ***
|
Loading…
Reference in New Issue
Block a user