2016/04/20
distribution: histograms in the terminal
My new favorite tool is a python program called distribution
that can easily show histograms in your terminal:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
$ cd /usr/share/dict
$ cut -c 1 < words | distribution --char=# --width=60
Key|Ct (Pct) Histogram
s|22759 (9.65%) ############################################
p|22171 (9.40%) ##########################################
c|17406 (7.38%) #################################
u|16179 (6.86%) ###############################
a|14537 (6.16%) ############################
t|11389 (4.83%) ######################
m|10709 (4.54%) #####################
d| 9946 (4.22%) ###################
b| 9675 (4.10%) ###################
r| 8955 (3.80%) #################
i| 8303 (3.52%) ################
h| 7889 (3.34%) ###############
e| 7818 (3.31%) ###############
o| 7219 (3.06%) ##############
f| 6382 (2.71%) #############
|
I used homebrew to install it, but you can see some usage examples and a few other tools on this stackoverflow page. I eagerly anticipate showing off some histograms to people.
distribution: histograms in the terminal is original content from devolve.