Skip to main content

tooltree

functions for creating treemap data visualizations

Installation

uv add tooltree

Example Usage

The main API is just one function, tooltree.plot_treemap()

See tooltree.plot_treemap() for full list of options

Basic Treemap

import tooltree

tooltree.plot_treemap(
    df=dataframe,
    levels=[grandparent_column, parent_column, name_column],
    metric=metric_column,
    root='Root Node Name',
)

Output as HTML

import tooltree

tooltree.plot_treemap(
    df=dataframe,
    levels=[grandparent_column, parent_column, name_column],
    metric=metric_column,
    root='Root Node Name',
    html_path='path/to/save/treemap.html',
)

Output as PNG

import tooltree

tooltree.plot_treemap(
    df=dataframe,
    levels=[grandparent_column, parent_column, name_column],
    metric=metric_column,
    root='Root Node Name',
    png_path='path/to/save/treemap.png',
)

Limit Number of Treemap Children

import tooltree

tooltree.plot_treemap(
    df=dataframe,
    levels=[grandparent_column, parent_column, name_column],
    metric=metric_column,
    root='Root Node Name',
    max_children=10,
    min_child_fraction=0.01,
    max_root_children=5,
    min_root_child_fraction=0.001,
)

Other Options

import tooltree

tooltree.plot_treemap(
    df=dataframe,
    levels=[grandparent_column, parent_column, name_column],
    metric=metric_column,
    root='Root Node Name',
    metric_format=toolstr_kwargs,
    height=1600,
    width=1200,
)

Metadata

Release files for tooltree 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tooltree 0.1.3
File Size Uploaded Provenance
tooltree-0.1.3.tar.gz 7.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tooltree 0.1.3
File Interpreter ABI Platform
tooltree-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 16.8 kB

Release files / tooltree-0.1.3.tar.gz

Download URL tooltree-0.1.3.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
486fe463b62cf6739176ffd0779706033e8ad2b43437f9dce6e390e94dcd3015
BLAKE2b-256 checksum
How to use checksums
aaab0a6eb76998341576ec3eedeca1de8fc2c4357fd61120a2e4a0bd05afb2db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.0

Release files / tooltree-0.1.3-py3-none-any.whl

Download URL tooltree-0.1.3-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b266a1c0761f9397f43ef4aac121617f158e2440a00742ae273da3bf91649880
BLAKE2b-256 checksum
How to use checksums
9a4d6572b5d27fe00e57d58823354f7d48823285cf7b3c97925b92e34abc3c5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.0

Security for tooltree 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page