A dependency-free library to quickly make ascii histograms from data.
Project description
Histograms are great. This is Bit.ly’s data_hacks histogram.py repackaged for convenient script use.
Usage
>>> from text_histogram import histogram >>> import random >>> histogram([random.gauss(50, 20) for _ in xrange(100)]) # NumSamples = 100; Min = 1.42; Max = 87.36 # Mean = 51.848095; Variance = 332.055832; SD = 18.222399; Median 53.239251 # each ∎ represents a count of 1 1.4221 - 10.0159 [ 3]: ∎∎∎ 10.0159 - 18.6098 [ 3]: ∎∎∎ 18.6098 - 27.2036 [ 6]: ∎∎∎∎∎∎ 27.2036 - 35.7974 [ 4]: ∎∎∎∎ 35.7974 - 44.3913 [ 17]: ∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎ 44.3913 - 52.9851 [ 16]: ∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎ 52.9851 - 61.5789 [ 17]: ∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎ 61.5789 - 70.1728 [ 20]: ∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎ 70.1728 - 78.7666 [ 8]: ∎∎∎∎∎∎∎∎ 78.7666 - 87.3604 [ 6]: ∎∎∎∎∎∎
Installation
$ pip install data_hacks
Why?
Histograms are great for exploring data, but numpy and matplotlib are heavy and overkill for quick analysis. Don’t even get me started on installing them.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
text_histogram-0.0.4.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for text_histogram-0.0.4-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9084b21292be62916985616a84be8571e4f6d8914eac767b2240d6ac66a630c9 |
|
MD5 | 1fbf351a9b3ce4bc2af7840646fca000 |
|
BLAKE2b-256 | 014486f8ea989bde8cac41a6c778f8182ef0ab9c779a0ae22bf5adfe2688f787 |