diff options
author | Mike Holmes <mike.holmes@linaro.org> | 2017-06-13 16:54:04 -0400 |
---|---|---|
committer | Mike Holmes <mike.holmes@linaro.org> | 2017-06-13 16:54:04 -0400 |
commit | 3765d1ec62b722d8d1f209b3de4ec78c68426c2b (patch) | |
tree | 938d4cfbbc74029520df1105830c6eb13466de05 | |
parent | 5881082a060a0e0ff804d822b68ce65e7c2e8b43 (diff) |
Clean up output messages
-rw-r--r-- | Signed_off_heatmaps.R | 46 |
1 files changed, 29 insertions, 17 deletions
diff --git a/Signed_off_heatmaps.R b/Signed_off_heatmaps.R index fa670fe..c8c635d 100644 --- a/Signed_off_heatmaps.R +++ b/Signed_off_heatmaps.R @@ -9,7 +9,6 @@ library(plyr) #functions - get_tags <- function (id) { #http://patches.linaro.org/api/1.0/teams/39/commit-tags/ @@ -54,8 +53,6 @@ get_project <- function (url_project) { return (name) } - - get_signed <- function (df){ return (length(grep("Signed-off", df$contribution$tag))) } @@ -106,6 +103,9 @@ if (id[2] == '') { stop() } + +home <- getwd() +print(paste("Outputdir = ", home)) user_password <- paste(id[1], id[2], sep=":") @@ -138,9 +138,6 @@ df$contributions <- n #remove inactive df <- df[df$active == TRUE,] -#table(n[[]]$project) -#I am here getting bits out - #print (df) list.contributions <- do.call("rbind",df$contributions) @@ -148,6 +145,7 @@ unique.tags <- (unique(list.contributions$tag)) unique.persons <- (unique(list.contributions$person)) unique.projects <- (unique(row.names(df))) +#update the per team statistics df$team <- apply(df,1, get_team) df$signed <- apply(df,1, get_signed) df$acked <- apply(df,1, get_acked) @@ -166,13 +164,13 @@ 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_maintainer.png", sep = "_"), title = paste(Sys.Date(),"team vs maintainer",sep = " ")) +png(file=paste(Sys.Date(),"Linaro_team_maintainer_roll.png", sep = "_"), title = paste(Sys.Date(),"team vs maintainer",sep = " ")) op <- par(mar=c(15,4,4,2)) inverse.m <- t(m) barplot(inverse.m, las=2, - main="Maintainer contributions", + main="Non author contributions", ylab = "patches / contributors per team", col =colours, legend.text=TRUE, @@ -183,7 +181,7 @@ dev.off() #cut out what we want to plot m <- as.matrix(df[,c("tested", "reported")]) -png(file=paste(Sys.Date(),"Linaro_team_tested.png", sep = "_"), title = paste(Sys.Date(),"team vs. git stats",sep = " ")) +png(file=paste(Sys.Date(),"Linaro_team_support_roll.png", sep = "_"), title = paste(Sys.Date(),"team vs. git stats",sep = " ")) op <- par(mar=c(15,4,4,2)) inverse.m <- t(m) @@ -208,9 +206,13 @@ for (title in unique.tags) { +#Stats by team +setwd(home) +dir.create("teams") +setwd("teams") for (team in row.names(df)) { - png(file=paste(Sys.Date(),team,"raw_contributions.png", sep = "_"), title = paste(Sys.Date(),"team member raw contributions",sep = " ")) + png(file=paste(Sys.Date(),team,"contributions.png", sep = "_"), title = paste(Sys.Date(),"team member contributions",sep = " ")) op <- par(mfrow=c(1, 1), mar =c(15,4,4,10)) contributions <- data.frame (df[team, ]$contribution) @@ -234,11 +236,12 @@ for (team in row.names(df)) { } barplot( - main = paste("Maintainers", team, sep = " "), + main = paste("Non author contributions", team, sep = " "), t(all_people), las = 2, bty='L', col = colours, + ylab = "patches", legend.text = TRUE, args.legend = list( x='right', @@ -250,7 +253,8 @@ for (team in row.names(df)) { dev.off() } -png(file=paste(Sys.Date(),"Linaro_all_maintainers_barplot.png", sep = "_"), + +png(file=paste(Sys.Date(),"Linaro_all_non_author_contributions_barplot.png", sep = "_"), title = paste(Sys.Date(),"team member contributions heatmap",sep = " ",width=2000) ) @@ -272,6 +276,9 @@ for (team in row.names(df)) { } } +#sort by +all_people[order(all_people[,1]),] + barplot( main = "Maintainers", t(all_people), @@ -290,7 +297,7 @@ barplot( dev.off() -png(file=paste(Sys.Date(),"Linaro_all_maintainers_heatmap.png", sep = "_"), +png(file=paste(Sys.Date(),"Linaro_all_non_author_heatmap.png", sep = "_"), title = paste(Sys.Date(),"team member contributions heatmap",sep = " "),width=1000) op <- par(mfrow=c(1, 1), mar =c(10,4,4,10)) @@ -319,13 +326,18 @@ color.palette <- dev.off() #Stats by person +setwd(home) +dir.create("people") +setwd("people") for (r in 1:nrow(all_people)) { - - png(file=paste(Sys.Date(),"Linaro", unique.persons[r],".png", sep = "_"), + + png(file=paste(Sys.Date(), unique.persons[r],".png", sep = "_"), title = paste(Sys.Date(),"team vs maintainer",sep = " ")) - barplot(main= unique.persons[r], - all_people[r,]) + barplot(main= unique.persons[r], + ylab = "patches", + all_people[r,] + ) dev.off() } |