r.quantile(1grass)
π r.quantile β NAME π
okay so bestie, this is r.quantile β it computes quantiles using two passes. that's the whole job. two passes. iconic behavior honestly π
πΈ KEYWORDS πΈ
raster, algebra, statistics, percentile, quantile
β¨ SYNOPSIS β¨
r.quantile
r.quantile --help
r.quantile [-r] input=name [quantiles=integer]
[percentiles=float[,float,...]] [bins=integer] [file=name]
[--overwrite] [--help] [--verbose] [--quiet] [--ui]
π Flags π
-rβ generate recode rules based on quantile-defined intervals--overwriteβ allow output files to overwrite existing files (yes it will absolutely clobber them, no cap)--helpβ print usage summary--verboseβ verbose module output--quietβ quiet module output--uiβ force launching GUI dialog
π¦ Parameters π¦
input=name[required] β name of input raster map. like, you gotta give it this one, it's not optional bestie π«Άquantiles=integerβ number of quantiles. Default:4percentiles=float[,float,...]β list of percentilesbins=integerβ number of bins to use. Default:1000000file=nameβ name for output file (if omitted or"-"output to stdout)
π DESCRIPTION π
r.quantile computes quantiles in a manner suitable for use with large amounts of data. the way it does this is, it uses two passes. two passes, that's the secret sauce, that's the whole vibe π₯
π NOTES π
quantiles are calculated following algorithm 7 from Hyndman and Fan (1996) β which is also the default in R and numpy. so if you've ever been like "why is this giving R energy", that's why, it literally is the same algorithm β¨
π EXAMPLE π
calculation of elevation quantiles (printed to standard-out), bestie:
g.region raster=elevation -p
r.quantile input=elevation percentiles=0.1,1,10,25,50,75,90,99,99.9
the output of r.quantile can be used for quantile classification:
g.region raster=elevation -p
r.quantile elevation quantiles=5 -r --quiet | r.recode elevation \
out=elev_quant5 rules=-
like... pipe it straight into r.recode and you're done, main character energy honestly π
π REFERENCES π
- Hyndman and Fan (1996) Sample Quantiles in Statistical Packages, American Statistician. American Statistical Association. 50 (4): 361-365. DOI:
10.2307/2684934 - Engineering Statistics Handbook: Percentile, NIST
π SEE ALSO π
r.mode, r.quant, r.recode, r.series, r.stats, r.stats.quantile, r.stats.zonal, r.statistics, r.univar, v.rast.stats
π AUTHORS π
- Glynn Clements
- Markus Metz
π§ SOURCE CODE π§
available at: r.quantile source code (history)
latest change: Friday Feb 07 19:16:09 2025 in commit: a82a39f673b97fafcfce1604dc3e6015cb96487a
main index | raster index | topics index | keywords index | graphical index | full index
okay that's the whole page bestie, you ate it π«Ά this was r.quantile from the GRASS 8.5.0 Reference Manual, Β© 2003-2026 GRASS Development Team β go compute some quantiles, you got this πβ¨π
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms