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):
carlo "d(20)" "d(6)+d(6)+d(6)"
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).
carlo "max(0.5, random()**0.2)"
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file carlo-0.1.9.tar.gz
.
File metadata
- Download URL: carlo-0.1.9.tar.gz
- Upload date:
- Size: 7.7 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4fd780933ba84aba83e3e1fc52ba1d05f75f6c92f0d35a211f7c5241bc1b8bf |
|
MD5 | 8e7dd4a7e250653231d65729c96e1a82 |
|
BLAKE2b-256 | 966fc15cb1d16ab6083abbb208a754f491bd64d0a07ba99a0e8e4e535d8c2ea7 |
File details
Details for the file carlo-0.1.9-py3-none-any.whl
.
File metadata
- Download URL: carlo-0.1.9-py3-none-any.whl
- Upload date:
- Size: 8.2 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92d679f49ecffd27c9e81a121f6046ad3e5697f297e9c46c9b914cb3e6562359 |
|
MD5 | 24dba5af3f639335aa7664960714dfaa |
|
BLAKE2b-256 | be60b51a5f7fb191e204c8ff95a2d4847d68d3a74b302a89ddfd8903abcd9a5b |