Skip to main content

functions for creating treemap data visualizations

Project description

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,
)

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

tooltree-0.1.3.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

tooltree-0.1.3-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file tooltree-0.1.3.tar.gz.

File metadata

  • Download URL: tooltree-0.1.3.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.0

File hashes

Hashes for tooltree-0.1.3.tar.gz
Algorithm Hash digest
SHA256 486fe463b62cf6739176ffd0779706033e8ad2b43437f9dce6e390e94dcd3015
MD5 ad31c03a4d5b2e1a97a6366f302b90c2
BLAKE2b-256 aaab0a6eb76998341576ec3eedeca1de8fc2c4357fd61120a2e4a0bd05afb2db

See more details on using hashes here.

File details

Details for the file tooltree-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: tooltree-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.0

File hashes

Hashes for tooltree-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b266a1c0761f9397f43ef4aac121617f158e2440a00742ae273da3bf91649880
MD5 ad886144aea1dc26644b0da28164a0e0
BLAKE2b-256 9a4d6572b5d27fe00e57d58823354f7d48823285cf7b3c97925b92e34abc3c5d

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