Skip to main content

Generate heatmap-like visualisations for benchmark data frames.

Project description

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.

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

funkyheatmappy-0.7.0.tar.gz (11.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

funkyheatmappy-0.7.0-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

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

Hashes for funkyheatmappy-0.7.0.tar.gz
Algorithm Hash digest
SHA256 d5ed12fc49d7b56348e04eae1dbeb0f5931469f0ca42623c229058ac07fecfcd
MD5 51089d4bd8b948a0e10efca97b8612e5
BLAKE2b-256 febbfb21de6d690fc8e9562b443ea4ac7143e647dd957031225607b728e3e968

See more details on using hashes here.

File details

Details for the file funkyheatmappy-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for funkyheatmappy-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c480355ea3c95ea072a0e7543b4fdab5ace60597f6dedccbf2474db8677b7a00
MD5 f3dc2500a39fbf4734d4b3d0dad6a2d2
BLAKE2b-256 28db0afa370afd53789a82122de2c0b96dc9b30a64725b8a26ef5083fcd20c11

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