Skip to content
datapartnershipPublic

About

Altair theme implementing the World Bank Group Data Visualization Style Guide.

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Attaviz

Publication-ready Altair themes, chart templates, and choropleth maps based on the World Bank Group Data Visualization Style Guide.

Documentation: https://datapartnership.github.io/attaviz/

Install

uv add attaviz
# or
pip install attaviz

Add the optional maps extra for choropleths: pip install "attaviz[maps]". Add the optional tables extra for styled Great Tables: pip install "attaviz[tables]".

Quick start

import pandas as pd
import attaviz

attaviz.enable()  # every chart now uses the WBG theme

data = pd.DataFrame(
    {"country": ["Indonesia", "Malaysia"], "population": [280, 35]}
)

chart = attaviz.bar(
    data,
    category="country",
    value="population",
    title="Population by country (millions)",
)

chart = attaviz.frame(
    chart,
    description="Population bars for Indonesia (280 million) and Malaysia (35 million).",
    source="Illustrative example data",
)

Set titles and subtitles on the chart template; apply frame() last for notes, source, byline, and accessibility metadata. See formatting examples for number and date formats in axes and tooltips.

See the documentation site for the full gallery and reference.

About

Altair theme implementing the World Bank Group Data Visualization Style Guide.

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

Generated from worldbank/template