Metadata-Version: 2.3
Name: diaplot
Version: 0.1.1
Summary: Simple data visualisation library that automatically styles matplotlib plots.
Project-URL: Homepage, https://github.com/dJonaitis/diaplot
Project-URL: Documentation, https://github.com/dJonaitis/diaplot#readme
Project-URL: Repository, https://github.com/dJonaitis/diaplot
Project-URL: Issues, https://github.com/dJonaitis/diaplot/issues
Author-email: Danielius Jonaitis <jonaitisdanielius@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Danielius Jonaitis
        
        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.
License-File: LICENSE
Keywords: charts,economist,plotting,publication,visualization
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.8
Requires-Dist: matplotlib>=3.5.0
Requires-Dist: numpy>=1.20.0
Requires-Dist: pandas>=1.3.0
Provides-Extra: dev
Requires-Dist: jupyter>=1.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Provides-Extra: maps
Requires-Dist: cartopy>=0.21.0; extra == 'maps'
Requires-Dist: geopandas>=0.12.0; extra == 'maps'
Description-Content-Type: text/markdown

# Diaplot

Diaplot provides a simple endpoint for generating visually appealing plots inspired by The Economist.

## Features
- Line plot
- Bar chart
- Parliament visualisation
- Scatter plot

## Planned features
- Map visualisations
    - Chloropleth
    - Bubble maps
    - Arc maps
    - Drawing geometry over maps

![RPE in Chile](images/chile_sample.png)

## Installation

```bash
pip install diaplot
```

## Quick Start

### Line Chart

```python
from diaplot import line_chart
import numpy as np

# Create chart
fig, ax = line_chart(
    x=years,
    y=values,
    title="Economic Growth Over Time",
    subtitle="Annual GDP growth rate, 1960-2020",
    source="Source: World Bank",
    color='#006BA2',  # Economist blue
    event_markers=[1970, 1973, 2008],  # Mark recession years
)
```

### Bar Chart

```python
from diaplot import bar_chart

categories = ['2018', '2019', '2020', '2021', '2022']
values = [45, 52, 48, 61, 55]

fig, ax = bar_chart(
    x=categories,
    y=values,
    title="Annual Revenue",
    subtitle="Revenue in millions, 2018-2022",
    source="Source: Company Reports",
    color='#DB0A05',  # Economist red
    reference_lines=[50],  # Add target line
)
```
