1Fsdb::Filter::dbcolhistUos(e3r)Contributed Perl DocumentFastdibo:n:Filter::dbcolhisto(3)
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       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

SAMPLE USAGE

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

SEE ALSO

110       Fsdb, dbcolpercentile, dbcolstats
111

BUGS

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

CLASS FUNCTIONS

117   new
118           $filter = new Fsdb::Filter::dbcolhisto(@arguments);
119
120       Create a new dbcolhisto object, taking command-line arguments.
121
122   set_defaults
123           $filter->set_defaults();
124
125       Internal: set up defaults.
126
127   parse_options
128           $filter->parse_options(@ARGV);
129
130       Internal: parse command-line arguments.
131
132   setup
133           $filter->setup();
134
135       Internal: setup, parse headers.
136
137   run
138           $filter->run();
139
140       Internal: run over each rows.
141
143       Copyright (C) 1991-2018 by John Heidemann <johnh@isi.edu>
144
145       This program is distributed under terms of the GNU general public
146       license, version 2.  See the file COPYING with the distribution for
147       details.
148
149
150
151perl v5.32.1                      2021-01-27       Fsdb::Filter::dbcolhisto(3)
Impressum