db.univar(1grass)
π db.univar β the GRASS User's Manual page, bestie edition π
okay so. hi. you're here for db.univar, the GRASS GIS module, and honestly? she's that girl. sit down, grab a strawberry, let's get into it. π
KEYWORDS β¨ β database, statistics, attribute table. iykyk.
π SYNOPSIS π
db.univar
db.univar --help
db.univar [-eg] table=name column=name [database=name] [driver=name]
[where=sql_query] [percentile=float[,float,...]] format=name
[--help] [--verbose] [--quiet] [--ui]
π Flags
-eβ Extended statistics (quartiles and 90th percentile). not her being extra, we love that for her π-gβ Print stats in shell script style [deprecated]. bestie. bestie listen. this flag is deprecated and it will be removed in a future release. useformat=shellinstead, fr fr. don't get attached. π₯²--helpβ Print usage summary--verboseβ Verbose module output--quietβ Quiet module output--uiβ Force launching GUI dialog
πΈ Parameters
table=name[required] β Name of attribute table πcolumn=name[required] β Name of attribute column on which to calculate statistics (must be numeric). no cap, she has to be numeric, she cannot be out here being text. π’database=nameβ Name of databasedriver=nameβ Name of database driver- Options:
dbf,odbc,ogr,sqlite,pg
- Options:
where=sql_queryβ WHERE conditions of SQL statement without 'where' keyword- Example:
income < 1000 and population >= 10000
- Example:
percentile=float[,float,...]β Percentile to calculate (requires extended statistics flag)- Options:
0-100 - Default:
90
- Options:
format=name[required] β Output format- Options:
plain,json,shell - Default:
plain plain: Plain text outputjson: JSON (JavaScript Object Notation)shell: Shell script style for Basheval
- Options:
β¨ DESCRIPTION β¨
so what does she actually do. db.univar calculates basic univariate statistics for numeric attributes in a data table. that's the whole vibe.
she will calculate minimum, maximum, range, mean, standard deviation, variance, coefficient of variation, quartiles, median, and the 90th percentile. obsessed. an absolute icon of a stat sheet. π
she does it by using db.select to create list values for statistical calculations. that's the technique. that's the move.
NOTES π β If thedatabaseanddriverare not specified, the default values set indb.connectwill be used. so like, she's not gonna guess, she's gonna go with your saved defaults. periodt.
π¦ EXAMPLE π¦
In this example, random points are sampled from the elevation map (North Carolina sample dataset) and univariate statistics performed:
g.region raster=elevation -p
v.random output=samples n=100
v.db.addtable samples column="heights double precision"
v.what.rast samples raster=elevation column=heights
v.db.select samples
db.univar samples column=heights
look at that pipeline. the way she just flows. main character energy from start to finish. π₯
π SEE ALSO π
v.db.univar, r.univar, v.univar, db.select, d.vect.thematic
(the squad. the besties. the whole friend group, honestly.)
π AUTHORS π
Michael Barton, Arizona State University
and authors of r.univar.sh
π SOURCE CODE π
Available at: db.univar source code (history)
Latest change: Saturday Feb 14 00:16:26 2026 in commit: ae1ae67e52b94c5cef185fac50aa33b38a56875f
Main index | Database index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
and that's the whole page, bestie!! π go calculate some quartiles, drink water, and remember: default percentile is 90, format defaults to plain, and -g is deprecated so please let her rest. π§ this was the db.univar(1grass) man page from GRASS 8.5.0 β slay, bye!! π
ππ«Ά
π¦ 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