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:
funkyheatmappy.funkyheatmap(mtcars)
However, it's easy to add some more information and style the plot better:
mtcars = mtcars.rename(columns={"Unnamed: 0": "id"})
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", "overall"],
["Group1", "group1", "palette1"],
["Group2", "group2", "palette2"]]
)
funkyheatmappy.funkyheatmap(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
funkyheatmappy-0.1.0.tar.gz
(10.5 MB
view details)
Built Distribution
File details
Details for the file funkyheatmappy-0.1.0.tar.gz
.
File metadata
- Download URL: funkyheatmappy-0.1.0.tar.gz
- Upload date:
- Size: 10.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 158b82d2a6873cbac591d7821d83720da6df222d400c5832486bf491924a6dba |
|
MD5 | 848ef7d797fcd595c4a84498ed6e71ab |
|
BLAKE2b-256 | 2b5a4c0924ab7e069c82291261bda8cc3988ebd7d0060aed682f3e649bb00862 |
File details
Details for the file funkyheatmappy-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: funkyheatmappy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 21.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | daaf90e4a74e3b2cc9ec0e57c909060e9fb9642bbedc7fe3580260008eed3a22 |
|
MD5 | dc1db0dfa28cbb07a0f3e73bf426c2b9 |
|
BLAKE2b-256 | dea702588ed06b833fd2ff75d6e2eb64ffe4414c0f5aa33f32099996afbf1482 |