[chronojump] updated r graphs on website



commit 8b1680d6cdcc8ba27158287e6b0018f496270d3d
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Jul 26 16:05:41 2011 +0200

    updated r graphs on website

 chronojump_server/r-sqlite/evaluators.R            |   18 +++++++++---------
 chronojump_server/r-sqlite/persons.R               |   16 +++++++++-------
 chronojump_server/r-sqlite/tf_by_extra_weight.R    |    2 +-
 chronojump_server/r-sqlite/tf_by_jumps_boxplot.R   |   10 ++++++----
 chronojump_server/r-sqlite/update-r-graphs         |    3 +++
 .../chronopic-firmware.asm                         |    2 ++
 6 files changed, 30 insertions(+), 21 deletions(-)
---
diff --git a/chronojump_server/r-sqlite/evaluators.R b/chronojump_server/r-sqlite/evaluators.R
index 468cb5b..984d26a 100644
--- a/chronojump_server/r-sqlite/evaluators.R
+++ b/chronojump_server/r-sqlite/evaluators.R
@@ -12,18 +12,18 @@ jumpsRj <- dbGetQuery(con, "SELECT COUNT(jumpRj.uniqueID) AS conta, SEvaluator.n
 persons <- dbGetQuery(con, "SELECT COUNT(DISTINCT(person77.uniqueID)) AS conta, SEvaluator.name AS names FROM person77, SEvaluator, session, personSession77 WHERE person77.uniqueID=personSession77.personID AND session.uniqueID=personSession77.sessionID AND session.evaluatorID=Sevaluator.uniqueID GROUP BY SEvaluator.name ORDER BY SEvaluator.name;")
 
 def.par <- par(no.readonly = TRUE) # save default, for resetting...
-par(new=FALSE, oma=c(1,1,5,1))
-#nf <- layout(matrix(c(1,1,2,3), 2, 2, byrow=TRUE), respect=TRUE)
-par(mfcol=c(3,1))
+par(new=FALSE, oma=c(1,1,4,1))
+nf <- layout(matrix(c(1,2,3), 3, 1, byrow=TRUE), heights=c(11,10,7), respect=FALSE)
+#par(mfcol=c(3,1))
 
-persons$names<-factor(persons$names)
-jumps$names<-factor(jumps$names)
-jumpsRj$names<-factor(jumpsRj$names)
+personsOrdered = persons[order(persons$conta),]
+jumpsOrdered = jumps[order(jumps$conta),]
+jumpsRjOrdered = jumpsRj[order(jumpsRj$conta),]
 
 cex=.7
-dotchart(persons$conta[order (persons$conta)], labels=levels(persons$names)[order (persons$conta)], main="Persons", cex=cex)
-dotchart(jumps$conta[order (jumps$conta)], labels=levels(jumps$names)[order (jumps$conta)], main="Jumps (simple)", cex=cex)
-dotchart(jumpsRj$conta[order (jumpsRj$conta)], labels=levels(jumpsRj$names)[order (jumpsRj$conta)], main="Jumps (reactive)", cex=cex)
+dotchart(personsOrdered$conta, labels=personsOrdered$names, main=paste("Persons"," [",sum(persons$conta),"]"), cex=cex)
+dotchart(jumpsOrdered$conta, labels=jumpsOrdered$names, main=paste("Jumps (simple)"," [",sum(jumps$conta),"]"), cex=cex)
+dotchart(jumpsRjOrdered$conta, labels=jumpsRjOrdered$names, main=paste("Jumps (reactive)"," [",sum(jumpsRj$conta),"]"), cex=cex)
 
 
 par(def.par)#- reset to default
diff --git a/chronojump_server/r-sqlite/persons.R b/chronojump_server/r-sqlite/persons.R
index 54bd96c..ceac4ab 100644
--- a/chronojump_server/r-sqlite/persons.R
+++ b/chronojump_server/r-sqlite/persons.R
@@ -20,24 +20,26 @@ persons$countryF<-factor(persons$country)
 persons$sexF<-factor(persons$sex)
 persons$levelF<-factor(persons$level)
 
-par(new=FALSE, oma=c(1,1,5,1))
+par(new=FALSE, oma=c(1,1,5,0))
 #par(mfcol=c(2,2))
-nf <- layout(matrix(c(1,1,2,3,4,5), 3, 2, byrow=FALSE), respect=TRUE)
+nf <- layout(matrix(c(1,1,2,3,4,5), 3, 2, byrow=FALSE), widths=c(2,1), heights=c(10,10,13), respect=FALSE)
 #layout.show(nf)
 
-dotchart(table(persons$sportF)[order (table(persons$sportF))], labels=levels(persons$sportF)[order (table(persons$sportF))], main="Sport")
+dotchart(table(persons$sportF)[order (table(persons$sportF))], labels=strtrim(levels(persons$sportF),15)[order (table(persons$sportF))], main="Sport")
+abline(v=seq(from=0,to=max(table(persons$sportF)),by=10),col = "lightgray", lty=3)
 #dotchart(table(persons$speciallityF), labels=levels(persons$speciallityF), main="athletics speciallities")
 #SPECIALLITIES fer amb un altre select i nomes d'atletisme
 
-dotchart(table(persons$countryF)[order (table(persons$countryF))], labels=levels(persons$countryF)[order (table(persons$countryF))], main="Country")
-
-hist(ages$years, breaks=10, main="Age", xlab="Years (at session day)")
+dotchart(table(persons$countryF)[order (table(persons$countryF))], labels=strtrim(levels(persons$countryF),15)[order (table(persons$countryF))], main="Country")
+abline(v=seq(from=0,to=max(table(persons$countryF)),by=25),col = "lightgray", lty=3)
 
 pie(table(persons$sexF), labels=levels(persons$sexF), main="Gender", 
   col=rainbow(length(levels(persons$sexF))))
 
 levels(persons$levelF)=c("Sedentary", "Regular practice", "Competition", "Elite") #undefined is impossible on server
-  pie(table(persons$levelF), main="Level", col=rainbow(length(levels(persons$levelF))))
+  pie(table(persons$levelF), main="Level", col=rainbow(length(levels(persons$levelF))),cex=.8)
+
+hist(ages$years, breaks=10, main="Age", xlab="Years (at session day)")
 
   #par(mfcol=c(1,1))
   par(def.par)#- reset to default
diff --git a/chronojump_server/r-sqlite/tf_by_extra_weight.R b/chronojump_server/r-sqlite/tf_by_extra_weight.R
index ffa3637..ed59ba0 100644
--- a/chronojump_server/r-sqlite/tf_by_extra_weight.R
+++ b/chronojump_server/r-sqlite/tf_by_extra_weight.R
@@ -52,7 +52,7 @@ par(def.par)#- reset to default
 
 par(new=TRUE)
 plot(-1,type="n",axes=F,xlab='',ylab='')
-title(main="Correlations between extra weight in % and Flight time",
+title(main="Correlations between extra weight in % and flight time",
   sub=paste(Sys.Date(),"(YYYY-MM-DD)"), cex.sub = 0.75, font.sub = 3, col.sub = "red")
 
 dev.off()
diff --git a/chronojump_server/r-sqlite/tf_by_jumps_boxplot.R b/chronojump_server/r-sqlite/tf_by_jumps_boxplot.R
index aa67cd4..b9ba580 100644
--- a/chronojump_server/r-sqlite/tf_by_jumps_boxplot.R
+++ b/chronojump_server/r-sqlite/tf_by_jumps_boxplot.R
@@ -13,13 +13,15 @@ jumpsF <- subset(jumps, jumps$sex=="F")
 par(mfrow=c(2,1))
 
 ntypes <- length(levels(as.factor (jumpsM$type)))
-bp=boxplot(jumpsM$tv ~ jumpsM$type, las=2, col=terrain.colors(ntypes))
-text(1:ntypes, .4, paste("n=",format(bp$n),sep=""), xpd = TRUE, col = "grey20", cex=0.8)
+bp=boxplot(jumpsM$tv ~ jumpsM$type, las=2, col=terrain.colors(ntypes),cex.axis=.7)
+mtext("n=", at=0, col = "grey20", cex=0.8)
+mtext(format(bp$n), at=1:ntypes, xpd = TRUE, col = "grey20", cex=0.8)
 title(main="Flight times by jumps in males")
 
 ntypes <- length(levels(as.factor (jumpsF$type)))
-bp=boxplot(jumpsF$tv ~ jumpsF$type, las=2, col=topo.colors(ntypes))
-text(1:ntypes, .4, paste("n=",format(bp$n),sep=""), xpd = TRUE, col = "grey20", cex=0.8)
+bp=boxplot(jumpsF$tv ~ jumpsF$type, las=2, col=topo.colors(ntypes), cex.axis=.7)
+mtext("n=", at=0, col = "grey20", cex=0.8)
+mtext(format(bp$n), at=1:ntypes, xpd = TRUE, col = "grey20", cex=0.8)
 title(main="Flight times by jumps in females",
   sub=paste(Sys.Date(),"(YYYY-MM-DD)"), cex.sub = 0.75, font.sub = 3, col.sub = "red")
 
diff --git a/chronojump_server/r-sqlite/update-r-graphs b/chronojump_server/r-sqlite/update-r-graphs
index d3199cf..0c7d9e8 100755
--- a/chronojump_server/r-sqlite/update-r-graphs
+++ b/chronojump_server/r-sqlite/update-r-graphs
@@ -8,6 +8,8 @@ sleep 5
 sleep 5
   R CMD BATCH tf_by_extra_weight.R
 sleep 5
+  R CMD BATCH tf_by_age.R
+sleep 5
   R CMD BATCH ieiub.R
 sleep 5
   R CMD BATCH tf_by_level_sex_jumptype.R
@@ -18,6 +20,7 @@ convert -resize 225x225 evaluators.png small/evaluators.png
 convert -resize 225x225 persons.png small/persons.png
 convert -resize 225x225 tf_by_jumps_boxplot.png small/tf_by_jumps_boxplot.png
 convert -resize 225x225 tf_by_extra_weight.png small/tf_by_extra_weight.png
+convert -resize 225x225 tf_by_age.png small/tf_by_age.png
 convert -resize 225x225 ieiub.png small/ieiub.png
 convert -resize 225x225 tf_by_level_sex_jumptype.png small/tf_by_level_sex_jumptype.png
 
diff --git a/chronopic-firmware/chronopic-firmware-assembler/chronopic-firmware.asm b/chronopic-firmware/chronopic-firmware-assembler/chronopic-firmware.asm
index 7950286..a6c5b4b 100755
--- a/chronopic-firmware/chronopic-firmware-assembler/chronopic-firmware.asm
+++ b/chronopic-firmware/chronopic-firmware-assembler/chronopic-firmware.asm
@@ -37,6 +37,8 @@ TICK    EQU 0xD9
 ;-- This value can be changed, in order to select the most suitable
 ;-- Signals with a duration lower than this value are considered spurious
 
+;-- 0ms
+;-- DEBOUNCE_TIME   EQU 0x00
 ;-- 10ms
 ;-- DEBOUNCE_TIME   EQU 0x01
 ;-- 50ms



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]