1DBCOLHISTO(1)         User Contributed Perl Documentation        DBCOLHISTO(1)
2
3
4

NAME

6       dbcolhisto - compute a histogram over a column of Fsdb data
7

SYNOPSIS

9       dbcolhisto [-ag] [-W BucketWidth] [-S BucketStart] [-E BucketEnd] [-N
10       NumberOfBuckets] column
11

DESCRIPTION

13       This program computes a histogram over a column of data.  Records
14       containing non-numeric data are considered null do not contribute to
15       the stats (optionally they are treated as zeros).
16
17       Defaults to 10 buckets over the exact range of data.  Up to three
18       parameters (number of buckets, start, end, and width) can be specified,
19       the rest default accordingly.
20
21       Buckets range from a value (given the the low column) to just below the
22       next low value and buckets are equal width.  If necessary, extra "<min"
23       and ">max" buckets are created.  By default, the last bucket includes
24       max (and is thus infinitesimally larger than the other buckets).  This
25       irregularity can be removed with the "-I" option.
26
27       This program requires O(number of buckets) memory and O(size of data)
28       temporary disk space.
29

OPTIONS

31       -W or --width N
32           Gives with width of each bucket, in data units.  Default is
33           whatever gives 10 buckets over the whole range of data.
34
35       -S or --start N
36           Buckets start at value N, in data units.  Default is the minimum
37           data value.
38
39       -E or --end N
40           Buckets end at value N, in data units.  Default is the maximum data
41           value.
42
43       -N or --number N
44           Create N buckets.  The default is 10 buckets.
45
46       -g or --graphical
47           Generate a graphical histogram (with asterisks).  Default is
48           numeric.
49
50       -I or --last-inclusive
51           Make the last bucket non-inclusive of the last value.
52
53       -a  Compute stats over all records (treat non-numeric records as zero
54           rather than just ignoring them).  Default is non-numeric records
55           are ignored.
56
57       -e EmptyValue or --empty
58           Specify the value any null bins get.  (Default: -.)
59
60       This module also supports the standard fsdb options:
61
62       -d  Enable debugging output.
63
64       -i or --input InputSource
65           Read from InputSource, typically a file name, or "-" for standard
66           input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue
67           objects.
68
69       -o or --output OutputDestination
70           Write to OutputDestination, typically a file name, or "-" for
71           standard output, or (if in Perl) a IO::Handle, Fsdb::IO or
72           Fsdb::BoundedQueue objects.
73
74       --autorun or --noautorun
75           By default, programs process automatically, but Fsdb::Filter
76           objects in Perl do not run until you invoke the run() method.  The
77           "--(no)autorun" option controls that behavior within Perl.
78
79       --help
80           Show help.
81
82       --man
83           Show full manual.
84

SAMPLE USAGE

86   Input:
87           #fsdb name id test1
88           a 1 80
89           b 2 70
90           c 3 65
91           d 4 90
92           e 5 70
93           f 6 90
94
95   Command:
96           cat DATA/grades.fsdb | dbcolhisto -S 0 -E 100 -N 10 test1
97
98   Output:
99           #fsdb low histogram:q
100           0       0
101           10      0
102           20      0
103           30      0
104           40      0
105           50      0
106           60      1
107           70      2
108           80      1
109           90      2
110           #  | dbcolhisto -S 0 -E 100 -N 10 test1
111

SEE ALSO

113       Fsdb, dbcolpercentile, dbcolstats
114

BUGS

116       This program could run in constant memory with no external storage when
117       the buckets are pre-specified.  That optimization is not implemented.
118
120       Copyright (C) 1991-2022 by John Heidemann <johnh@isi.edu>
121
122       This program is distributed under terms of the GNU general public
123       license, version 2.  See the file COPYING with the distribution for
124       details.
125
126
127
128perl v5.36.0                      2022-11-22                     DBCOLHISTO(1)
Impressum