Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example #29

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,20 @@ A utility that parses input data points and outputs a text histogram

Example:

$ cat /tmp/data | histogram.py --percentage --max=1000 --min=0
$ cat data_example.txt | histogram.py --percentage --max=1000 --min=0
# NumSamples = 60; Min = 0.00; Max = 1000.00
# 1 value outside of min/max
# Mean = 332.666667; Variance = 471056.055556; SD = 686.335236; Median 191.000000
# Mean = 450.200000; Variance = 79226.560000; SD = 281.472130; Median 435.000000
# each ∎ represents a count of 1
0.0000 - 100.0000 [ 28]: ∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎ (46.67%)
100.0000 - 200.0000 [ 2]: ∎∎ (3.33%)
200.0000 - 300.0000 [ 2]: ∎∎ (3.33%)
300.0000 - 400.0000 [ 8]: ∎∎∎∎∎∎∎∎ (13.33%)
400.0000 - 500.0000 [ 8]: ∎∎∎∎∎∎∎∎ (13.33%)
500.0000 - 600.0000 [ 7]: ∎∎∎∎∎∎∎ (11.67%)
600.0000 - 700.0000 [ 3]: ∎∎∎ (5.00%)
700.0000 - 800.0000 [ 0]: (0.00%)
800.0000 - 900.0000 [ 1]: ∎ (1.67%)
900.0000 - 1000.0000 [ 0]: (0.00%)
0.0000 - 100.0000 [ 7]: ∎∎∎∎∎∎∎ (11.67%)
100.0000 - 200.0000 [ 6]: ∎∎∎∎∎∎ (10.00%)
200.0000 - 300.0000 [ 12]: ∎∎∎∎∎∎∎∎∎∎∎∎ (20.00%)
300.0000 - 400.0000 [ 4]: ∎∎∎∎ (6.67%)
400.0000 - 500.0000 [ 3]: ∎∎∎ (5.00%)
500.0000 - 600.0000 [ 9]: ∎∎∎∎∎∎∎∎∎ (15.00%)
600.0000 - 700.0000 [ 9]: ∎∎∎∎∎∎∎∎∎ (15.00%)
700.0000 - 800.0000 [ 2]: ∎∎ (3.33%)
800.0000 - 900.0000 [ 2]: ∎∎ (3.33%)
900.0000 - 1000.0000 [ 6]: ∎∎∎∎∎∎ (10.00%)

With logarithmic scale

Expand Down
60 changes: 60 additions & 0 deletions data_example.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
576
880
41
511
206
148
185
663
57
349
978
221
541
586
694
445
569
663
335
233
425
960
168
289
400
252
65
953
606
246
60
306
775
295
34
973
134
529
678
595
567
616
607
980
212
53
286
489
676
273
229
173
745
846
175
615
504
988
288
66