.TH v.univar 1grass "" "GRASS 7.2.0" "Grass User's Manual" .SH NAME \fI\fBv.univar\fR\fR \- Calculates univariate statistics of vector map features. .br Variance and standard deviation is calculated only for points if specified. .SH KEYWORDS vector, statistics, univariate statistics, attribute table, geometry .SH SYNOPSIS \fBv.univar\fR .br \fBv.univar \-\-help\fR .br \fBv.univar\fR [\-\fBgewd\fR] \fBmap\fR=\fIname\fR [\fBlayer\fR=\fIstring\fR] [\fBtype\fR=\fIstring\fR[,\fIstring\fR,...]] [\fBcolumn\fR=\fIname\fR] [\fBwhere\fR=\fIsql_query\fR] [\fBpercentile\fR=\fIinteger\fR] [\-\-\fBhelp\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] [\-\-\fBui\fR] .SS Flags: .IP "\fB\-g\fR" 4m .br Print the stats in shell script style .IP "\fB\-e\fR" 4m .br Calculate extended statistics .IP "\fB\-w\fR" 4m .br Weigh by line length or area size .IP "\fB\-d\fR" 4m .br Calculate geometric distances instead of attribute statistics .IP "\fB\-\-help\fR" 4m .br Print usage summary .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .IP "\fB\-\-ui\fR" 4m .br Force launching GUI dialog .SS Parameters: .IP "\fBmap\fR=\fIname\fR \fB[required]\fR" 4m .br Name of vector map .br Or data source for direct OGR access .IP "\fBlayer\fR=\fIstring\fR" 4m .br Layer number or name .br 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. .br Default: \fI1\fR .IP "\fBtype\fR=\fIstring[,\fIstring\fR,...]\fR" 4m .br Input feature type .br Options: \fIpoint, line, boundary, centroid, area\fR .br Default: \fIpoint,line,area\fR .IP "\fBcolumn\fR=\fIname\fR" 4m .br Name of attribute column .IP "\fBwhere\fR=\fIsql_query\fR" 4m .br WHERE conditions of SQL statement without \(cqwhere\(cq keyword .br Example: income < 1000 and inhab >= 10000 .IP "\fBpercentile\fR=\fIinteger\fR" 4m .br Percentile to calculate (requires extended statistics flag) .br Options: \fI0\-100\fR .br Default: \fI90\fR .SH DESCRIPTION \fIv.univar\fR calculates univariate statistics of vector map features. This includes the number of features counted, minimum, maximum values, and range. Variance and standard deviation is calculated only for points if \fBtype=point\fR is defined. .PP Extended statistics (\fB\-e\fR) adds median, 1st and 3rd quartiles, and 90th percentile to the output. .SH NOTES When using the \fB\-d\fR flag, univariate statistics of vector geometry are calculated. Depending on the selected vector \fBtype\fR, distances are calculated as follows: .RS 4n .IP \(bu 4n \fBtype=point\fR: point distances are considered; .IP \(bu 4n \fBtype=line\fR: the first point of each line is considered; .IP \(bu 4n \fBtype=area\fR: the centroid of each area is considered. .RE .SH EXAMPLE The example is based on the North Carolina sample dataset: .br .nf \fC g.region raster=elevation \-p v.random output=samples npoints=100 v.db.addtable map=samples columns=\(dqheights double precision\(dq v.what.rast map=samples rast=elevation column=heights v.db.select map=samples \fR .fi Calculate height attribute statistics: .br .nf \fC v.univar \-e samples column=heights type=point number of features with non NULL attribute: 100 number of missing attributes: 0 number of NULL attributes: 0 minimum: 57.2799 maximum: 148.903 range: 91.6235 sum: 10825.6 mean: 108.256 mean of absolute values: 108.256 population standard deviation: 20.2572 population variance: 410.356 population coefficient of variation: 0.187123 sample standard deviation: 20.3593 sample variance: 414.501 kurtosis: \-0.856767 skewness: 0.162093 1st quartile: 90.531 median (even number of cells): 106.518 3rd quartile: 126.274 90th percentile: 135.023 \fR .fi Compare to statistics of original raster map: .br .nf \fC r.univar \-e elevation total null and non\-null cells: 2025000 total null cells: 0 Of the non\-null cells: \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- n: 2025000 minimum: 55.5788 maximum: 156.33 range: 100.751 mean: 110.375 mean of absolute values: 110.375 standard deviation: 20.3153 variance: 412.712 variation coefficient: 18.4057 % sum: 223510266.558102 1st quartile: 94.79 median (even number of cells): 108.88 3rd quartile: 126.792 90th percentile: 138.66 \fR .fi Calculate distance between sampling points statistics: .br .nf \fC v.univar \-d samples column=heights type=point number of primitives: 100 number of non zero distances: 4851 number of zero distances: 0 minimum: 69.9038 maximum: 18727.7 range: 18657.8 sum: 3.51907e+07 mean: 7254.33 mean of absolute values: 7254.33 population standard deviation: 3468.53 population variance: 1.20307e+07 population coefficient of variation: 0.478132 sample standard deviation: 3468.89 sample variance: 1.20332e+07 kurtosis: \-0.605406 skewness: 0.238688 \fR .fi .SH SEE ALSO \fI db.univar, r.univar, v.db.univar, v.neighbors \fR .SH AUTHORS Radim Blazek, ITC\-irst .PP extended by: .br Hamish Bowman, University of Otago, New Zealand .br Martin Landa .PP \fILast changed: $Date: 2015\-01\-01 13:05:46 +0100 (Thu, 01 Jan 2015) $\fR .SH SOURCE CODE .PP Available at: v.univar source code (history) .PP Main index | Vector index | Topics index | Keywords index | Graphical index | Full index .PP © 2003\-2016 GRASS Development Team, GRASS GIS 7.2.0 Reference Manual