db.univar(1)
π db.univar β the GRASS GIS manual, bestie edition π
okay so welcome to db.univar(1), straight out of the GRASS GIS User's Manual. sit down, grab a strawberry π, and let's get you stats-pilled.
β¨ NAME β¨
db.univar β calculates univariate statistics on selected table column. that's it, that's the whole gig. π
π·οΈ 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=string]
[--help] [--verbose] [--quiet] [--ui]
look at her. main character syntax. no cap.
π Flags π
-eβ extended statistics, meaning quartiles and the 90th percentile. going the extra mile, as she should. β¨-gβ print stats in shell script style. for when you want your output to be friends with Bash.--helpβ print usage summary. the classic "help me bestie" move.--verboseβ verbose module output. she's chatty and we love that for her.--quietβ quiet module output. shhh. π€«--uiβ force launching GUI dialog. buttons instead of typing, no judgement.
πΈ Parameters πΈ
table=name[required] β name of attribute table. mandatory, periodt.column=name[required] β name of attribute column on which to calculate statistics. it must be numeric, like actually, don't try it with text, it's not gonna eat. πdatabase=nameβ name of database.driver=nameβ name of database driver. Options:dbf,odbc,ogr,sqlite,pgwhere=sql_queryβ WHERE conditions of SQL statement without the'where'keyword. Example:income < 1000 and population >= 10000percentile=float[,float,...]β percentile to calculate (requires the extended statistics flag, so like, don't forget-e). Options: 0-100 Default: 90format=stringβ output format. Options:plain,json,shellplain: Plain text outputjson: JSON (JavaScript Object Notation)shell: Shell script style for Bash eval
π DESCRIPTION π
db.univar calculates basic univariate statistics for numeric attributes in a data table. the way it just does that. π
it will calculate minimum, maximum, range, mean, standard deviation, variance, coefficient of variation, quartiles, median, and 90th percentile. that's a whole roster of numbers and every single one of them is showing up. π₯
it uses db.select to create list values for statistical calculations. iconic teamwork.
NOTES π«Ά β if the database and driver are not specified, the default values set in db.connect will be used. so like, she already knows where to go.
π¦ 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
the whole pipeline. ate and left no crumbs. β¨
π SEE ALSO π
v.db.univar, r.univar, v.univar, db.select, d.vect.thematic
go read those too, bestie, they're all in the group chat. π«Ά
π AUTHORS π
Michael Barton, Arizona State University
and authors of r.univar.sh
shoutout to the legends. π
πΎ SOURCE CODE πΎ
Available at: db.univar source code (history)
Accessed: Saturday Jan 17 05:41:52 2026
Main index | Database index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual
and that's the whole page, bestie β this was GRASS 8.4.2, and yes she's still db.univar(1) in the footer, forever and always. mwah. πβ¨ππ¦πΈπ
π«Ά
π¦ 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