From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Banel Subject: [ANN] Aggregate Table Date: Sat, 25 Oct 2014 17:00:39 +0200 Message-ID: <544BBB17.7060303@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xi2pi-0002j2-Jx for emacs-orgmode@gnu.org; Sat, 25 Oct 2014 11:00:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xi2pd-0008PS-Qa for emacs-orgmode@gnu.org; Sat, 25 Oct 2014 11:00:46 -0400 Received: from smtp2-g21.free.fr ([212.27.42.2]:51872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xi2pd-0008PO-L7 for emacs-orgmode@gnu.org; Sat, 25 Oct 2014 11:00:41 -0400 Received: from [IPv6:2a01:e35:2e21:def0:b129:485d:94f0:8d1e] (unknown [IPv6:2a01:e35:2e21:def0:b129:485d:94f0:8d1e]) by smtp2-g21.free.fr (Postfix) with ESMTP id E19844B023C for ; Sat, 25 Oct 2014 16:58:50 +0200 (CEST) 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: emacs-orgmode@gnu.org Hi all I'm happy to announce the availability of the aggregation package. https://github.com/tbanel/orgaggregate Example: This is a source table: #+TBLNAME: source | Day | Quantity | |-----------+----------| | Monday | 10 | | Monday | 3 | | Tuesday | 52 | | Tuesday | 15 | | Tuesday | 18 | | Wednesday | 100 | | Wednesday | 23 | | Wednesday | 16 | This is an aggregated result computed by the package: #+BEGIN: aggregate :table source :cols "Day sum(Quantity)" | Day | sum(Quantity) | |-----------+---------------| | Monday | 13 | | Tuesday | 85 | | Wednesday | 139 | #+END: For those familiar with SQL, this is reminicent of the GROUP BY statement. For those familiar with the R statistics, this is reminicent of FACTORS. Features include: - Pure Emacs (no external dependency) - Wide variety of aggregation functions (sum, mean, max, count, median, etc.) - Calc underlying engine (the same used by Org spreadsheet) - Work in push or pull mode (pull mode uses so called dynamic blocks) - Any combination of key columns - and more To use it: - load in Emacs https://github.com/tbanel/orgaggregate/blob/master/org-aggregate.el This give access to the command: M-x org-insert-dblock:aggregate - look at the examples and documentation here: https://github.com/tbanel/orgaggregate - optionally load https://github.com/tbanel/orgaggregate/blob/master/org-insert-dblock.el This gives the following key-binding: C-c C-x i which insert any kind of dynamic blocks, including "aggregate" Feedback welcome. Have fun Thierry