1db.univar(1)                GRASS GIS User's Manual               db.univar(1)
2
3
4

NAME

6       db.univar  - Calculates univariate statistics on selected table column.
7

KEYWORDS

9       database, statistics, attribute table
10

SYNOPSIS

12       db.univar
13       db.univar --help
14       db.univar [-eg] table=name column=name  [database=name]   [driver=name]
15       [where=sql_query]    [percentile=float[,float,...]]     [format=string]
16       [--help]  [--verbose]  [--quiet]  [--ui]
17
18   Flags:
19       -e
20           Extended statistics (quartiles and 90th percentile)
21
22       -g
23           Print stats in shell script style
24
25       --help
26           Print usage summary
27
28       --verbose
29           Verbose module output
30
31       --quiet
32           Quiet module output
33
34       --ui
35           Force launching GUI dialog
36
37   Parameters:
38       table=name [required]
39           Name of attribute table
40
41       column=name [required]
42           Name  of attribute column on which to calculate statistics (must be
43           numeric)
44
45       database=name
46           Name of database
47
48       driver=name
49           Name of database driver
50           Options: dbf, odbc, ogr, sqlite, pg
51
52       where=sql_query
53           WHERE conditions of SQL statement without ’where’ keyword
54           Example: income < 1000 and population >= 10000
55
56       percentile=float[,float,...]
57           Percentile to calculate (requires extended statistics flag)
58           Options: 0-100
59           Default: 90
60
61       format=string
62           Output format
63           Options: plain, json, shell
64           plain: Plain text output
65           json: JSON (JavaScript Object Notation)
66           shell: Shell script style for Bash eval
67

DESCRIPTION

69       db.univar calculates basic univariate statistics for numeric attributes
70       in a data table. It will calculate minimum, maximum, range, mean, stan‐
71       dard deviation, variance, coefficient of variation, quartiles,  median,
72       and  90th percentile.  It uses db.select to create list values for sta‐
73       tistical calculations.  NOTES If the database and driver are not speci‐
74       fied, the default values set in db.connect will be used.
75

EXAMPLE

77       In  this  example,  random  points  are  sampled from the elevation map
78       (North Carolina sample dataset) and univariate statistics performed:
79       g.region raster=elevation -p
80       v.random output=samples n=100
81       v.db.addtable samples column="heights double precision"
82       v.what.rast samples raster=elevation column=heights
83       v.db.select samples
84       db.univar samples column=heights
85

SEE ALSO

87        v.db.univar, r.univar, v.univar, db.select, d.vect.thematic
88

AUTHORS

90       Michael Barton, Arizona State University
91
92       and authors of r.univar.sh
93

SOURCE CODE

95       Available at: db.univar source code (history)
96
97       Accessed: Saturday Oct 28 18:19:19 2023
98
99       Main index | Database index | Topics index | Keywords index | Graphical
100       index | Full index
101
102       © 2003-2023 GRASS Development Team, GRASS GIS 8.3.1 Reference Manual
103
104
105
106GRASS 8.3.1                                                       db.univar(1)
Impressum