1r.stats.quantile(1)         GRASS GIS User's Manual        r.stats.quantile(1)
2
3
4

NAME

6       r.stats.quantile  - Compute category quantiles using two passes.
7

KEYWORDS

9       raster, statistics, zonal statistics, percentile, quantile
10

SYNOPSIS

12       r.stats.quantile
13       r.stats.quantile --help
14       r.stats.quantile   [-rpt]   base=name  cover=name   [quantiles=integer]
15       [percentiles=float[,float,...]]          [bins=integer]           [out‐
16       put=name[,name,...]]    [file=name]    [separator=character]   [--over‐
17       write]  [--help]  [--verbose]  [--quiet]  [--ui]
18
19   Flags:
20       -r
21           Create reclass map with statistics as category labels
22
23       -p
24           Do not create output maps; just print statistics
25
26       -t
27           Print statistics in table format
28
29       --overwrite
30           Allow output files to overwrite existing files
31
32       --help
33           Print usage summary
34
35       --verbose
36           Verbose module output
37
38       --quiet
39           Quiet module output
40
41       --ui
42           Force launching GUI dialog
43
44   Parameters:
45       base=name [required]
46           Name of base raster map
47
48       cover=name [required]
49           Name of cover raster map
50
51       quantiles=integer
52           Number of quantiles
53
54       percentiles=float[,float,...]
55           List of percentiles
56           Default: 50
57
58       bins=integer
59           Number of bins to use
60           Default: 1000
61
62       output=name[,name,...]
63           Resultant raster map(s)
64
65       file=name
66           Name for output file (if omitted or "-" output to stdout)
67
68       separator=character
69           Field separator
70           Special characters: pipe, comma, space, tab, newline
71           Default: :
72

DESCRIPTION

74       r.stats.quantile is a tool  to  analyse  exploratory  statistics  of  a
75       floating-point  "cover  layer"  according to how it intersects with ob‐
76       jects in a "base layer". It provides quantile calculations as  selected
77       "zonal statistics".
78

NOTES

80       r.stats.quantile  is intended to be a partial replacement for r.statis‐
81       tics, with support for floating-point cover maps. It provides  quantile
82       calculations, which are absent from r.stats.zonal.
83
84       Quantiles  are  calculated  following  algorithm 7 from Hyndman and Fan
85       (1996), which is also the default in R and numpy.
86

EXAMPLE

88       In this example, the raster polygon map zipcodes in the North  Carolina
89       sample  dataset  is  used to calculate quantile raster statistics using
90       the elevation raster map:
91       g.region raster=zipcodes -p
92       # print quantiles
93       r.stats.quantile base=zipcodes cover=elevation quantiles=3 -p
94       27511:0:33.333333:134.717392
95       27511:1:66.666667:143.985723
96       27513:0:33.333333:140.669993
97       27513:1:66.666667:146.279449
98       27518:0:33.333333:115.140101
99       27518:1:66.666667:129.893723
100       [...]
101       # write out percentile raster maps
102       r.stats.quantile base=zipcodes cover=elevation percentiles=25,50,75 \
103         output=zipcodes_elev_q25,zipcodes_elev_q50,zipcodes_elev_q75
104

REFERENCES

106           •   Hyndman and Fan (1996) Sample Quantiles  in  Statistical  Pack‐
107               ages,  American Statistician. American Statistical Association.
108               50 (4): 361-365. DOI: 10.2307/2684934
109
110Engineering Statistics Handbook: Percentile, NIST
111

SEE ALSO

113        r.quantile, r.stats.zonal, r.statistics
114

AUTHORS

116       Glynn Clements
117       Markus Metz
118

SOURCE CODE

120       Available at: r.stats.quantile source code (history)
121
122       Accessed: Saturday Jan 21 20:39:03 2023
123
124       Main index | Raster index | Topics index | Keywords index  |  Graphical
125       index | Full index
126
127       © 2003-2023 GRASS Development Team, GRASS GIS 8.2.1 Reference Manual
128
129
130
131GRASS 8.2.1                                                r.stats.quantile(1)
Impressum