ClassifyNonzeroEqualInterval
Classify functions ClassifyNonzeroEqualInterval
syntax
- ClassifyNonzeroEqualInterval(a, domain_unit)
- ClassifyNonzeroEqualInterval(values, count, Domain unit)
| Since GeoDMS 20.20.0 the second form classifies a value-count table that was calculated before, with values and count the two [[subitem | sub items]] of a weeded_counts result. Use it when more than one result is derived from the same scan of a, since the calculation cache then calculates that scan once; the GeoDMS GUI uses this form of ClassifyNonzeroJenksFisher for the classification it generates for a map layer without a configured Classification. Below 4096 distinct values it gives the same class breaks as the two argument form; above it they can differ, because weeded_counts merges values that the two argument form counts separately. |
definition
ClassifyNonzeroEqualInterval(a, domain unit) results in a Data item with class breaks, as ClassifyEqualInterval does, but it classifies the negative and the positive values of a separately. The resulting Values unit is the values unit of data item a, the resulting Domain unit is the domain unit Argument.
The value 0 is treated as a special value: it is a compulsory class break, with a class of its own when there is room for one.
- The negative values and the positive values each get classes of equal width, from their own minimum to their own maximum.
- The numbers of classes for the negative and the positive values, within the total number of classes, are chosen so that the widest class is as narrow as possible. On a tie, the positive values get the extra class (since 20.23.1).
- With 3 or more classes, 0 has a class of its own. When a has negative and positive values but no value 0, that class holds no values, so that a diverging color palette is centred on 0 (since 20.23.1).
- With 2 classes and both negative and positive values, the negative values form the first class and the positive values the second, together with 0 if a contains it: the class breaks are the minimum and 0, or the minimum and the smallest positive value when a has no 0.
- With 2 classes, the value 0 and values of one sign only, 0 has a class of its own (since 20.23.1).
- With 1 class, or with only positive values, the class breaks are those of ClassifyEqualInterval; with only negative values too (since 20.23.1).
example
attribute<nrPersons> classifyNzEiNrInh (inh_4K) := ClassifyNonzeroEqualInterval(NrInh, inh_4K);
| classifyNzEiNrInh |
|---|
| 0 |
| 2 |
| 343 |
| 684 |
Table inh_4K, nr of rows = 4
The value 0 has a class of its own, and the positive values, 2 to 1025, are divided into 3 classes of width 341.
| NrInh |
|---|
| 550 |
| 1025 |
| 300 |
| 200 |
| 0 |
| null |
| 300 |
| 2 |
| 20 |
| 55 |
| 860 |
| 1025 |
| 1025 |
| 100 |
| 750 |
Table District, nr of rows = 15