[med-svn] r2355 - trunk/community/talks/200808_debconf8

tille at alioth.debian.org tille at alioth.debian.org
Mon Jul 28 13:47:00 UTC 2008


Author: tille
Date: 2008-07-28 13:46:59 +0000 (Mon, 28 Jul 2008)
New Revision: 2355

Added:
   trunk/community/talks/200808_debconf8/author_stats_med
Modified:
   trunk/community/talks/200808_debconf8/archives.sql
Log:
Add script to obtain stats about the 10 most active authors of Debian Med list


Modified: trunk/community/talks/200808_debconf8/archives.sql
===================================================================
--- trunk/community/talks/200808_debconf8/archives.sql	2008-07-28 13:21:45 UTC (rev 2354)
+++ trunk/community/talks/200808_debconf8/archives.sql	2008-07-28 13:46:59 UTC (rev 2355)
@@ -114,7 +114,7 @@
       SELECT author FROM (SELECT author, count(*) as anz From listarchive where project = '''''' || Project || ''''''
            GROUP BY author ORDER BY anz DESC LIMIT '' || NumAuthors || '') AS zw)
    GROUP BY author ORDER BY num DESC;'',
-               ''author'') ;
+               ''project = '''''' || Project || '''''' AND author'') ;
     return ret ;
   END; ' LANGUAGE 'plpgsql';
 
@@ -238,13 +238,13 @@
 
     BEGIN
 
-    ret := BuildQueryCDDsHelper(
+    ret := BuildQueryCDDsYearHelper(
                ''SELECT author AS feature, COUNT(*) AS num FROM listarchive
                  WHERE project = '''''' || Project || '''''' AND author IN (
       SELECT author FROM (SELECT author, count(*) as anz From listarchive where project = '''''' || Project || ''''''
            GROUP BY author ORDER BY anz DESC LIMIT '' || NumAuthors || '') AS zw)
    GROUP BY author ORDER BY num DESC;'',
-               ''author'') ;
+               ''project = '''''' || Project || '''''' AND author'') ;
     return ret ;
   END; ' LANGUAGE 'plpgsql';
 

Added: trunk/community/talks/200808_debconf8/author_stats_med
===================================================================
--- trunk/community/talks/200808_debconf8/author_stats_med	                        (rev 0)
+++ trunk/community/talks/200808_debconf8/author_stats_med	2008-07-28 13:46:59 UTC (rev 2355)
@@ -0,0 +1,33 @@
+#!/bin/sh
+# This script draws a plot to compare mailing list activities on
+# CDDs and related projects.
+
+NAME=authorstat_med
+DATFILE="${NAME}_year.dat"
+psql -t cddlistarchives -c "SELECT BuildQueryAuthorsYear('med', 10) ;" | \
+   psql cddlistarchives \
+   >"$DATFILE"
+      
+sed -i -e '/^[-+]\+$/d' -e '/^([0-9]\+ [A-Za-z]\+)$/d' -e 's/[[:space:]]*|[[:space:]]*/\t/g' "$DATFILE"
+      
+R --no-save <<EOT
+library(plotrix)
+dmstats <- read.table(file='$DATFILE', sep = '\t', fill=TRUE, header=TRUE )
+# png("dmstats.png", width = 800, height = 600)
+textcolor="yellow"
+pdf("${NAME}.pdf", fg=textcolor)
+par(col.axis=textcolor,col.main=textcolor)
+dmstats.mat <- as.matrix(dmstats)[,2:9]
+rownames(dmstats.mat) <- dmstats[['year']]
+dmstats.mat <- t(dmstats.mat)
+
+# barplot(dmstats.mat,beside=TRUE,col=rainbow(3),legend.text=TRUE)
+barplot(dmstats.mat,beside=TRUE,col=rainbow(8))
+# plot(dmstats.mat,col=rainbow(8))
+legend(x="topleft", colnames(dmstats[,2:9]),fill=rainbow(8), inset=0.05,
+       text.col=textcolor
+      )
+
+EOT
+
+# rm $DATFILE


Property changes on: trunk/community/talks/200808_debconf8/author_stats_med
___________________________________________________________________
Name: svn:executable
   + *




More information about the debian-med-commit mailing list