From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Ufimtsev Subject: Re: Data format for keeping track of weekly & yearly stats? Date: Fri, 13 Mar 2015 11:19:01 -0400 (EDT) Message-ID: <974054503.21140155.1426259941775.JavaMail.zimbra@redhat.com> References: <213756074.20532191.1426170267094.JavaMail.zimbra@redhat.com> <55028C6A.70302@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWRMj-00028W-Fi for emacs-orgmode@gnu.org; Fri, 13 Mar 2015 11:19:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWRMg-0007PT-9f for emacs-orgmode@gnu.org; Fri, 13 Mar 2015 11:19:09 -0400 Received: from mx4-phx2.redhat.com ([209.132.183.25]:51995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWRMg-0007PG-2U for emacs-orgmode@gnu.org; Fri, 13 Mar 2015 11:19:06 -0400 In-Reply-To: <55028C6A.70302@free.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Thierry Banel Cc: emacs-orgmode@gnu.org This looks like the promised land here. SQL aggregation in org-mode omg X-D= !! Pretty much what I was looking for. Thank you so much for the link. Leo Ufimtsev | Intern Software Engineer @ Eclipse Team ----- Original Message ----- From: "Thierry Banel" To: emacs-orgmode@gnu.org Sent: Friday, March 13, 2015 3:06:18 AM Subject: Re: [O] Data format for keeping track of weekly & yearly stats? Hi Leo You may want to have a look at org-aggregate It provides partial sums, means, and so on, and also correlation between two columns. Source code and documentation here: https://github.com/tbanel/orgaggregate Also available as an Emacs package on Melpa: (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages") t) (package-initialize) M-x package-list-packages install orgtbl-aggregate Thierry=20 Le 12/03/2015 15:24, Leo Ufimtsev a =C3=A9crit : > Hello,=20 > > I'm new to Tables/formulas. > > I started using a table with formulas to keep track of productivity, # of= hours of sleep etc..=20 > > I have something like this: > =09| Day | Dev | Leo | @ 9 | Sleep | > =09|------------------+------+------+------------+-------| > =09| [2015-03-04 Wed] | 3:01 | 3:55 | 1 | 8:00 | > =09| [2015-03-05 Thu] | 4:00 | 0:52 | 0 | 7:39 | > =09| [2015-03-06 Fri] | 4:03 | 0:00 | .5 | 8:00 | > =09| [2015-03-09 Mon] | 5:09 | 0:00 | 0 | 8:15 | > =09| [2015-03-10 Tue] | 3:14 | 1:12 | .5 | 7:25 | > =09| [2015-03-11 Wed] | 4:55 | 0:53 | .5 | 7:30 | > =09| [2015-03-12 Thu] | | | 0 | 7:24 | > =09| [2015-03-13 Fri] | | | | | > =09|------------------+------+------+------------+-------| > =09| March | 3.0 | 3.9 | 0.42857143 | 7.8 | > =09#+TBLFM: @>$4=3Dvmean(@I..@II)::@>$5=3Dvmean(@I..@II);t%.1f::@>$2=3Dvm= ean(@I$2);t%.1f::@>$3=3Dvmean(@I$3);t%.1f > > At the bottom I have averages for each column. (in the future I'd like to= make a correlation analysis between sleep and productivity). > > Now, I would like weekly *and* yearly totals. I can't seem to come up wit= h a solution that wouldn't involve a lot of hard-coding or insertion of for= mulas by hand. > > Any ideas? Do you think org-collector with two collector tables might be = a better solution for this sort of requirement? > > Thank you > > Leo Ufimtsev | Intern Software Engineer @ Eclipse Team > > > >