Metadata-Version: 2.4
Name: bakerviz
Version: 0.5.0
Summary: Cool, earthy charts and simple analysis helpers for pandas DataFrames.
Author: Kira Baker
License: MIT
Project-URL: Homepage, https://github.com/kirabakerlula/msds610_baker
Project-URL: Repository, https://github.com/kirabakerlula/msds610_baker
Keywords: pandas,matplotlib,visualization,data-analysis,charts
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=1.3
Requires-Dist: matplotlib>=3.5
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Dynamic: license-file

# bakerviz

Warm, earthy charts and simple analysis helpers for pandas DataFrames — built
on **pandas + matplotlib only**.

`bakerviz` gives you two things:

1. **A curated cool/earthy chart aesthetic** led by a slate blue, with ochre,
   sage, pine, plum, rose, and deep petrol/brick accents — a cooler, blue-leaning
   take on earth tones. Shapes lean soft and rounded — rounded bar corners and
   rounded line ends — for an organic feel.
2. **Simple analysis functions** that take a DataFrame and hand back plain
   pandas objects you can read, print, or plot.

![gallery](examples/gallery.png)

## Install

```bash
pip install -e .
```

## Quick start

```python
import pandas as pd
import bakerviz

df = pd.read_csv("my_data.csv")

# --- simple analysis (returns DataFrames) ---
bakerviz.overview(df)        # dtype, missing count/%, unique per column
bakerviz.summarize(df)       # count/mean/median/std/min/max per numeric column
bakerviz.top_values(df, "region", n=5)
bakerviz.correlations(df)    # numeric correlation matrix

# --- themed charts (return matplotlib fig, ax) ---
fig, ax = bakerviz.bar(df, x="region", y="sales")          # each bar a palette color; horizontal=True works too
fig, ax = bakerviz.line(df, x="month", y=["sales", "revenue"])
fig, ax = bakerviz.hist(df, "sales", bins=24)
fig, ax = bakerviz.scatter(df, "units", "sales", hue="rating")
fig, ax = bakerviz.corr_heatmap(df)

# --- creative infographics ---
fig, ax = bakerviz.waffle(df, "region")                    # parts-of-a-whole grid
fig, ax = bakerviz.streamgraph(df, x="month", ys=["North", "South", "East", "West"])

fig.savefig("chart.png")
```

Every plotting function returns the `(fig, ax)` pair, so you can keep
customizing with ordinary matplotlib, or pass your own `ax=` to draw into an
existing subplot grid.

## Using the theme on your own plots

```python
import matplotlib.pyplot as plt
import bakerviz

bakerviz.apply_theme()            # style all subsequent matplotlib plots
fig, ax = plt.subplots()
ax.plot([0, 1, 2], [3, 1, 4])

# The palette is available directly, too:
bakerviz.PALETTE      # ordered list of hex colors
bakerviz.COLORS       # named colors: COLORS["slate"], COLORS["ochre"], ...
```

`apply_theme()` also sets an editorial **serif** font (Georgia / Palatino /
Charter if installed, otherwise the bundled DejaVu Serif) to match the warm,
earthy palette.

## API

All functions live in the top-level `bakerviz` package.

**Analysis** — take a DataFrame, return pandas objects:
`overview`, `summarize`, `top_values`, `correlations`.

**Plots** — take a DataFrame, return `(fig, ax)`:
`bar`, `line`, `hist`, `scatter`, `corr_heatmap`,
plus the infographics `waffle` and `streamgraph`.

**Theme:** `apply_theme()`, plus `PALETTE` and `COLORS`.

## Development

```bash
pip install -e ".[dev]"
pytest
python examples/demo.py   # regenerate examples/gallery.png
```
