Metadata-Version: 2.4
Name: datavizlib
Version: 1.0.0
Summary: Opinionated matplotlib-based library for clean, presentation-ready charts and visual storytelling.
Author-email: Philipp Melzer <philipp.melzer@outlook.com>, Tejas Kale <kaletejas2006@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Philipp Melzer
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Repository, https://github.com/phmelzer/datavizlib
Keywords: data visualization,matplotlib,charting,plotting
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib>=3.8
Requires-Dist: pandas>=2.0
Dynamic: license-file

# 📊 datavizlib

Tools and practical guidance for creating clear, effective data visualizations.

The knowledge explains the reasoning behind visualization design choices; the
library makes those choices easier to apply. Explore
[principles, techniques, checklists, and visualization guidance](knowledge/README.md),
then put them into practice with opinionated, Matplotlib-based defaults for
layout, typography, and color.

Build line and bar charts with less repetitive formatting code than using
Matplotlib directly, while keeping the underlying figure and axes accessible for
customization. Use an exploratory look while analyzing data, then switch to a
presentation look to communicate your findings.

## Installation

Requires Python 3.12 or newer.

Install from PyPI:

```bash
pip install datavizlib
```

Or install locally for development from a cloned repository:

```bash
uv sync
```

`uv sync` installs the package in editable mode along with the dev tools
(pytest, pre-commit, Jupyter). With pip 25.1 or newer, use
`pip install -e . --group dev` instead.

## Quick Start

Create a horizontal bar chart and highlight the leading region in sales:

```python
import pandas as pd

from datavizlib import BarChart

df_sales = pd.DataFrame({
    "region": ["North", "South", "East", "West"],
    "actual": [1250, 980, 1420, 1680],
})

chrome = dict(
    title="West leads regional sales",
    subtitle="Regional sales in USD thousands, 2024",
    value_label="Sales (USD thousands)",
    footnote="Source: illustrative data.",
)

chart = BarChart(**chrome, orientation="horizontal", look="explain")
(
    chart
    .add_data(df_sales, category="region", value="actual", color="#D3D3D3")
    .highlight(categories=["West"], color="#00005F")
    .show()
)
```

The default `look="explain"` requires a title, subtitle, and footnote; use
`look="explore"` when those aren't needed.

For more examples, explore the demo notebooks:

- [Bar charts](snippets/bar_chart_demo.ipynb): grouped and stacked bars,
  orientation, category ordering, and highlighting.
- [Line charts](snippets/line_chart_demo.ipynb): comparisons, end labels, and
  point markers.


## Contributing

Contributions to both the library and visualization guidance are welcome.
Have a question, suggestion, or idea for a contribution?
[Open an issue](https://github.com/phmelzer/datavizlib/issues) to get in touch.

## License

`datavizlib` is released under the MIT License. See [LICENSE](LICENSE) for details.
