Skip to main content

Interactively plot streaming sequences of numbers

Project description

carlo

Named after the Monte Carlo algorithm, this module displays interactive histograms of streaming/online data. It's meant for quickly visualizing distributions, and it'll keep refining its histogram as new data comes in.

Accepts lists, generators, numbers from stdin, or a function to be repeatdly evaluated. Displays data as histograms with automagic bin allocation, and extra statistics in legends.

Example 1

Compare samples from one 20-sided dice vs three 6-sided dices.

Imported:

from carlo import plot, d
plot(lambda: d(20), lambda: d(6)+d(6)+d(6))

Or as standalone module (where d(n) simulates the roll of a n-sided dice):

$ python -m carlo "d(20)" "d(6)+d(6)+d(6)"

example screenshot showing two histograms superimposed

Example 2

Sample values from max(0.5, random()**0.2).

Imported:

from carlo import plot
from random import random
plot(lambda: max(0.5, random()**0.2))

Or as standalone module (all functions from the random module are automatically available).

$ python -m carlo "max(0.5, random()**0.2)"

example screenshot showing a skewed-looking 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

carlo-0.1.6.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

carlo-0.1.6-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file carlo-0.1.6.tar.gz.

File metadata

  • Download URL: carlo-0.1.6.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for carlo-0.1.6.tar.gz
Algorithm Hash digest
SHA256 682541820ddd91b7474ee70e28d6663e4dcdf069f10ca7c5a44ef2c382426a14
MD5 a328dbf0034f4a470b351ab36af81ac9
BLAKE2b-256 3439b63283f3992228e1e7309a3b0ab37888e8d7c16ea3a0b651e1617e129716

See more details on using hashes here.

File details

Details for the file carlo-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: carlo-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for carlo-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 676e5c29b02df7fd1863f69e6db7aae0ad920e8c7abfe26e8fa1c66798764ec7
MD5 7918141b3d1e43dbf696dae66d9c560e
BLAKE2b-256 03c808c7851594b8c1554489410558d1484cdbcc61457e571f7fae3c2a0cb056

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