A dependency-free library to quickly make ascii histograms from data.
Project description
text_histogram
Histograms are great for exploring data, but numpy and matplotlib are heavy and overkill for quick analysis. They also can’t be easily used on remote servers over ssh. Don’t even get me started on installing them.
Bit.ly’s data_hacks histogram.py is great but difficult to use from python code directly (it requires an optparse.OptionParser to pass histogram options). This is histogram.py repackaged for convenient script use.
>>> 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 text_histogram
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file text_histogram-0.0.7.tar.gz.
File metadata
- Download URL: text_histogram-0.0.7.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04b727e5e7205704524cf0dd7e61a67748d7929fd554c9c553fbdebafd280019
|
|
| MD5 |
0370027bc808f925ad0c0a7e9b4b8b78
|
|
| BLAKE2b-256 |
cc9d478389840949022e70c94e1ac68252a0e752dfa2081a80bae2b3008e43b5
|
File details
Details for the file text_histogram-0.0.7-py2-none-any.whl.
File metadata
- Download URL: text_histogram-0.0.7-py2-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a65f274b8ea6ae625970b14a095e7c9f236ceae15d97e407bb64531173970e70
|
|
| MD5 |
f1b6518fa77a9a6dc51eb07862fd2ebc
|
|
| BLAKE2b-256 |
df51f9564b2f51f1ec35f781470a221117df2c01855ebe9223a3bf229e4a4749
|