Metadata-Version: 2.5
Name: chartbook
Version: 0.2.0
Summary: A tool for generating chart documentation websites
Project-URL: Documentation, https://backofficedev.github.io/chartbook
Project-URL: Issues, https://github.com/backofficedev/chartbook/issues
Project-URL: Source, https://github.com/backofficedev/chartbook
Author-email: Jeremiah Bejarano <Jeremiah.Bejarano@gmail.com>
License-Expression: BSD-3-Clause
License-File: LICENSE.md
Keywords: Analytics,Catalogs,Dashboards,Data
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.10
Requires-Dist: ablog>=0.11.11
Requires-Dist: click>=8.1.7
Requires-Dist: cookiecutter>=2.2
Requires-Dist: cruft
Requires-Dist: duckdb>=1.4
Requires-Dist: fredapi>=0.5.0
Requires-Dist: jinja2>=3.1.4
Requires-Dist: kaleido>=0.2.1
Requires-Dist: linkify-it-py>=2.0.3
Requires-Dist: markdown-it-py>=3.0.0
Requires-Dist: matplotlib>=3.7.0
Requires-Dist: myst-nb>=1.1.2
Requires-Dist: myst-parser>=2.0.0
Requires-Dist: packaging
Requires-Dist: pandas-datareader>=0.10.0
Requires-Dist: pandas>=2.1.4
Requires-Dist: plotly>=5.24.0
Requires-Dist: pluggy>=1.3.0
Requires-Dist: polars>=1.20
Requires-Dist: pyarrow
Requires-Dist: pydata-sphinx-theme>=0.15.4
Requires-Dist: python-decouple>=3.8
Requires-Dist: sphinx-autodoc2>=0.5.0
Requires-Dist: sphinx-book-theme>=1.1.3
Requires-Dist: sphinx-copybutton>=0.5.2
Requires-Dist: sphinx-design>=0.6.1
Requires-Dist: sphinx-external-toc>=1.0.1
Requires-Dist: sphinx<10,>=7.2.6
Requires-Dist: tomli-w>=1.1.0
Requires-Dist: tomli>=2.2.1
Provides-Extra: databricks
Requires-Dist: databricks-sql-connector[pyarrow]>=4.0; extra == 'databricks'
Provides-Extra: mkdocs
Requires-Dist: mkdocs-jupyter>=0.25; extra == 'mkdocs'
Requires-Dist: mkdocs-material>=9.5; extra == 'mkdocs'
Requires-Dist: mkdocs>=1.6; extra == 'mkdocs'
Provides-Extra: s3
Requires-Dist: boto3>=1.28; extra == 's3'
Description-Content-Type: text/markdown

# ChartBook

A developer platform for data science teams.

[![PyPI - Version](https://img.shields.io/pypi/v/chartbook?logo=pypi)](https://pypi.org/project/chartbook)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/chartbook?logo=python)](https://pypi.org/project/chartbook)
[![GitHub Stars](https://img.shields.io/github/stars/backofficedev/chartbook?style=flat&logo=github)](https://github.com/backofficedev/chartbook)
[![Documentation](https://img.shields.io/badge/docs-backofficedev.github.io%2Fchartbook-blue)](https://backofficedev.github.io/chartbook/)

Discover, document, and share data science work across your organization. ChartBook provides a centralized catalog for data pipelines, charts, and documentation—making it easy to find, understand, and reuse analytics work.

## Installation

```bash
pip install chartbook
```

One install, everything included: data loading, plotting utilities, and the CLI for building documentation.

## Quick Start

### Load data from a pipeline

```python
from chartbook import data

df = data.load(pipeline="fred_charts", dataframe="fred")
```

### Build documentation

```bash
chartbook docs generate
chartbook docs generate -f --watch    # rebuild as you edit; refresh the browser
```

### Check a project in CI

```bash
chartbook check               # fails on broken paths, expiring licenses, and fields a [policy] requires
```

### Ask the manifest where a file belongs

```bash
chartbook path repo_public          # the path chartbook.toml declares for that dataframe
chartbook path chart/repo_rates     # ...and for that chart
```

```python
from chartbook import assets, data

df.to_parquet(data.path("repo_public"))            # a dataframe
fig.write_html(assets.path("chart/repo_rates"))    # anything else says its kind
```

### Declare a trained model

```toml
[models.rate_forecaster]
path = "./_models/rate_forecaster.joblib"
trained_on = ["repo_public"]
metrics_path = "./_output/rate_forecaster_metrics.json"
```

```python
from chartbook import models

joblib.dump(model, models.path("rate_forecaster"))  # the model gets a page: scores, lineage
```

### Browse your catalog

```bash
# List all pipelines, dataframes, and charts
chartbook ls

# List dataframes only
chartbook ls dataframes

# Get path to a dataframe's parquet file
chartbook data get-path --pipeline fred_charts --dataframe fred
```

See the [documentation](https://backofficedev.github.io/chartbook) for configuration options and detailed guides.

## Terminology

ChartBook supports two project types:

- **Pipeline** — A single analytics pipeline with its own charts, dataframes, and documentation
- **Catalog** — A collection of multiple pipelines aggregated into a unified documentation site

See [Documenting a Pipeline](https://backofficedev.github.io/chartbook/guide/documenting-a-pipeline.html) and [Catalogs and Data Access](https://backofficedev.github.io/chartbook/guide/catalogs-and-data.html) for how the two fit together, and [Vocabulary](https://backofficedev.github.io/chartbook/guide/vocabulary.html) for the words ChartBook uses: a manifest asks, a lockfile records what was got, a snapshot records what was made, and an index records what a site shows.

## Features

- **Pipeline Catalog** — Organize and discover data pipelines across your team
- **Documentation Generation** — Build searchable documentation websites from your analytics work
- **Data Governance** — Track data sources, licenses, and access permissions
- **Programmatic Data Access** — Load pipeline outputs directly into pandas or polars
- **Multi-Pipeline Catalogs** — Aggregate multiple pipelines into a single documentation site

## Documentation

Full documentation is available at [backofficedev.github.io/chartbook](https://backofficedev.github.io/chartbook).

- [Getting Started](https://backofficedev.github.io/chartbook/getting-started.html)
- [Configuration Reference](https://backofficedev.github.io/chartbook/reference/configuration.html)
- [CLI Reference](https://backofficedev.github.io/chartbook/reference/cli.html)

## Contributing

Contributions are welcome. See [CONTRIBUTING](https://backofficedev.github.io/chartbook/contributing.html) for guidelines.

To work on ChartBook itself you need [uv](https://docs.astral.sh/uv/) and nothing else. From a clone:

```bash
uv sync          # the project, editable, and its dev toolchain, from uv.lock
uv run doit      # notebooks, docs, examples, the package, then the test matrix
```

`uv run doit build_package` is the same without the tests, and `uv run doit test` is the suite on one Python.

## License

Modified BSD License