Skip to main content

Tidy API for statistical visualization with Plotly

Project description

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 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

Examples

Main features of the API are demonstrated in a demo notebook.

Installation

Using Pip

pip install statsplotly

Development

Using Poetry

First make sure you have Poetry installed on your system (see instruction).

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).
  • clean clears bytecode, poetry/pip caches. Use with caution.

Documentation

Details of the public API can be found in the documentation.

Requirements

Author

Benjamin Roland

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

statsplotly-0.1.2.tar.gz (37.0 kB view details)

Uploaded Source

Built Distribution

statsplotly-0.1.2-py3-none-any.whl (42.4 kB view details)

Uploaded Python 3

File details

Details for the file statsplotly-0.1.2.tar.gz.

File metadata

  • Download URL: statsplotly-0.1.2.tar.gz
  • Upload date:
  • Size: 37.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.11.3 Darwin/19.6.0

File hashes

Hashes for statsplotly-0.1.2.tar.gz
Algorithm Hash digest
SHA256 56ed554bd145c7e67e92d899d0912c3ca755588ec7537a391e6d06fe673acaf2
MD5 1baa31a3f7b764db776ae7c64175bd04
BLAKE2b-256 72d50a6445b6f2b6c94a549e9bf4a9168a746c2a31dc479f70bf6fd3d42d9f95

See more details on using hashes here.

File details

Details for the file statsplotly-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: statsplotly-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 42.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.11.3 Darwin/19.6.0

File hashes

Hashes for statsplotly-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1a5c705205c2390b32e15a34e93a3561047103a318992d3ca69c877dd08be702
MD5 5007d9ccce6ca68e1945e2b43daa34d5
BLAKE2b-256 21469fafbf92deb7cf227c3cece9b7c4159de136f8f17cdaff653e05d256f4e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page