[chronojump] Updated evaluators server graph
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Updated evaluators server graph
- Date: Tue, 26 Jul 2011 18:08:17 +0000 (UTC)
commit a1e75a6d673809df809d54f5add6e7825fb9b693
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Jul 26 20:08:00 2011 +0200
Updated evaluators server graph
chronojump_server/r-sqlite/evaluators.R | 47 +++++++++++++++++++++---------
1 files changed, 33 insertions(+), 14 deletions(-)
---
diff --git a/chronojump_server/r-sqlite/evaluators.R b/chronojump_server/r-sqlite/evaluators.R
index e0f5e29..62e6e7b 100644
--- a/chronojump_server/r-sqlite/evaluators.R
+++ b/chronojump_server/r-sqlite/evaluators.R
@@ -11,7 +11,7 @@ jumps <- dbGetQuery(con, "SELECT COUNT(jump.uniqueID) AS conta, SEvaluator.name
jumpsRj <- dbGetQuery(con, "SELECT COUNT(jumpRj.uniqueID) AS conta, SEvaluator.name AS names FROM jumpRj, SEvaluator, session WHERE jumpRj.sessionID=session.uniqueID AND session.evaluatorID=Sevaluator.uniqueID GROUP BY SEvaluator.name ORDER BY conta DESC;")
-runs <- dbGetQuery(con, "SELECT COUNT(run.uniqueID) AS conta, SEvaluator.name AS names FROM run, SEvaluator, session WHERE run.sessionID=session.uniqueID AND session.evaluatorID=Sevaluator.uniqueID GROUP BY SEvaluator.name ORDER BY SEvaluator.name;")
+#runs <- dbGetQuery(con, "SELECT COUNT(run.uniqueID) AS conta, SEvaluator.name AS names FROM run, SEvaluator, session WHERE run.sessionID=session.uniqueID AND session.evaluatorID=Sevaluator.uniqueID GROUP BY SEvaluator.name ORDER BY SEvaluator.name;")
runsInterval <- dbGetQuery(con, "SELECT COUNT(runInterval.uniqueID) AS conta, SEvaluator.name AS names FROM runInterval, SEvaluator, session WHERE runInterval.sessionID=session.uniqueID AND session.evaluatorID=Sevaluator.uniqueID GROUP BY SEvaluator.name ORDER BY SEvaluator.name;")
@@ -19,24 +19,35 @@ reactionTimes <- dbGetQuery(con, "SELECT COUNT(reactiontime.uniqueID) AS conta,
pulses <- dbGetQuery(con, "SELECT COUNT(pulse.uniqueID) AS conta, SEvaluator.name AS names FROM pulse, SEvaluator, session WHERE pulse.sessionID=session.uniqueID AND session.evaluatorID=Sevaluator.uniqueID GROUP BY SEvaluator.name ORDER BY SEvaluator.name;")
-multichronopic <- dbGetQuery(con, "SELECT COUNT(multichronopic.uniqueID) AS conta, SEvaluator.name AS names FROM multichronopic, SEvaluator, session WHERE multichronopic.sessionID=session.uniqueID AND session.evaluatorID=Sevaluator.uniqueID GROUP BY SEvaluator.name ORDER BY SEvaluator.name;")
+#multichronopic <- dbGetQuery(con, "SELECT COUNT(multichronopic.uniqueID) AS conta, SEvaluator.name AS names FROM multichronopic, SEvaluator, session WHERE multichronopic.sessionID=session.uniqueID AND session.evaluatorID=Sevaluator.uniqueID GROUP BY SEvaluator.name ORDER BY SEvaluator.name;")
-par(oma=c(1,6,1,1))
+par(oma=c(1,7,1,1))
+
+#a <- merge(persons, jumps, by="names", all.x=T)
+#colnames(a)=c("names", "persons", "jumps")
+#a <- merge(a, jumpsRj, by="names", all.x=T)
+#colnames(a)=c("names", "persons", "jumps", "jumps_reactive")
+#a <- merge(a, runs, by="names", all.x=T)
+#colnames(a)=c("names", "persons", "jumps", "jumps_reactive", "runs")
+#a <- merge(a, runsInterval, by="names", all.x=T)
+#colnames(a)=c("names", "persons", "jumps", "jumps_reactive", "runs", "runs_intervallic")
+#a <- merge(a, reactionTimes, by="names", all.x=T)
+#colnames(a)=c("names", "persons", "jumps", "jumps_reactive", "runs", "runs_intervallic", "reaction_times")
+#a <- merge(a, pulses, by="names", all.x=T)
+#colnames(a)=c("names", "persons", "jumps", "jumps_reactive", "runs", "runs_intervallic", "reaction_times", "pulses")
+#a <- merge(a, multichronopic, by="names", all.x=T)
+#colnames(a)=c("names", "persons", "jumps", "jumps_reactive", "runs", "runs_intervallic", "reaction_times", "pulses", "multichronopic")
a <- merge(persons, jumps, by="names", all.x=T)
colnames(a)=c("names", "persons", "jumps")
a <- merge(a, jumpsRj, by="names", all.x=T)
colnames(a)=c("names", "persons", "jumps", "jumps_reactive")
-a <- merge(a, runs, by="names", all.x=T)
-colnames(a)=c("names", "persons", "jumps", "jumps_reactive", "runs")
a <- merge(a, runsInterval, by="names", all.x=T)
-colnames(a)=c("names", "persons", "jumps", "jumps_reactive", "runs", "runs_intervallic")
+colnames(a)=c("names", "persons", "jumps", "jumps_reactive", "runs_intervallic")
a <- merge(a, reactionTimes, by="names", all.x=T)
-colnames(a)=c("names", "persons", "jumps", "jumps_reactive", "runs", "runs_intervallic", "reaction_times")
+colnames(a)=c("names", "persons", "jumps", "jumps_reactive", "runs_intervallic", "reaction_times")
a <- merge(a, pulses, by="names", all.x=T)
-colnames(a)=c("names", "persons", "jumps", "jumps_reactive", "runs", "runs_intervallic", "reaction_times", "pulses")
-a <- merge(a, multichronopic, by="names", all.x=T)
-colnames(a)=c("names", "persons", "jumps", "jumps_reactive", "runs", "runs_intervallic", "reaction_times", "pulses", "multichronopic")
+colnames(a)=c("names", "persons", "jumps", "jumps_reactive", "runs_intervallic", "reaction_times", "pulses")
#prepare sort
a <- replace(a,is.na(a),0)
@@ -49,15 +60,23 @@ a <- subset(a,a$names != "Josep M PadullÃs")
a[(a$names == "Jeffrey Pagaduan"),2:9] = a[(a$names == "Jeffrey Pagaduan"),2:9] + a[(a$names == "Jeffrey C. Pagaduan"),2:9]
a <- subset(a,a$names != "Jeffrey C. Pagaduan")
#sort
-a <- a[order(a$persons + a$jumps + a$jumps_reactive + a$runs + a$runs_intervallic + a$reaction_times + a$pulses + a$multichronopic),]
+#a <- a[order(a$persons + a$jumps + a$jumps_reactive + a$runs + a$runs_intervallic + a$reaction_times + a$pulses + a$multichronopic),]
+a <- a[order(a$persons + a$jumps + a$jumps_reactive + a$runs_intervallic + a$reaction_times + a$pulses),]
#prepare graph
-b=cbind(a$persons, a$jumps , a$jumps_reactive, a$runs, a$runs_intervallic, a$reaction_times, a$pulses, a$multichronopic)
-colnames(b)=c("persons", "jumps", "jumps_reactive", "runs", "runs_intervallic", "reaction_times", "pulses", "multichronopic")
+#b=cbind(a$persons, a$jumps , a$jumps_reactive, a$runs, a$runs_intervallic, a$reaction_times, a$pulses, a$multichronopic)
+#colnames(b)=c("persons", "jumps", "jumps_reactive", "runs", "runs_intervallic", "reaction_times", "pulses", "multichronopic")
+b=cbind(a$persons, a$jumps , a$jumps_reactive, a$runs_intervallic, a$reaction_times, a$pulses)
+colnames(b)=c("persons", "jumps", "jumps_reactive", "runs_intervallic", "reaction_times", "pulses")
rownames(b)=a$names
#graph
-barplot(t(b), horiz=T, las=2, col=rainbow(8), legend=colnames(b), args.legend=list(x = "bottomright", bg="White"))
+cex=.8
+#change colors to 8 when add runs and multichronopic
+colors=6
+barplot(t(b), horiz=T, las=2, col=topo.colors(colors), cex.names=cex)
+legend("bottomright", colnames(b), pch=15, col=topo.colors(colors))
+
title(main="Data uploaded by evaluator",
sub=paste(Sys.Date(),"(YYYY-MM-DD)"), cex.sub = 0.75, font.sub = 3, col.sub = "red")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]