From 850d85bf12337061f6e946406b4d45cafa02a972 Mon Sep 17 00:00:00 2001 From: Mike Holmes Date: Wed, 7 Jun 2017 19:22:27 -0400 Subject: convert to png Signed-off-by: Mike Holmes --- Signed_off_heatmaps.R | 47 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/Signed_off_heatmaps.R b/Signed_off_heatmaps.R index aea2e69..9e306d0 100644 --- a/Signed_off_heatmaps.R +++ b/Signed_off_heatmaps.R @@ -75,6 +75,9 @@ get_projects <- function (df){ return (df$contributions) } +#for the plots +colours <- c("lightblue", "mistyrose", "lightcyan","lavender", "cornsilk") + #from the website get the initiatives list for the four teams id <- Sys.getenv(c("JIRA_USERNAME", "JIRA_PASSWORD")) @@ -146,9 +149,9 @@ df$reported<- df$reported/ df$team_size #cut out what we want to plot m <- as.matrix(df[,c("signed","acked","reviewed")]) -png(file=paste(Sys.Date(),"Linaro_team_vs_git_signoff.png", sep = "_"), title = paste(Sys.Date(),"team vs maintainer",sep = " ")) +png(file=paste(Sys.Date(),"Linaro_team_maintainer.png", sep = "_"), title = paste(Sys.Date(),"team vs maintainer",sep = " ")) op <- par(mar=c(15,4,4,2)) -colours <- c("lightblue", "mistyrose", "lightcyan","lavender", "cornsilk") + inverse.m <- t(m) barplot(inverse.m, las=2, @@ -163,9 +166,8 @@ dev.off() #cut out what we want to plot m <- as.matrix(df[,c("tested", "reported")]) -png(file=paste(Sys.Date(),"Linaro_team_vs_git_tested.png", sep = "_"), title = paste(Sys.Date(),"team vs. git stats",sep = " ")) +png(file=paste(Sys.Date(),"Linaro_team_tested.png", sep = "_"), title = paste(Sys.Date(),"team vs. git stats",sep = " ")) op <- par(mar=c(15,4,4,2)) -colours <- c("lightblue", "mistyrose", "lightcyan","lavender", "cornsilk") inverse.m <- t(m) barplot(inverse.m, las=2, @@ -177,20 +179,39 @@ barplot(inverse.m, las=2, ) dev.off() -pdf(file=paste(Sys.Date(),"Linaro_team_vs_git.pdf", sep = "_"), title = paste(Sys.Date(),"team vs. git stats",sep = " ")) +title <- "signed_off" +png(file=paste(Sys.Date(),"Linaro_team_",title,"_git.png", sep = "_"), title = paste(Sys.Date(),"team vs. ",title,"git stats",sep = " ")) op <- par(mar=c(15,4,4,2)) -colours <- c("lightblue", "mistyrose", "lightcyan","lavender", "cornsilk") -barplot(df$signed, main="signed off", las=2, ylab = "number of patches", +barplot(df$signed, main=title, las=2, ylab = "number of patches / contributors per team", names.arg = row.names(df), col = colours[1]) -barplot(df$acked, las=2, main="acked", ylab = "number of patches", +dev.off() + +title <- "acked" +png(file=paste(Sys.Date(),"Linaro_team_",title,"_git.png", sep = "_"), title = paste(Sys.Date(),"team vs. ",title,"git stats",sep = " ")) +op <- par(mar=c(15,4,4,2)) +barplot(df$acked, las=2, main=title, ylab = "number of patches / contributors per team", names.arg = row.names(df), col = colours[2]) -barplot(df$reviewed, las=2, main="reviewed", ylab = "number of patches", +dev.off() + +title <- "acked" +png(file=paste(Sys.Date(),"Linaro_team_",title,"_git.png", sep = "_"), title = paste(Sys.Date(),"team vs. ",title,"git stats",sep = " ")) +op <- par(mar=c(15,4,4,2)) +barplot(df$reviewed, las=2, main="reviewed", ylab = "number of patches / contributors per team", names.arg = row.names(df), col = colours[3]) -barplot(df$tested, las=2, main="tested", ylab = "number of patches", +dev.off() + +title <- "tested" +png(file=paste(Sys.Date(),"Linaro_team_",title,"_git.png", sep = "_"), title = paste(Sys.Date(),"team vs. ",title,"git stats",sep = " ")) +op <- par(mar=c(15,4,4,2)) +barplot(df$tested, las=2, main=title, ylab = "number of patches / contributors per team", names.arg = row.names(df), col = colours[4]) -barplot(df$reported, las=2, main="reported", ylab = "number of patches", - names.arg = row.names(df), col = colours[5]) +dev.off() +title <- "reported" +png(file=paste(Sys.Date(),"Linaro_team_",title,"_git.png", sep = "_"), title = paste(Sys.Date(),"team vs. ",title,"git stats",sep = " ")) +op <- par(mar=c(15,4,4,2)) +barplot(df$reported, las=2, main=title, ylab = "number of patches / contributors per team", + names.arg = row.names(df), col = colours[5]) dev.off() pdf(file=paste(Sys.Date(),"Linaro_team_members_contributions.pdf", sep = "_"), title = paste(Sys.Date(),"team member contributions",sep = " ")) @@ -233,8 +254,6 @@ for (team in row.names(df)) { ) ) } - - dev.off() pdf(file=paste(Sys.Date(),"Linaro_team_members_contributions_heatmap.pdf", sep = "_"), -- cgit v1.2.3