| 1 |
<h2>DESCRIPTION</h2> |
| 2 |
|
| 3 |
<em>v.class</em> classifies vector attribute data into classes, for |
| 4 |
example for thematic mapping. Classification can be on a column or on an |
| 5 |
expression including several columns, all in the table linked to the |
| 6 |
vector map. The user indicates the number of classes desired and the |
| 7 |
algorithm to use for classification. |
| 8 |
|
| 9 |
Several algorithms are implemented for classification: equal interval, |
| 10 |
standard deviation, quantiles, equal probabilities, and a discontinuities |
| 11 |
algorithm developed by Jean-Pierre Grimmeau at the Free University of |
| 12 |
Brussels (ULB). |
| 13 |
|
| 14 |
It can be used to pipe class breaks into thematic mapping modules such |
| 15 |
as <em>d.vect.thematic</em> (see example below); |
| 16 |
|
| 17 |
<h2>NOTES</h2> |
| 18 |
|
| 19 |
<p>The <em>equal interval</em> algorithm simply divides the range max-min |
| 20 |
by the number of breaks to determine the interval between class breaks. |
| 21 |
|
| 22 |
<p>The <em>quantiles</em> algorithm creates classes which all contain |
| 23 |
approximately the same number of observations. |
| 24 |
|
| 25 |
<p>The <em>standard deviations</em> algorithm creates class breaks which |
| 26 |
are a combination of the mean +/- the standard deviation. It calculates |
| 27 |
a scale factor (<1) by which to multiply the standard deviation in |
| 28 |
order for all of the class breaks to fall into the range min-max of the |
| 29 |
data values. |
| 30 |
|
| 31 |
<p>The <em>equiprobabilites</em> algorithm creates classes that would be |
| 32 |
equiprobable if the distribution was normal. If some of the class breaks |
| 33 |
fall outside the range min-max of the data values, the algorithm prints |
| 34 |
a warning and reduces the number of breaks, but the probabilities used |
| 35 |
are those of the number of breaks asked for. |
| 36 |
|
| 37 |
<p>The <em>discont</em> algorithm systematically searches discontinuities |
| 38 |
in the slope of the cumulative frequencies curve, by approximating this |
| 39 |
curve through straight line segments whose vertices define the class |
| 40 |
breaks. The first approximation is a straight line which links the two |
| 41 |
end nodes of the curve. This line is then replaced by a two-segmented |
| 42 |
polyline whose central node is the point on the curve which is farthest |
| 43 |
from the preceding straight line. The point on the curve furthest from |
| 44 |
this new polyline is then chosen as a new node to create break up one of |
| 45 |
the two preceding segments, and so forth. |
| 46 |
|
| 47 |
<p>The problem of the difference in terms of units between the two axes |
| 48 |
is solved by rescaling both amplitudes to an interval between 0 and 1. |
| 49 |
In the original algorithm, the process is stopped when the difference between |
| 50 |
the slopes of the two new segments is no longer significant (alpha = 0.05). As |
| 51 |
the slope is the ratio between the frequency and the amplitude of the corresponding |
| 52 |
interval, i.e. its density, this effectively tests whether the frequencies |
| 53 |
of the two newly proposed classes are different from those obtained by |
| 54 |
simply distributing the sum of their frequencies amongst them in proportion |
| 55 |
to the class amplitudes. In the GRASS implementation, the algorithm |
| 56 |
continues, but a warning is printed. |
| 57 |
|
| 58 |
<h2>EXAMPLE</h2> |
| 59 |
|
| 60 |
Classify column pop of map communes into 5 classes using quantiles: |
| 61 |
|
| 62 |
<div class="code"><pre> |
| 63 |
v.class map=communes column=pop algo=qua nbclasses=5 |
| 64 |
</pre></div> |
| 65 |
|
| 66 |
This example uses population and area to calculate a population density |
| 67 |
and to determine the density classes: |
| 68 |
|
| 69 |
<div class="code"><pre> |
| 70 |
v.class map=communes column=pop/area algo=std nbclasses=5 |
| 71 |
</pre></div> |
| 72 |
|
| 73 |
|
| 74 |
The following example uses the output of d.class and feeds it directly |
| 75 |
into <em>d.vect.thematic</em>: |
| 76 |
<div class="code"><pre> |
| 77 |
d.vect.thematic -l map=communes2 column=pop/area \ |
| 78 |
breaks=`v.class -g map=communes2 column=pop/area algo=std nbcla=5` \ |
| 79 |
colors=0:0:255,50:100:255,255:100:50,255:0:0,156:0:0 |
| 80 |
</pre></div> |
| 81 |
|
| 82 |
<h2>SEE ALSO</h2> |
| 83 |
|
| 84 |
<em> |
| 85 |
<a href="v.univar.html">v.univar</a>, |
| 86 |
<a href="d.vect.thematic.html">d.vect.thematic</a> |
| 87 |
</em> |
| 88 |
|
| 89 |
<h2>AUTHOR</h2> |
| 90 |
|
| 91 |
Moritz Lennert |