Skip to main content

A dependency-free library to quickly make ascii histograms from data.

Project description

text_histogram3

PyPI version Number of PyPI downloads

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_histogram3 import histogram
>>> import random
>>> histogram([random.gauss(50, 20) for _ in range(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_histogram3

Source: https://github.com/basnijholt/text_histogram3

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_histogram3-1.0.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

text_histogram3-1.0.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file text_histogram3-1.0.0.tar.gz.

File metadata

  • Download URL: text_histogram3-1.0.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200325 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for text_histogram3-1.0.0.tar.gz
Algorithm Hash digest
SHA256 94bec1d4f46dae8b889de17eb444c210f2fa68319e7f0221597accb5f6e7ea80
MD5 d0276faa4ad5b7cc60309733c0dcb362
BLAKE2b-256 7efdccc61e562c27e032639eb313697b861b4ee62539c6fa2620f8bbbada61b0

See more details on using hashes here.

File details

Details for the file text_histogram3-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: text_histogram3-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200325 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for text_histogram3-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28f14bf5b02485bd7dfe6ba56629d923ebca2c695ff8b929cc8a15949aaff688
MD5 fc9fc2a99029b6926e9d1c643e011077
BLAKE2b-256 d975619def54d066986d4a8919e72fe1a856e58efb9d2fd4016bb0dae9a7e1ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page