aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Holmes <mike.holmes@linaro.org>2017-06-12 13:55:32 -0400
committerMike Holmes <mike.holmes@linaro.org>2017-06-12 13:55:32 -0400
commit5881082a060a0e0ff804d822b68ce65e7c2e8b43 (patch)
tree91087b6a8c39a38cd4b64c29c9d41fafbca9e9a8
parent241eea611c678811c7fece22fb6354d9ec2a7343 (diff)
per engineer output
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
-rw-r--r--Signed_off_heatmaps.R48
1 files changed, 39 insertions, 9 deletions
diff --git a/Signed_off_heatmaps.R b/Signed_off_heatmaps.R
index 838ac0e..fa670fe 100644
--- a/Signed_off_heatmaps.R
+++ b/Signed_off_heatmaps.R
@@ -24,14 +24,14 @@ get_tags <- function (id) {
#keep pulling pages while they exist
repeat {
- cat (url,"\n")
+
webpage <- curl (url, handle = h)
#get data it into R
jira_tags_raw <- fromJSON(webpage, simplifyMatrix = TRUE, simplifyVector =TRUE, simplifyDataFrame = TRUE, flatten = TRUE)
- new_data <- data.frame(tag=jira_tags_raw$tag, person=jira_tags_raw$person)
- all_data <- rbind(all_data, new_data)
+ new_tag_data <- data.frame(tag=jira_tags_raw$tag, person=jira_tags_raw$person)
+ all_data <- rbind(all_data, new_tag_data)
#get following pages if there are any
page <- page + 1
@@ -45,6 +45,17 @@ get_tags <- function (id) {
return(all_data)
}
+get_project <- function (url_project) {
+ webpage <- curl (url_project['project'], handle = h)
+ #get data it into R
+ jira_project <- fromJSON(webpage, simplifyMatrix = TRUE, simplifyVector =TRUE, simplifyDataFrame = TRUE, flatten = TRUE)
+ name <- jira_project$name
+
+ return (name)
+}
+
+
+
get_signed <- function (df){
return (length(grep("Signed-off", df$contribution$tag)))
}
@@ -65,6 +76,11 @@ get_reported <- function (df){
return (length(grep("Reported", df$contribution$tag)))
}
+get_team <- function (df){
+ unique_people <- unique(df$contributions$person)
+ return (unique_people)
+}
+
get_team_size <- function (df){
unique_people <- unique(df$contributions$person)
number_of_people <- length(unique_people)
@@ -132,6 +148,7 @@ unique.tags <- (unique(list.contributions$tag))
unique.persons <- (unique(list.contributions$person))
unique.projects <- (unique(row.names(df)))
+df$team <- apply(df,1, get_team)
df$signed <- apply(df,1, get_signed)
df$acked <- apply(df,1, get_acked)
df$reviewed <- apply(df,1, get_reviewed)
@@ -233,13 +250,10 @@ for (team in row.names(df)) {
dev.off()
}
-
-print("---------1----------")
png(file=paste(Sys.Date(),"Linaro_all_maintainers_barplot.png", sep = "_"),
title = paste(Sys.Date(),"team member contributions heatmap",sep = " ",width=2000)
)
-
all_people <- matrix(nrow=length(unique.persons), ncol=length(unique.tags))
rownames(all_people) <- unique.persons
colnames(all_people) <- unique.tags
@@ -264,6 +278,7 @@ barplot(
las = 2,
bty='L',
col = colours,
+ cex.names=0.5,
legend.text = TRUE,
args.legend = list(
x='right',
@@ -275,8 +290,7 @@ barplot(
dev.off()
-print("---------2----------")
-png(file=paste(Sys.Date(),"Linaro_team_all_maintainers_heatmap.png", sep = "_"),
+png(file=paste(Sys.Date(),"Linaro_all_maintainers_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))
@@ -302,4 +316,20 @@ color.palette <-
sepwidth=c(0.1, 0.1)
)
-dev.off() \ No newline at end of file
+dev.off()
+
+#Stats by person
+for (r in 1:nrow(all_people)) {
+
+ png(file=paste(Sys.Date(),"Linaro", unique.persons[r],".png", sep = "_"),
+ title = paste(Sys.Date(),"team vs maintainer",sep = " "))
+
+ barplot(main= unique.persons[r],
+ all_people[r,])
+
+ dev.off()
+}
+
+#all_patch_data <- sapply(df$id,get_patches)
+#str(all_patch_data)
+