boxanova


Nameboxanova JSON
Version 0.1.12 PyPI version JSON
download
home_pagehttps://github.com/PascalHessler/BoxAnova
SummaryNone
upload_time2024-10-11 12:58:19
maintainerNone
docs_urlNone
authorPascalHessler
requires_python<4.0,>=3.11
licenseNone
keywords anova boxplot
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:

```bash
pip install BoxAnova
```

or Poetry
```bash
poetry add BoxAnova
```

## Usage

Here is a simple example of how to use BoxAnova:

```python
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](img.png)
### Options
There are some arguments you can set to change how the plots are generated:
- You can change orientation
```python 
box_anova = BoxAnova(df, variable='Value2', group='group', orient="V")
box_anova.generate_box_plot() 
```
![img_3.png](img_3.png)
- If you want using stars or exact values
```python 
box_anova = BoxAnova(df, variable='Value2', group='group', show_p_value=True)
box_anova.generate_box_plot() 
```
![img_1.png](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](img_2.png)


## Hue Argument
Finally, you can add a second group.
```python
box_anova.generate_box_plot(display='hue', hue="hue")
```
![img_5.png](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:

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

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


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PascalHessler/BoxAnova",
    "name": "boxanova",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": "anova, boxplot",
    "author": "PascalHessler",
    "author_email": "PascalHessler@outlook.de",
    "download_url": "https://files.pythonhosted.org/packages/82/28/be695d3954ddf3dcf3444a221d6b11cd78570e2a9c9bd18e5aa47e9fb523/boxanova-0.1.12.tar.gz",
    "platform": null,
    "description": "# BoxAnova\n\nBoxAnova 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.\n\n## Installation\n\nYou can install BoxAnova using pip:\n\n```bash\npip install BoxAnova\n```\n\nor Poetry\n```bash\npoetry add BoxAnova\n```\n\n## Usage\n\nHere is a simple example of how to use BoxAnova:\n\n```python\nfrom BoxAnova import BoxAnova\nimport pandas as pd\n\n# Load your data\ndf = pd.read_csv('your_data.csv')\n\n# Initialize BoxAnova with your DataFrame, the group column, and the value column\nbox_anova = BoxAnova(df, variable='Value2', group='group')\n\n# Plot the box plot with mean differences\nbox_anova.generate_box_plot()\n```\n![img.png](img.png)\n### Options\nThere are some arguments you can set to change how the plots are generated:\n- You can change orientation\n```python \nbox_anova = BoxAnova(df, variable='Value2', group='group', orient=\"V\")\nbox_anova.generate_box_plot() \n```\n![img_3.png](img_3.png)\n- If you want using stars or exact values\n```python \nbox_anova = BoxAnova(df, variable='Value2', group='group', show_p_value=True)\nbox_anova.generate_box_plot() \n```\n![img_1.png](img_1.png)\n- If N of the groups should be displayed   \n```python box_anova.generate_box_plot(fine_tuning_kws={\"show_n\": True}) ```\n![img_2.png](img_2.png)\n\n\n## Hue Argument\nFinally, you can add a second group.\n```python\nbox_anova.generate_box_plot(display='hue', hue=\"hue\")\n```\n![img_5.png](img_5.png)\n# Muli Box Anova\nThe 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. \nFor multiple box anova, you can use the `multiple_box_anova` function:\n\n```python\nfrom BoxAnova import multiple_box_anova\nimport pandas as pd\n\n# Load your data\ndf = pd.read_csv('your_data.csv')\n\n# Call the multiple_box_anova function\nmultiple_box_anova(variables=[\"first_variable\", \"second_variable\"], data=df, group=\"group\")\n```\n\nIn both versions you can add the hue argument.\n\n```python\nfrom BoxAnova import multiple_box_anova, BoxAnova\nimport pandas as pd\n\n# Load your data\ndf = pd.read_csv('your_data.csv')\n\n# BoxAnova\n# Initialize BoxAnova with your DataFrame, the group column, and the value column\nbox_anova = BoxAnova(df, variable='first_variable', group='group_column' )\n\n# Plot the box plot with hue\nbox_anova.plot_box_plot(hue=\"hue\")\n\n# Call the multiple_box_anova function\nmultiple_box_anova(variables=[\"first_variable\", \"second_variable\"], data=df, group=\"group_column\", hue=\"hue\")\n\n```\nThe multiple_box_anova does not require the initialization of the BoxAnova class\n\n# Experiemntal\n- Striplot in Boxplot BoxAnova(stripplot=True)\n- Violinplot alternativ zu Boxplot BoxAnova(violin=True)\n\n# Contributing\n\nContributions are welcome!\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": null,
    "version": "0.1.12",
    "project_urls": {
        "Homepage": "https://github.com/PascalHessler/BoxAnova",
        "Repository": "https://github.com/PascalHessler/BoxAnova"
    },
    "split_keywords": [
        "anova",
        " boxplot"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c61928ebb928f323fc6fd95b5b842f1f68178e1d06d2638395312a9bc3ea0239",
                "md5": "6bb9d1051bc5148f2ef23be288b48f5f",
                "sha256": "9278635b897ce13975a5ed1bb9b9f5294f0bf216cb984e916bbfd4b0f41770a5"
            },
            "downloads": -1,
            "filename": "boxanova-0.1.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6bb9d1051bc5148f2ef23be288b48f5f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 9532,
            "upload_time": "2024-10-11T12:58:18",
            "upload_time_iso_8601": "2024-10-11T12:58:18.229417Z",
            "url": "https://files.pythonhosted.org/packages/c6/19/28ebb928f323fc6fd95b5b842f1f68178e1d06d2638395312a9bc3ea0239/boxanova-0.1.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8228be695d3954ddf3dcf3444a221d6b11cd78570e2a9c9bd18e5aa47e9fb523",
                "md5": "55732de31c25c69b726ed5efdfa45aac",
                "sha256": "0b9d9b1f2d12a1e3623dea349b755ff14458afa44a64e48339311b27bd446bf9"
            },
            "downloads": -1,
            "filename": "boxanova-0.1.12.tar.gz",
            "has_sig": false,
            "md5_digest": "55732de31c25c69b726ed5efdfa45aac",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 8864,
            "upload_time": "2024-10-11T12:58:19",
            "upload_time_iso_8601": "2024-10-11T12:58:19.808250Z",
            "url": "https://files.pythonhosted.org/packages/82/28/be695d3954ddf3dcf3444a221d6b11cd78570e2a9c9bd18e5aa47e9fb523/boxanova-0.1.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-11 12:58:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PascalHessler",
    "github_project": "BoxAnova",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "boxanova"
}
        
Elapsed time: 0.49356s