Skip to content

Commit 02d205e

Browse files
committed
Group by: documentation
1 parent e790758 commit 02d205e

File tree

4 files changed

+49
-0
lines changed

4 files changed

+49
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Group by
2+
========
3+
4+
Groups data by selected variables and aggregate columns with selected aggregations.
5+
6+
**Inputs**
7+
8+
- Data: input data table
9+
10+
**Outputs**
11+
12+
- Data: aggregated data
13+
14+
Group By widget first identifies groups based on selected variables in the **Group by** list. Groups are defined by all distinct combinations of values in selected variables.
15+
16+
In the second step, the widget computes aggregations defined in the table on the right side of the widget for each group.
17+
18+
19+
![](images/Group-by-stamped.png)
20+
21+
1. Select variables that define groups
22+
2. View variables and their aggregations. To change aggregation for one or more variables, select them in the table.
23+
3. Change aggregations for variables selected in the view above.
24+
4. When the *Send automatically* box is ticked, all changes will be automatically communicated to other widgets.
25+
5. Get documentation, observe a number of items on input or output
26+
27+
Examples
28+
--------
29+
30+
We first load **heart_disease** dataset in the **File** widget. In the **Group By** widget, we set variables that define groups -- **diameter narrowing** and **gender**. Each group includes items (rows) that belong to one combination of both variables.
31+
32+
In the table on the right-hand side of the widget, we set that we want to compute **mean** and **median** for values of **rest SBP** variable in each group, **median** for values of **cholesterol** variable, and **mean** for **major vessels colored**.
33+
34+
In the **Data Table** widget, we can see that both females and males have lower average values for **rest SBP** when **diameter narrowing** is 0. The difference is greater for females. The median of **rest SBP** is different only for females, while for males is the same.
35+
36+
You can also observe differences between median **cholesterol** level and mean value of **major vessel colored** between groups.
37+
38+
39+
![](images/Group-by-Example.png)
83.6 KB
Loading
35 KB
Loading

doc/widgets.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,16 @@
311311
"background": "#FFD39F",
312312
"keywords": []
313313
},
314+
{
315+
"text": "Group by",
316+
"doc": null,
317+
"icon": "../Orange/widgets/data/icons/GroupBy.svg",
318+
"background": "#FFD39F",
319+
"keywords": [
320+
"aggregate",
321+
"group by"
322+
]
323+
},
314324
{
315325
"text": "Melt",
316326
"doc": "visual-programming/source/widgets/data/melt.md",

0 commit comments

Comments
 (0)