Skip to main content

tidydraws

tidydraws logo

A tidybayes-inspired data layer for declarative Bayesian visualisation in Python

tidydraws turns MCMC output (ArviZ DataTree) into tidy Polars frames that are ready to plot — one .to_pandas() away from any ggplot-like backend. It does no plotting itself. Three functions, three spaces:

Function Space Plot archetype
parameter_draws() parameter density, forest, scatter
prediction_draws() prediction ribbon + line, fit + data
compare_draws() comparison prior vs posterior, intervals

tidydraws example

Install

With uv:

uv add tidydraws

With pip:

pip install tidydraws

Why tidydraws?

Plotting MCMC output in Python means manually slicing xarray dimensions, iterating groups, and aligning coordinates — imperative, verbose, error-prone. R's tidybayes solved this with a data layer that respects parameter space vs prediction space. tidydraws brings that to Python on Polars.

Backend-agnostic: tidydraws returns Polars DataFrames. Call .to_pandas() to bridge to lets-plot, plotnine, or any library that takes pandas. See the examples for both lets-plot and plotnine versions.


Inspired by tidybayes for R.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tidydraws-0.2.0.tar.gz (417.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tidydraws-0.2.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file tidydraws-0.2.0.tar.gz.

File metadata

  • Download URL: tidydraws-0.2.0.tar.gz
  • Upload date:
  • Size: 417.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for tidydraws-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c427ea177a86e998d1179e8e893a9181fbc097ae51dd6060fb9ffe4ac5ab524d
MD5 9c5d580a2d51d124603484dfb0fec093
BLAKE2b-256 2c45384e44db299815d09ccd62090ca9cf9f36a7ae81c6a76819d3096335bec9

See more details on using hashes here.

Provenance

The following attestation bundles were made for tidydraws-0.2.0.tar.gz:

Publisher: publish.yml on drbenvincent/tidydraws

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tidydraws-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: tidydraws-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for tidydraws-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf4d3849bd06285e7534088a0182e108c00068bece662e24b7b8ce70f9d86773
MD5 cfb6feec0c26ac9e4ef139eecd5b4704
BLAKE2b-256 dd898469991cb842144be5764ec4b309eed366b449a845ae2f5e3fc4d28c807b

See more details on using hashes here.

Provenance

The following attestation bundles were made for tidydraws-0.2.0-py3-none-any.whl:

Publisher: publish.yml on drbenvincent/tidydraws

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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