Skip to main content

No project description provided

Project description

BoxAnova

BoxAnova is a Python package built on top of Seaborn Boxplots. Its main purpose is to create Boxplots with additional significance information. By using ANOVAs to evaluate if group and hue differences are significant, it adds significance information to the plot.

Installation

You can install BoxAnova using pip:

pip install BoxAnova

or Poetry

poetry add BoxAnova

Usage

Here is a simple example of how to use BoxAnova:

from BoxAnova import BoxAnova
import pandas as pd

# Load your data
df = pd.read_csv('your_data.csv')

# Initialize BoxAnova with your DataFrame, the group column, and the value column
box_anova = BoxAnova(df, variable='Value2', group='group')

# Plot the box plot with mean differences
box_anova.generate_box_plot()

img.png

Options

There are some arguments you can set to change how the plots are generated:

  • You can change orientation
box_anova = BoxAnova(df, variable='Value2', group='group', orient="V")
box_anova.generate_box_plot() 

img_3.png

  • If you want using stars or exact values
box_anova = BoxAnova(df, variable='Value2', group='group', show_p_value=True)
box_anova.generate_box_plot() 

img_1.png

  • If N of the groups should be displayed
    python box_anova.generate_box_plot(fine_tuning_kws={"show_n": True}) img_2.png

Hue Argument

Finally, you can add a second group.

box_anova.generate_box_plot(display='hue', hue="hue")

img_5.png

Muli Box Anova

The main idea is you might want to genreate multiple plots at once. MultipleBOxAnova supports all functions of BoxAnova in addition it allows for multiple Variables. For multiple box anova, you can use the multiple_box_anova function:

from BoxAnova import multiple_box_anova
import pandas as pd

# Load your data
df = pd.read_csv('your_data.csv')

# Call the multiple_box_anova function
multiple_box_anova(variables=["first_variable", "second_variable"], data=df, group="group")

In both versions you can add the hue argument.

from BoxAnova import multiple_box_anova, BoxAnova
import pandas as pd

# Load your data
df = pd.read_csv('your_data.csv')

# BoxAnova
# Initialize BoxAnova with your DataFrame, the group column, and the value column
box_anova = BoxAnova(df, variable='first_variable', group='group_column' )

# Plot the box plot with hue
box_anova.plot_box_plot(hue="hue")

# Call the multiple_box_anova function
multiple_box_anova(variables=["first_variable", "second_variable"], data=df, group="group_column", hue="hue")

The multiple_box_anova does not require the initialization of the BoxAnova class

Experiemntal

  • Striplot in Boxplot BoxAnova(stripplot=True)
  • Violinplot alternativ zu Boxplot BoxAnova(violin=True)

Contributing

Contributions are welcome!

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

boxanova-0.1.12.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

boxanova-0.1.12-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file boxanova-0.1.12.tar.gz.

File metadata

  • Download URL: boxanova-0.1.12.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.9 Windows/10

File hashes

Hashes for boxanova-0.1.12.tar.gz
Algorithm Hash digest
SHA256 0b9d9b1f2d12a1e3623dea349b755ff14458afa44a64e48339311b27bd446bf9
MD5 55732de31c25c69b726ed5efdfa45aac
BLAKE2b-256 8228be695d3954ddf3dcf3444a221d6b11cd78570e2a9c9bd18e5aa47e9fb523

See more details on using hashes here.

File details

Details for the file boxanova-0.1.12-py3-none-any.whl.

File metadata

  • Download URL: boxanova-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.9 Windows/10

File hashes

Hashes for boxanova-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 9278635b897ce13975a5ed1bb9b9f5294f0bf216cb984e916bbfd4b0f41770a5
MD5 6bb9d1051bc5148f2ef23be288b48f5f
BLAKE2b-256 c61928ebb928f323fc6fd95b5b842f1f68178e1d06d2638395312a9bc3ea0239

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