DataWeave Analytics Library
Common
analytics::summaries::Common
This module defines common functions for all summaries.
Index
Functions
Name | Description |
---|---|
summary | The summary function combines different metrics from the Statistics module. |
Functions
summary ↑↑
summary(values: Array<Number>): Object
The summary
function combines different metrics from the Statistics
module.
Parameters
Name | Type | Description |
---|---|---|
values | Array<Number> | The values to pull statistics from |
Example
This example shows how the summary
behaves with a simple array of values.
Source
%dw 2.0
output application/json
import summary from analytics::summaries::Common
---
summary([0, 1, 44])
Output
{
mean: 15,
modes: [
0,
1,
44
],
median: 1,
stdev: 20.51016008388687995680331206045045,
quartiles: [
0,
1,
44
]
}