Skip to main content

A terminal heatgraph renderer for matrix-style data.

Project description

heatgraph

A terminal heat-map renderer for people who actually like their terminal.

hero image for heatgraph showing some visualized data

Overview

heatgraph is a lightweight, zero-dependency Python utility that turns matrix-style data into ANSI heat-maps. It lives at the end of your unix pipe — because why fire up a Jupyter notebook when you can grep some numbers and pipe them into a beautiful grid of colored blocks?

  • stdin → matrix data → colored ASCII heatmap
  • zero runtime dependencies
  • fast, composable, and script-friendly

Quick start

If you have a JSON object with a values array, you're already halfway there:

echo '{"values":[[1,2,3,4,5]],"cols":["a","b","c","d","e"]}' | uvx heatgraph

Examples

Visualize your GitHub contributions

uvx heatgraph-helpers gh-contributions <username> --theme github-dark

an example github contribution graph

Track a workout routine

uvx heatgraph-helpers habit-tracker examples/workout-log.md --simple

image of a workout log

Track your sleep quality

uvx heatgraph-helpers habit-tracker examples/sleep.log \
  --theme nord --glyphs terminal --normalize quantile \
  --message '[COUNT] nights logged' \
  --legend 'poor  [GRADIENT]  excellent'

image of a sleep tracker

Live data with --follow

# Conway's Game of Life as the "live data"
uvx heatgraph-helpers game-of-life | uvx heatgraph --follow --glyphs terminal

a gif demonstrating the follow argument usage

Features

  • Zero dependencies. Pure Python 3.12+. No pip install nightmares.
  • Streaming. --follow reads NDJSON and redraws frames in place — no scrollback flood.
  • Quantile binning. --normalize quantile for the GitHub-contributions look: zero is its own bucket, the rest binned by quantile.
  • Gamma correction. --gamma to fine-tune the pop of your colors.
  • Themes. A curated collection so your heatgraphs don't look straight out of 1984. Unless that's the brief.

Docs

Doc When to read it
docs/CONFIGURATION.md All CLI flags, precedence rules, where settings come from.
docs/CUSTOMIZING.md Themes, glyph presets, headers, building your own look.
docs/SCHEMA.md The matrix-doc JSON contract and the streaming/NDJSON protocol.
docs/CONCEPTS.md Shared vocabulary — bucket, palette, glyph, direction, and friends.

License

GPLv3. Keep it free, keep it open, and for the love of god, don't wrap this in a proprietary electron app.

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

heatgraph-0.2.0.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

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

heatgraph-0.2.0-py3-none-any.whl (29.6 kB view details)

Uploaded Python 3

File details

Details for the file heatgraph-0.2.0.tar.gz.

File metadata

  • Download URL: heatgraph-0.2.0.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for heatgraph-0.2.0.tar.gz
Algorithm Hash digest
SHA256 379f054dd6ad865bd65e588113add7e75d55ecf0d240ea527ed8012789f4e284
MD5 7bf12b0b722647f31e0ee081301a6cc7
BLAKE2b-256 4edbc1c4fc6d2e637da035bda3ccafa61d3d11f6cba0f221851fd00b5d3baeb6

See more details on using hashes here.

File details

Details for the file heatgraph-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: heatgraph-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 29.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for heatgraph-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 85e3fe27092668617d8c8190bf75fe80796629e1ef956ea32e64531c7552dc65
MD5 8ab286c6fa077adae8f7d5cd9cb45d7f
BLAKE2b-256 1b27e8c4841a4790bbdfa743d17094dc1394c33b640757edcefff269b6eaa8e6

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