Liking cljdoc? Tell your friends :D

tablecloth.api.aggregate


aggregateclj

(aggregate ds aggregator)
(aggregate ds
           aggregator
           {:keys [default-column-name-prefix ungroup? parallel?]
            :or {default-column-name-prefix "summary" ungroup? true}
            :as options})

Aggregate dataset by providing:

  • aggregation function
  • map with column names and functions
  • sequence of aggregation functions

Aggregation functions can return:

  • single value
  • seq of values
  • map of values with column names
Aggregate dataset by providing:

- aggregation function
- map with column names and functions
- sequence of aggregation functions

Aggregation functions can return:
- single value
- seq of values
- map of values with column names
sourceraw docstring

aggregate-columnsclj

(aggregate-columns ds columns-aggregators)
(aggregate-columns ds columns-selector column-aggregators)
(aggregate-columns ds columns-selector column-aggregators options)

Aggregates each column separately

Aggregates each column separately
sourceraw docstring

crosstabclj

(crosstab ds row-selector col-selector)
(crosstab ds row-selector col-selector options)

Cross tabulation of two sets of columns.

Creates grouped dataset by [row-selector, col-selector] pairs and calls aggregation on each group.

Options:

  • pivot? - create pivot table or just flat structure (default: true)
  • replace-missing? - replace missing values? (default: true)
  • missing-value - a missing value (default: 0)
  • aggregator - aggregating function (default: row-count)
  • marginal-rows, marginal-cols - adds row and/or cols, it's a sum if true. Can be a custom fn.
Cross tabulation of two sets of columns.

Creates grouped dataset by [row-selector, col-selector] pairs and calls aggregation on each group.

Options:

* pivot? - create pivot table or just flat structure (default: true)
* replace-missing? - replace missing values? (default: true)
* missing-value - a missing value (default: 0)
* aggregator - aggregating function (default: row-count)
* marginal-rows, marginal-cols - adds row and/or cols, it's a sum if true. Can be a custom fn.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close