t.vect.univar
Calculates univariate statistics of attributes for each registered vector map of a space time vector dataset
t.vect.univar [-eu] input=name [output=name] [layer=string] column=name [twhere=sql_query] [where=sql_query] [type=string] [separator=character] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]
Example:
t.vect.univar input=name column=name
grass.script.run_command("t.vect.univar", input, output=None, layer="1", column, twhere=None, where=None, type="point", separator="pipe", flags=None, overwrite=False, verbose=False, quiet=False, superquiet=False)
Example:
gs.run_command("t.vect.univar", input="name", column="name")
Parameters
input=name [required]
Name of the input space time vector dataset
output=name
Name for output file
layer=string
Layer number or name
Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
Default: 1
column=name [required]
Name of attribute column
twhere=sql_query
WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework
Example: start_time > '2001-01-01 12:30:00'
where=sql_query
WHERE conditions of SQL statement without 'where' keyword
Example: income < 1000 and population >= 10000
type=string
Input feature type
Allowed values: point, line, boundary, centroid, area
Default: point
separator=character
Field separator character between the output columns
Special characters: pipe, comma, space, tab, newline
Default: pipe
-e
Calculate extended statistics
-u
Suppress printing of column names
--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--qq
Very quiet module output
--ui
Force launching GUI dialog
input : str, required
Name of the input space time vector dataset
Used as: input, stvds, name
output : str, optional
Name for output file
Used as: output, file, name
layer : str, optional
Layer number or name
Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
Used as: input, layer
Default: 1
column : str, required
Name of attribute column
Used as: input, dbcolumn, name
twhere : str, optional
WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework
Example: start_time > '2001-01-01 12:30:00'
Used as: sql_query
where : str, optional
WHERE conditions of SQL statement without 'where' keyword
Example: income < 1000 and population >= 10000
Used as: input, sql_query, sql_query
type : str, optional
Input feature type
Allowed values: point, line, boundary, centroid, area
Default: point
separator : str, optional
Field separator character between the output columns
Special characters: pipe, comma, space, tab, newline
Used as: input, separator, character
Default: pipe
flags : str, optional
Allowed values: e, u
e
Calculate extended statistics
u
Suppress printing of column names
overwrite: bool, optional
Allow output files to overwrite existing files
Default: False
verbose: bool, optional
Verbose module output
Default: False
quiet: bool, optional
Quiet module output
Default: False
superquiet: bool, optional
Very quiet module output
Default: False
DESCRIPTION
The module t.vect.univar computes univariate statistics of a space time vector dataset based on a single attribute row.
EXAMPLE
The example is based on the t.vect.observe.strds example; so create the precip_stations space time vector dataset and after run the following command:
t.vect.univar input=precip_stations col=month
id|start|end|n|nmissing|nnull|min|max|range|mean|mean_abs|population_stddev|population_variance|population_coeff_variation|sample_stddev|sample_variance|kurtosis|skewness
precip_stations_monthly@climate_2009_2012|2009-01-01 00:00:00|2009-02-01 00:00:00|132|0|4|-2.31832|7.27494|9.59326|3.44624|3.5316|1.79322|3.21564|0.520341|1.80005|3.24019|0.484515|-0.338519
precip_stations_monthly@climate_2009_2012|2009-02-01 00:00:00|2009-03-01 00:00:00|132|0|4|-0.654152|7.90613|8.56028|5.47853|5.48844|1.73697|3.01708|0.317051|1.74359|3.04011|0.875252|-1.0632
....
precip_stations_monthly@climate_2009_2012|2012-10-01 00:00:00|2012-11-01 00:00:00|132|0|4|9.67596|18.4654|8.78945|14.945|14.945|1.90659|3.6351|0.127574|1.91386|3.66285|-0.0848967|-0.700833
precip_stations_monthly@climate_2009_2012|2012-11-01 00:00:00|2012-12-01 00:00:00|132|0|4|3.56755|10.6211|7.05357|7.72153|7.72153|1.33684|1.78715|0.173132|1.34194|1.8008|0.90434|-0.863935
precip_stations_monthly@climate_2009_2012|2012-12-01 00:00:00|2013-01-01 00:00:00|132|0|4|3.04325|11.6368|8.5935|8.20147|8.20147|1.78122|3.17275|0.217183|1.78801|3.19697|-0.177991|-0.501295
SEE ALSO
AUTHOR
Sören Gebbert, Thünen Institute of Climate-Smart Agriculture
SOURCE CODE
Available at: t.vect.univar source code
(history)
Latest change: Friday Feb 07 19:16:09 2025 in commit a82a39f