[![Python tests](https://github.com/pog87/PtitPrince/actions/workflows/python_tests.yml/badge.svg)](https://github.com/pog87/PtitPrince/actions/workflows/python_tests.yml)
[![Latest PyPI release](https://img.shields.io/pypi/v/ptitprince.svg)](https://pypi.org/project/ptitprince/)
[![Downloads](https://pepy.tech/badge/ptitprince)](https://pepy.tech/project/ptitprince)
[![Latest conda-forge release](https://img.shields.io/conda/vn/conda-forge/ptitprince.svg)](https://anaconda.org/conda-forge/ptitprince/)
[![Binder](https://img.shields.io/badge/binder%20tutorial-python-fb62f6.svg)](https://mybinder.org/v2/gh/RainCloudPlots/RainCloudPlots/master?filepath=tutorial_python%2Fraincloud_tutorial_python.ipynb)
# PtitPrince
A Python implementation of the "Raincloud plot"!
See: [https://github.com/RainCloudPlots/RainCloudPlots](https://github.com/RainCloudPlots/RainCloudPlots)
## Installation
You can install it via `pip`:
```
pip install ptitprince
```
or via `conda`:
```
conda install -c conda-forge ptitprince
```
or by cloning this repository and running the following from the root of it:
```
python setup.py install
```
## Academic use
To **cite Raincloud plots** please use the following information:
> Allen M, Poggiali D, Whitaker K et al. Raincloud plots: a multi-platform tool for robust data visualization [version 2; peer review: 2 approved]. Wellcome Open Res 2021, 4:63 (https://doi.org/10.12688/wellcomeopenres.15191.2)
![output](output_4_0.png)
## History of this project
This is a Python version of the "Raincloud plot" (or "PetitPrince plot", depending on the orientation) from R (under ggplot2) to Python.
The Raincloud plot is a variant of the violin plot written in R ggplot2 by [Micah Allen](https://web.archive.org/web/20210131133630/https://micahallen.org/2018/03/15/introducing-raincloud-plots/).
I found a tweet asking for a Python version of the Raincloud plot, and I agreed to give it a try.
Alas, the Python version for ggplot2 ([plotnine](https://github.com/has2k1/plotnine)) does not allow to create new styles in a comfortable way.
So I decided to write this package using the [seaborn](https://seaborn.pydata.org/) library as a foundation.
Then I replicated the plots from the original post by [Micah Allen](https://web.archive.org/web/20210131133630/https://micahallen.org/2018/03/15/introducing-raincloud-plots/), in Jupyter Notebooks and transformed that code into a Python package.
Since then, the package has received some publicity, and is for example listed in ["awesome-python-data-science"](https://github.com/thomasjpfan/awesome-python-data-science).
### Changelog
#### v.0.2.x
* PtitPrince now relies on seaborn 0.10 and numpy >= 1.13
* kwargs can be passed to the [cloud (default), boxplot, rain/stripplot, pointplot]
by preponing [cloud_, box_, rain_, point_] to the argument name.
* End of support for python2, now the support covers python>=3.6
## Plans for the future:
* ~~ask seaborn mantainers to add this new plot type~~ (not gonna happen)
* ~~add a "move" option in seabon to control the positioning of each plot, as in ggplot2.~~ (either, added in ptitprince)
* ~~get RainCloud published~~ (done!)
* add logarithmic density estimate (LDE) to the options for the cloud
* add the repeated measure feature
Raw data
{
"_id": null,
"home_page": "https://github.com/pog87/PtitPrince",
"name": "ptitprince",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "data visualization,raincloud plots",
"author": "Davide Poggiali",
"author_email": "davide.poggiali@unipd.it",
"download_url": "https://files.pythonhosted.org/packages/32/f2/04600e6dac80ff8bb05df961f99592825b5ae2d9fdd41dd918e196e1035c/ptitprince-0.2.7.tar.gz",
"platform": null,
"description": "[![Python tests](https://github.com/pog87/PtitPrince/actions/workflows/python_tests.yml/badge.svg)](https://github.com/pog87/PtitPrince/actions/workflows/python_tests.yml)\n[![Latest PyPI release](https://img.shields.io/pypi/v/ptitprince.svg)](https://pypi.org/project/ptitprince/)\n[![Downloads](https://pepy.tech/badge/ptitprince)](https://pepy.tech/project/ptitprince)\n[![Latest conda-forge release](https://img.shields.io/conda/vn/conda-forge/ptitprince.svg)](https://anaconda.org/conda-forge/ptitprince/)\n[![Binder](https://img.shields.io/badge/binder%20tutorial-python-fb62f6.svg)](https://mybinder.org/v2/gh/RainCloudPlots/RainCloudPlots/master?filepath=tutorial_python%2Fraincloud_tutorial_python.ipynb)\n\n# PtitPrince\n\nA Python implementation of the \"Raincloud plot\"!\nSee: [https://github.com/RainCloudPlots/RainCloudPlots](https://github.com/RainCloudPlots/RainCloudPlots)\n\n## Installation\n\nYou can install it via `pip`:\n\n```\npip install ptitprince\n```\n\nor via `conda`:\n\n```\nconda install -c conda-forge ptitprince\n```\n\nor by cloning this repository and running the following from the root of it:\n\n```\npython setup.py install\n```\n\n## Academic use\n\nTo **cite Raincloud plots** please use the following information:\n\n> Allen M, Poggiali D, Whitaker K et al. Raincloud plots: a multi-platform tool for robust data visualization [version 2; peer review: 2 approved]. Wellcome Open Res 2021, 4:63 (https://doi.org/10.12688/wellcomeopenres.15191.2)\n\n![output](output_4_0.png)\n\n## History of this project\n\nThis is a Python version of the \"Raincloud plot\" (or \"PetitPrince plot\", depending on the orientation) from R (under ggplot2) to Python.\nThe Raincloud plot is a variant of the violin plot written in R ggplot2 by [Micah Allen](https://web.archive.org/web/20210131133630/https://micahallen.org/2018/03/15/introducing-raincloud-plots/).\nI found a tweet asking for a Python version of the Raincloud plot, and I agreed to give it a try.\nAlas, the Python version for ggplot2 ([plotnine](https://github.com/has2k1/plotnine)) does not allow to create new styles in a comfortable way.\nSo I decided to write this package using the [seaborn](https://seaborn.pydata.org/) library as a foundation.\n\nThen I replicated the plots from the original post by [Micah Allen](https://web.archive.org/web/20210131133630/https://micahallen.org/2018/03/15/introducing-raincloud-plots/), in Jupyter Notebooks and transformed that code into a Python package.\n\nSince then, the package has received some publicity, and is for example listed in [\"awesome-python-data-science\"](https://github.com/thomasjpfan/awesome-python-data-science).\n\n### Changelog\n\n#### v.0.2.x\n\n * PtitPrince now relies on seaborn 0.10 and numpy >= 1.13\n * kwargs can be passed to the [cloud (default), boxplot, rain/stripplot, pointplot]\n by preponing [cloud_, box_, rain_, point_] to the argument name.\n * End of support for python2, now the support covers python>=3.6\n\n## Plans for the future:\n\n * ~~ask seaborn mantainers to add this new plot type~~ (not gonna happen)\n * ~~add a \"move\" option in seabon to control the positioning of each plot, as in ggplot2.~~ (either, added in ptitprince)\n * ~~get RainCloud published~~ (done!)\n * add logarithmic density estimate (LDE) to the options for the cloud\n * add the repeated measure feature\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python implementation of Rainclouds, originally on R, ggplot2. Written on top of seaborn.",
"version": "0.2.7",
"project_urls": {
"Homepage": "https://github.com/pog87/PtitPrince"
},
"split_keywords": [
"data visualization",
"raincloud plots"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "32f204600e6dac80ff8bb05df961f99592825b5ae2d9fdd41dd918e196e1035c",
"md5": "bf0cc367dea160517def509d9a0256a4",
"sha256": "bbd19d4f8615935ac1b750651907303913fbdddc3fe864c1cb80faa3a2a3acfb"
},
"downloads": -1,
"filename": "ptitprince-0.2.7.tar.gz",
"has_sig": false,
"md5_digest": "bf0cc367dea160517def509d9a0256a4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12190,
"upload_time": "2023-10-03T09:19:22",
"upload_time_iso_8601": "2023-10-03T09:19:22.554279Z",
"url": "https://files.pythonhosted.org/packages/32/f2/04600e6dac80ff8bb05df961f99592825b5ae2d9fdd41dd918e196e1035c/ptitprince-0.2.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-03 09:19:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pog87",
"github_project": "PtitPrince",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "ptitprince"
}