Metadata-Version: 2.3
Name: funkyheatmappy
Version: 0.7.0
Summary: Generate heatmap-like visualisations for benchmark data frames.
Project-URL: documentation, https://funkyheatmap.github.io/funkyheatmappy/
Project-URL: Homepage, https://github.com/funkyheatmap/funkyheatmappy
Project-URL: Source, https://github.com/funkyheatmap/funkyheatmappy
Author-email: Louise Deconinck <louise.deconinck@gmail.com>, Artuur Couckuyt <artuur_couckuyt@hotmail.com>
Maintainer-email: Louise Deconinck <louise.deconinck@gmail.com>, Artuur Couckuyt <artuur_couckuyt@hotmail.com>
License: The MIT License (MIT)
        
        Copyright (c) 2023 Artuur Couckuyt
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of
        this software and associated documentation files (the "Software"), to deal in
        the Software without restriction, including without limitation the rights to
        use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
        the Software, and to permit persons to whom the Software is furnished to do so,
        subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
        FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
        COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
        IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
        CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: pandas
Provides-Extra: doc
Requires-Dist: sphinx; extra == 'doc'
Requires-Dist: sphinx-autoapi; extra == 'doc'
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Description-Content-Type: text/markdown

<img
  src="https://raw.githubusercontent.com/funkyheatmap/logo/refs/heads/main/src/attempt1/funkyheatmap_edited.svg"
  class="dark-light" align="right" width="150" alt="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.

```python
import funkyheatmappy
import pandas as pd

mtcars = pd.read_csv("./test/data/mtcars.csv")
```

You can visualise the dataset as follows:

```python
mtcars = mtcars.rename(columns={"Unnamed: 0": "id"})

funkyheatmappy.funky_heatmap(mtcars)
```
<img src="figures/mtcars_basic.png" width="75%" />

However, it's easy to add some more information and style the plot better:

```python
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)
```

<img src="figures/mtcars_column_info.png" width="75%" />

## Documentation

Reference documentation is available at [funkyheatmap.github.io/funkyheatmappy](https://funkyheatmap.github.io/funkyheatmappy/).

