-
Notifications
You must be signed in to change notification settings - Fork 1
Modus
mtbeek32 edited this page Jan 31, 2024
·
11 revisions
Aggregation functions modus
- modus(a)
- modus(a, relation)
- modus(a) results in a parameter with the most occurring non null value of attribute a.
- modus(a, relation) results in an attribute with the most occurring non null value of attribute a, grouped by relation. The domain unit of the resulting attribute is the values unit of the relation.
An attribute might contain multiple most occurring non null values. In these cases, the modus function results in the lowest most occurring non null value, independent from the sequence of the values in the attribute, see also example 2.
- attribute a with uint2, uint4, uint8, uint16, uint32 or bool value type
- relation with value type of the goup CanBeDomainUnit
- The values unit of the resulting data item should match with regard to value type and metric with the values unit of attribute a.
- The domain of argument a and relation must match.
parameter<uint32> modusLifeStyleCode := modus(City/LifeStyleCode); result = 1
attribute<uint32> modusLifeStyleCodeRegion (RegionDomain) := modus(City/LifeStyleCode, City/Region_rel);
City/LifeStyleCode | City/Region_rel |
---|---|
2 | 0 |
0 | 1 |
1 | 2 |
0 | 1 |
1 | 3 |
1 | null |
null | 3 |
domain City, nr of rows = 7
modusLifeStyleCode |
---|
2 |
0 |
1 |
1 |
null |
domain Region, nr of rows = 5
parameter<uint32> modusSeqA := modus(City/SeqA); result = 1
parameter<uint32> modusSeqB := modus(City/SeqB); result = 1
parameter<uint32> modusSeqC := modus(City/SeqC); result = 1
parameter<uint32> modusSeqD := modus(City/SeqD); result = 1
City/LifeStyleCode | City/Region_rel |
---|---|
2 | 0 |
0 | 1 |
1 | 2 |
0 | 1 |
1 | 3 |
1 | null |
null | 3 |
domain City, nr of rows = 7
modusLifeStyleCode |
---|
2 |
0 |
1 |
1 |
null |
domain Region, nr of rows = 5
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.