Metadata-Version: 2.1
Name: statsplotly
Version: 0.1.2
Summary: Tidy API for statistical visualization with Plotly
Home-page: https://github.com/parici75/statsplotly
License: BSD-3-Clause
Author: Benjamin Roland
Author-email: benjamin.roland@hotmail.fr
Requires-Python: >=3.11,<4.0
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: ipykernel (>=6.24.0,<7.0.0)
Requires-Dist: jupyter (>=1.0.0,<2.0.0)
Requires-Dist: plotly (>=5.15.0,<6.0.0)
Requires-Dist: poetry-dynamic-versioning[plugin] (>=0.25.0,<0.26.0)
Requires-Dist: pydantic (>=2.0,<3.0)
Requires-Dist: seaborn (>=0.12.2,<0.13.0)
Project-URL: Documentation, https://parici75.github.io/statsplotly/
Description-Content-Type: text/markdown

[Statsplotly](https://github.com/parici75/statsplotly) is a Python data visualization library based on Plotly. It provides a high-level interface for drawing attractive and interactive statistical data visualization plots.

The inception of this library predated the fantastic [plotly.express](https://plotly.com/python/plotly-express/) API.


Philosophy
-
Compared to `plotly.express` API, `statsplotly` :
- respects common conventions of statistical visualization (e.g., histograms are not barplots).
- processes color coding scheme, trace slicer and plot dimensions independently.
- can perform standard statistical processing procedure (e.g., zscore normalization) of data under the hood.
- leverages the tidy DataFrame structure to easily style plot cues to be used as visual discriminators (e.g., marker color, symbol, size, and opacity).


This flexibility takes advantage of the powerful interactivity offered by `plotly.js` without compromising statistical intelligibility for aesthetic choices, or vice-versa.

![statsplotly-demo](statsplotly-demo.gif)

Examples
-
Main features of the API are demonstrated in a demo [notebook](https://nbviewer.org/github/parici75/statsplotly/blob/main/docs/notebooks/statsplotly_demo.ipynb).

Installation
-
### Using Pip

`pip install statsplotly`


Development
-
### Using Poetry
First make sure you have Poetry installed on your system (see [instruction](https://python-poetry.org/docs/#installing-with-the-official-installer)).

Then, assuming you have a Unix shell with make, create and set up a new Poetry environment :

`make init`

To make the Poetry-managed kernel available for a globally installed Jupyter :
```
$ poetry run ipython kernel install --user --name=<KERNEL_NAME>
$ jupyter notebook
```
On the Jupyter Server, select the created kernel in “Kernel” -> “Change kernel”.

### Dissecting Makefile
The Makefile provides several targets to assist in development and code quality :
- `init` creates a project-specific virtual environment and installs the dependencies of the .lock file.
- `ci` launches Black, Ruff, mypy and pytest on your source code.
- `pre-commit` set up pre-commit hooks (see pre-commit [documentation](https://pre-commit.com/)).
- `clean` clears bytecode, poetry/pip caches. Use with caution.


Documentation
-
Details of the public API can be found in the [documentation](https://parici75.github.io/statsplotly).


Requirements
-
- [Plotly](https://plotly.com/python/)


Author
-
[Benjamin Roland](benjamin.roland@hotmail.fr)

