1DBCOLHISTO(1) User Contributed Perl Documentation DBCOLHISTO(1)
2
3
4
6 dbcolhisto - compute a histogram over a column of Fsdb data
7
9 dbcolhisto [-ag] [-W BucketWidth] [-S BucketStart] [-E BucketEnd] [-N
10 NumberOfBuckets] column
11
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
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 This module also supports the standard fsdb options:
58
59 -d Enable debugging output.
60
61 -i or --input InputSource
62 Read from InputSource, typically a file name, or "-" for standard
63 input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue
64 objects.
65
66 -o or --output OutputDestination
67 Write to OutputDestination, typically a file name, or "-" for
68 standard output, or (if in Perl) a IO::Handle, Fsdb::IO or
69 Fsdb::BoundedQueue objects.
70
71 --autorun or --noautorun
72 By default, programs process automatically, but Fsdb::Filter
73 objects in Perl do not run until you invoke the run() method. The
74 "--(no)autorun" option controls that behavior within Perl.
75
76 --help
77 Show help.
78
79 --man
80 Show full manual.
81
83 Input:
84 #fsdb name id test1
85 a 1 80
86 b 2 70
87 c 3 65
88 d 4 90
89 e 5 70
90 f 6 90
91
92 Command:
93 cat DATA/grades.fsdb | dbcolhisto -S 0 -E 100 -N 10 test1
94
95 Output:
96 #fsdb low histogram
97 0 0
98 10 0
99 20 0
100 30 0
101 40 0
102 50 0
103 60 1
104 70 2
105 80 1
106 90 2
107 # | dbcolhisto -S 0 -E 100 -N 10 test1
108
110 Fsdb, dbcolpercentile, dbcolstats
111
113 This program could run in constant memory with no external storage when
114 the buckets are pre-specified. That optimization is not implemented.
115
117 Copyright (C) 1991-2018 by John Heidemann <johnh@isi.edu>
118
119 This program is distributed under terms of the GNU general public
120 license, version 2. See the file COPYING with the distribution for
121 details.
122
123
124
125perl v5.28.1 2019-02-02 DBCOLHISTO(1)