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.2.tar.gz
(5.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tooltree-0.1.2.tar.gz.
File metadata
- Download URL: tooltree-0.1.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
166daf842966d031608587b8423a6402b435b11bb5f5de9222137245f428538c
|
|
| MD5 |
42f96cce0146846dc0151af84fc7674f
|
|
| BLAKE2b-256 |
bd984814011fd3d4427a1838679059a455b0b11a65f5b140110174df5687585b
|
File details
Details for the file tooltree-0.1.2-py3-none-any.whl.
File metadata
- Download URL: tooltree-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
687abb5f3723174345daaba373cb8560e11232db8b912c1ff7b68c3c646d067b
|
|
| MD5 |
d8a5aaafe446bd4bc5591692fad6eeb3
|
|
| BLAKE2b-256 |
05518a5d819300ad41c767e1cdd8355105887c64f5d87261d9183ca0a6d1dcd8
|