Fsdb::F...olhisto(3)
Hey bestie! Welcome to the Fsdb::Filter::dbcolhisto(3) page β yep, itβs part of the User Contributed Perl Documentation, and itβs here to teach you dbcolhisto like your fave study buddy. π«Ά
β¨ NAME β¨
dbcolhisto β compute a histogram over a column of Fsdb data π
π¦ SYNOPSIS π¦
dbcolhisto [-ag] [-W BucketWidth] [-S BucketStart] [-E BucketEnd] [-N NumberOfBuckets] column
πΈ DESCRIPTION πΈ
Okay so this program computes a histogram over a column of data. Records containing non-numeric data are considered null and do not contribute to the stats β optionally they are treated as zeros.
Defaults to 10 buckets over the exact range of data. Up to three parameters (number of buckets, start, end, and width) can be specified, and the rest default accordingly.
Buckets range from a value (given the low column) to just below the next low value, and buckets are equal width. If necessary, extra <min and >max buckets are created. By default, the last bucket includes max (and is thus infinitesimally larger than the other buckets). This irregularity can be removed with the -I option.
This program requires O(number of buckets) memory and O(size of data) temporary disk space. β¨
π OPTIONS π
-W,--width Nβ gives the width of each bucket, in data units. Default is whatever gives 10 buckets over the whole range of data.-S,--start Nβ buckets start at value N, in data units. Default is the minimum data value.-E,--end Nβ buckets end at value N, in data units. Default is the maximum data value.-N,--number Nβ create N buckets. The default is 10 buckets.-g,--graphicalβ generate a graphical histogram (with asterisks). Default is numeric.-I,--last-inclusiveβ make the last bucket non-inclusive of the last value.-aβ compute stats over all records (treat non-numeric records as zero rather than just ignoring them). Default is non-numeric records are ignored.-eEmptyValue,--emptyβ specify the value any null bins get. (Default:-.)
This module also supports the standard fsdb options:
-dβ enable debugging output.-i,--inputInputSource β read from InputSource, typically a file name, or-for standard input, or (if in Perl) aIO::Handle,Fsdb::IOorFsdb::BoundedQueueobjects.-o,--outputOutputDestination β write to OutputDestination, typically a file name, or-for standard output, or (if in Perl) aIO::Handle,Fsdb::IOorFsdb::BoundedQueueobjects.--autorun,--noautorunβ by default, programs process automatically, butFsdb::Filterobjects in Perl do not run until you invoke therun()method. The--(no)autorunoption controls that behavior within Perl.--helpβ show help.--manβ show full manual.
π SAMPLE USAGE π
π Input:
#fsdb name id test1
a 1 80
b 2 70
c 3 65
d 4 90
e 5 70
f 6 90
π Command:
cat DATA/grades.fsdb | dbcolhisto -S 0 -E 100 -N 10 test1
π Output:
#fsdb low histogram:q
0 0
10 0
20 0
30 0
40 0
50 0
60 1
70 2
80 1
90 2
# | dbcolhisto -S 0 -E 100 -N 10 test1
π₯ SEE ALSO π₯
Fsdb, dbcolpercentile, dbcolstats β go read those too, bestie. π«Ά
π BUGS π
This program could run in constant memory with no external storage when the buckets are pre-specified. That optimization is not implemented. No cap, thatβs just the tea. π
π CLASS FUNCTIONS π
π new
$filter = new Fsdb::Filter::dbcolhisto(@arguments);
Create a new dbcolhisto object, taking command-line arguments.
π set_defaults
$filter->set_defaults();
Internal: set up defaults.
π parse_options
$filter->parse_options(@ARGV);
Internal: parse command-line arguments.
π setup
$filter->setup();
Internal: setup, parse headers.
π run
$filter->run();
Internal: run over each rows.
π AUTHOR and COPYRIGHT π
Copyright (C) 1991-2022 by John Heidemann <johnh@isi.edu>
This program is distributed under terms of the GNU general public license, version 2. See the file COPYING with the distribution for details.
π Sign-off tea: this page is from perl v5.32.1, dated 2024-08-02, under Fsdb::Filter::dbcolhisto(3). Thatβs the whole vibe β byeeee! π«Άβ¨
π¦ where this page comes from
- epel 9: perl-Fsdb 2:3.9-1.el9 Β· GPLv2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms