r.stats.quantile(1)
π r.stats.quantile π
okay bestie, welcome to the GRASS GIS User's Manual glow-up of r.stats.quantile(1) β literally the quantile girlie of the raster world, and yes she ate β¨
β¨ NAME β¨
r.stats.quantile β compute category quantiles using two passes. periodt. π
πΈ KEYWORDS πΈ
raster, statistics, zonal statistics, percentile, quantile
π¦ SYNOPSIS π¦
r.stats.quantile
r.stats.quantile --help
r.stats.quantile [-rpt] base=name cover=name [quantiles=integer]
[percentiles=float[,float,...]] [bins=integer]
[output=name[,name,...]] [file=name] [separator=character]
[--overwrite] [--help] [--verbose] [--quiet] [--ui]
π Flags π
-rβ make a reclass map and use the statistics as category labels π-pβ don't make any output maps, just print the statistics. no maps, all vibes.-tβ print the statistics in table format π§--overwriteβ let output files overwrite stuff that already exists (yes, she's allowed to delete your old files, consent given)--helpβ print the usage summary, iykyk--verboseβ verbose module output, she will tell you EVERYTHING--quietβ quiet module output, she will tell you nothing--uiβ force launching the GUI dialog π
π Parameters π
base=name[required] β name of base raster mapcover=name[required] β name of cover raster mapquantiles=integerβ number of quantilespercentiles=float[,float,...]β list of percentiles- Default:
50
- Default:
bins=integerβ number of bins to use- Default:
1000
- Default:
output=name[,name,...]β resultant raster map(s)file=nameβ name for output file (if omitted or-output to stdout)separator=characterβ field separator- Special characters: pipe, comma, space, tab, newline
- Default:
:
π DESCRIPTION π
okay so r.stats.quantile is a tool to analyse exploratory statistics of a floating-point "cover layer" according to how it intersects with objects in a "base layer". it provides quantile calculations as selected "zonal statistics". it's giving zonal, it's giving statistics, it's giving main character energy fr fr π
π₯ NOTES π₯
r.stats.quantile is intended to be a partial replacement for r.statistics, with support for floating-point cover maps. it provides quantile calculations, which are absent from r.stats.zonal. (not me being the upgrade, not me being the moment π
)
Quantiles are calculated following algorithm 7 from Hyndman and Fan (1996), which is also the default in R and numpy. no cap, same algorithm, iconic behaviour. β
π EXAMPLE π
In this example, the raster polygon map zipcodes in the North Carolina sample dataset is used to calculate quantile raster statistics using the elevation raster map:
g.region raster=zipcodes -p
# print quantiles
r.stats.quantile base=zipcodes cover=elevation quantiles=3 -p
27511:0:33.333333:134.717392
27511:1:66.666667:143.985723
27513:0:33.333333:140.669993
27513:1:66.666667:146.279449
27518:0:33.333333:115.140101
27518:1:66.666667:129.893723
[...]
# write out percentile raster maps
r.stats.quantile base=zipcodes cover=elevation percentiles=25,50,75 \
output=zipcodes_elev_q25,zipcodes_elev_q50,zipcodes_elev_q75
look at those numbers go π so pretty, so precise π«Ά
π 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.quantile, r.stats.zonal, r.statistics
go read those too bestie, the crossover episode is real π
π AUTHORS π
Glynn Clements Markus Metz
(legends, honestly πβ¨)
π SOURCE CODE π
Available at: r.stats.quantile source code (history)
Accessed: Saturday Jan 17 05:41:00 2026
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
and that's the whole thing, bestie π
this was r.stats.quantile from the GRASS GIS 8.4.2 Reference Manual, Β© 2003-2025 GRASS Development Team, and this lil page was accessed Saturday Jan 17 05:41:00 2026 β go compute some quantiles, you're gonna slay π¦πΈπ
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· 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