emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [ANN] Aggregate Table
@ 2014-10-25 15:00 Thierry Banel
  2014-10-25 15:31 ` Igor Sosa Mayor
  0 siblings, 1 reply; 2+ messages in thread
From: Thierry Banel @ 2014-10-25 15:00 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-25 15:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-25 15:00 [ANN] Aggregate Table Thierry Banel
2014-10-25 15:31 ` Igor Sosa Mayor

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).