GithubHelp home page GithubHelp logo

histogram's Introduction

Simple histogram creation

see bin/histogram-demo.pl

bin/data-histogram.pl:

  usage: data-histogram.pl - create a histogram from a series of integers

  --bucket-count    number of buckets - defaults to 20
  --line-length     max length of histogram lines - defaults to  100
  --hist-char       character used for histogram lines - defaults to *
  --lower-limit-op  operator for lower bounds - one of < > <= >=
  --lower-limit-val value for lower bound
  --upper-limit-op  operator for upper bounds - one of < > <= >=
  --upper-limit-val value for upper bound
  --file            read data from a file
                    this is useful only for files to large for memory
                    this option is quite slow as it uses the Tie::File package
                    the only advantage is very large files may be processed

  --h|help

  example:

Histogram of reads

head -1 /home/jkstill/perl/modules/roc/data/asm-dg-metrics-1.csv  | cut -f7 -d,
READS

(looks like a limit bug in the demo)

filter on READS of between 1 and 10

grep shrprd01 /home/jkstill/perl/modules/roc/data/asm-dg-metrics-1.csv  | cut -f7 -d, | data-histogram.pl --lower-limit-op '>=' --lower-limit-val 1 --upper-limit-op '<=' --upper-limit-val 10
Bucket Count Decreased to 18 to avoid modulus divide by zero

         2:  50.1%  ****************************************************************************************************
         3:  33.4%  ******************************************************************
         4:   8.4%  ****************
         5:   2.7%  *****
         6:   0.7%  *
         7:   1.0%  **
         8:   1.8%  ***
         9:   0.2%
        10:   1.1%  **
        11:   0.6%  *

Histogram for size of reads <  ~80 Megabytes

head -1 /home/jkstill/perl/modules/roc/data/asm-dg-metrics-1.csv  | cut -f11 -d,
BYTES_READ


 grep shrprd01 /home/jkstill/perl/modules/roc/data/asm-dg-metrics-1.csv  | cut -f11 -d, | bin/data-histogram.pl --lower-limit-op '>=' --lower-limit-val 1 --upper-limit-op '<=' --upper-limit-val 819940556
  40991565:  83.1%  ****************************************************************************************************
  81983130:   3.5%  ****
 122974695:   1.0%  *
 163966260:   0.5%
 204957825:   0.4%
 245949390:   0.3%
 286940955:   0.4%
 327932520:   0.4%
 368924085:   0.8%
 409915650:   1.8%  **
 450907215:   1.7%  **
 491898780:   1.4%  *
 532890345:   0.6%
 573881910:   0.4%
 614873475:   0.5%
 655865040:   0.8%
 696856605:   1.0%  *
 737848170:   0.8%
 778839735:   0.4%
 819831300:   0.2%
 860822865:   0.0%


histogram's People

Contributors

jkstill avatar

Stargazers

Baki Sahin avatar Adric Norris avatar  avatar  avatar Simon Pane avatar

Watchers

 avatar

Forkers

bakink

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.