emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thierry Banel <tbanelwebmin@free.fr>
To: emacs-orgmode@gnu.org
Subject: [ANN] Aggregate Table
Date: Sat, 25 Oct 2014 17:00:39 +0200	[thread overview]
Message-ID: <544BBB17.7060303@free.fr> (raw)

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

             reply	other threads:[~2014-10-25 15:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-25 15:00 Thierry Banel [this message]
2014-10-25 15:31 ` [ANN] Aggregate Table Igor Sosa Mayor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=544BBB17.7060303@free.fr \
    --to=tbanelwebmin@free.fr \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).