Skip to main content

DriViz

driviz

CI/CD Tests Coverage Status Tests types - Mypy Ruff
Package PyPI PyPI - Downloads PyPI - Python Version GitHub

Documentation: https://dribia.github.io/driviz

Source Code: https://github.com/dribia/driviz


Installation

This project resides in the Python Package Index (PyPI), so it can easily be installed with pip:

pip install driviz

Usage

from driviz import theme

theme.enable()

Examples

import altair as alt
import numpy as np
import pandas as pd
import random
from driviz import theme

theme.enable()

variety =  [f"V{i}" for i in range(10)]
site = [f"site{i:02d}" for i in range(14)]
k = 10000
df = pd.DataFrame(
    data={
        "yield": np.random.rand(k,),
        "variety": random.choices(variety, k=k),
        "site": random.choices(site, k=k),
    }
)

selection = alt.selection_point(fields=["site"], bind="legend")

bars = (
    alt.Chart(df)
    .mark_bar()
    .encode(
        x=alt.X("sum(yield):Q", stack="zero"),
        y=alt.Y("variety:N"),
        color=alt.Color("site"),
        opacity=alt.condition(
            selection, alt.value(1), alt.value(0.2)
        )
    )
    .properties(title="Example chart")
    .add_params(selection)
)

text = (
    alt.Chart(df)
    .mark_text(dx=-15, dy=3, color="white")
    .encode(
        x=alt.X("sum(yield):Q", stack="zero"),
        y=alt.Y("variety:N"),
        detail="site:N",
        text=alt.Text("sum(yield):Q", format=".1f")
    )
)

chart = bars + text
chart.save(
    "altair_example_barh.html"
)

Contributing

Poetry is the best way to interact with this project, to install it, follow the official Poetry installation guide.

With poetry installed, one can install the project dependencies with:

make setup

Then, to run the project unit tests:

make test-unit

To run the linters (ruff and mypy):

make lint

To apply all code formatting:

make format

License

driviz is distributed under the terms of the MIT license. Check the LICENSE file for further details.

Metadata

Release files for driviz 0.6.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for driviz 0.6.4
File Size Uploaded Provenance Actions
driviz-0.6.4.tar.gz 203.1 kB Without provenance Details for driviz-0.6.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for driviz 0.6.4
File Interpreter ABI Platform Actions
driviz-0.6.4-py3-none-any.whl Python 3 none any Details for driviz-0.6.4-py3-none-any.whl

Total release size: 211.0 kB

Release files / driviz-0.6.4.tar.gz

Download URL driviz-0.6.4.tar.gz
Size 203.1 kB
Tags Source
SHA-256 checksum
How to use checksums
66856ae18b97cb26ec3c9d9bc71c1df775d0cac2580d5b3bbdf8a051eba6d051
BLAKE2b-256 checksum
How to use checksums
1467234ae80aa9984ff0e9c269ea0c0162c1d2bea406709b6290bfc2dc3da763
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / driviz-0.6.4-py3-none-any.whl

Download URL driviz-0.6.4-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7008c218e69a8bc5cbb72809c7546ce8ed7411b86c2291d276520cad9bf5e271
BLAKE2b-256 checksum
How to use checksums
c04b247bba8e476f20fa53827c17406b0a92d5d910b7146bfec2ff03036a5326
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for driviz 0.6.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page