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.

Examples

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

statsplotly-demo

Installation

Using Pip

pip install statsplotly

Documentation

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

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.

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.0.0.tar.gz (36.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: statsplotly-0.0.0.tar.gz
  • Upload date:
  • Size: 36.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1041-azure

File hashes

Hashes for statsplotly-0.0.0.tar.gz
Algorithm Hash digest
SHA256 32b584e5a94e79a8b3d51e2865b75980ca7a7d3147695adbc9a2b75e7525a6b6
MD5 93d9e0e2d941120e1e3db969854638b4
BLAKE2b-256 563445019a8ea8a37e084d844d6ea112a24e3e326bc466329ad7cf0896f9df43

See more details on using hashes here.

File details

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

File metadata

  • Download URL: statsplotly-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 42.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1041-azure

File hashes

Hashes for statsplotly-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 981b6d83ce58fdb073f7e01d4ff7e2b02fc51c3ce3f200304379b57414841780
MD5 d19c32c129180eaee4d92a177e58b9f7
BLAKE2b-256 82dc4c9c68b7d2fb6a62e7daef243462e69a9e0721f60ec1ef5d9ac1bff73a32

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