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.1.tar.gz (5.3 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.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tooltree-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9c00fbbba8a141fc8faada56d01841c4d05643521926d4ac192a5a6289069b2b
MD5 0d7da22406ceb4888aea311a992f0dc7
BLAKE2b-256 66fc1379a1f0722e78720faa1eb9311f6c50a360f0b2a0dffb68e88be096e67e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tooltree-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6a64ad4ddaef619eef6600fedb51a4c91643914393a0a5fa6c56d42e95e52a34
MD5 66182b86c47d23811c3507b8858d71e5
BLAKE2b-256 6909157a5ddfa932717d477be87bdfbc9ad6ddf7dd82d5c0c6b552b17f409228

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