Skip to main content

image

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.

Metadata

Release files for funkyheatmappy 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for funkyheatmappy 0.7.0
File Size Uploaded
funkyheatmappy-0.7.0.tar.gz 11.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for funkyheatmappy 0.7.0
File Interpreter ABI Platform
funkyheatmappy-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 MB

Release files / funkyheatmappy-0.7.0.tar.gz

Download URL funkyheatmappy-0.7.0.tar.gz
Size 11.5 MB
Tags Source
SHA-256 checksum
How to use checksums
d5ed12fc49d7b56348e04eae1dbeb0f5931469f0ca42623c229058ac07fecfcd
BLAKE2b-256 checksum
How to use checksums
febbfb21de6d690fc8e9562b443ea4ac7143e647dd957031225607b728e3e968
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release files / funkyheatmappy-0.7.0-py3-none-any.whl

Download URL funkyheatmappy-0.7.0-py3-none-any.whl
Size 26.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c480355ea3c95ea072a0e7543b4fdab5ace60597f6dedccbf2474db8677b7a00
BLAKE2b-256 checksum
How to use checksums
28db0afa370afd53789a82122de2c0b96dc9b30a64725b8a26ef5083fcd20c11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page