Generate heatmap-like visualisations for benchmark data frames.
Project description
Funkyheatmappy
Funkyheatmap in Python: Generating Funky Heatmaps for Data Frames
Installation
You can install funkyheatmappy from GitHub using the following command:
pip install funkyheatmappy
Usage
We use the mtcars dataset to demonstrate the usage of the funkyheatmappy package.
import funkyheatmappy
import pandas as pd
mtcars = pd.read_csv("./test/data/mtcars.csv")
You can visualise the dataset as follows:
mtcars = mtcars.rename(columns={"Unnamed: 0": "id"})
funkyheatmappy.funky_heatmap(mtcars)
However, it's easy to add some more information and style the plot better:
column_lists = [
["id", "group", "name", "geom", "options", "palette"],
["id", np.nan, "", "text", {"ha": 0, "width": 6}, np.nan],
["mpg", "overall", "Miles / gallon", "bar", {"width": 4, "legend": False}, "palette1"],
["cyl", "overall", "Number of cylinders", "bar", {"width": 4, "legend": False}, "palette2"],
["disp", "group1", "Displacement (cu.in.)", "funkyrect", dict(), "palette1"],
["hp", "group1", "Gross horsepower", "funkyrect", dict(), "palette1"],
["drat", "group1", "Rear axle ratio", "funkyrect", dict(), "palette1"],
["wt", "group1", "Weight (1000 lbs)", "funkyrect", dict(), "palette1"],
["qsec", "group2", "1/4 mile time", "circle", dict(), "palette2"],
["vs", "group2", "Engine", "circle", dict(), "palette2"],
["am", "group2", "Transmission", "circle", dict(), "palette2"],
["gear", "group2", "# Forward gears", "circle", dict(), "palette2"],
["carb", "group2", "# Carburetors", "circle", dict(), "palette2"],
]
column_info = pd.DataFrame(column_lists[1:], columns=column_lists[0])
column_info.index = column_info["id"]
column_groups = pd.DataFrame(columns=["Category", "group", "palette"],
data = [["Overall", "overall", "palette1"],
["Group1", "group1", "palette1"],
["Group2", "group2", "palette2"]]
)
funkyheatmappy.funky_heatmap(mtcars, column_info = column_info, column_groups = column_groups)
Documentation
Reference documentation is available at funkyheatmap.github.io/funkyheatmappy.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 funkyheatmappy-0.7.0.tar.gz.
File metadata
- Download URL: funkyheatmappy-0.7.0.tar.gz
- Upload date:
- Size: 11.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5ed12fc49d7b56348e04eae1dbeb0f5931469f0ca42623c229058ac07fecfcd
|
|
| MD5 |
51089d4bd8b948a0e10efca97b8612e5
|
|
| BLAKE2b-256 |
febbfb21de6d690fc8e9562b443ea4ac7143e647dd957031225607b728e3e968
|
File details
Details for the file funkyheatmappy-0.7.0-py3-none-any.whl.
File metadata
- Download URL: funkyheatmappy-0.7.0-py3-none-any.whl
- Upload date:
- Size: 26.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c480355ea3c95ea072a0e7543b4fdab5ace60597f6dedccbf2474db8677b7a00
|
|
| MD5 |
f3dc2500a39fbf4734d4b3d0dad6a2d2
|
|
| BLAKE2b-256 |
28db0afa370afd53789a82122de2c0b96dc9b30a64725b8a26ef5083fcd20c11
|