Metadata-Version: 2.4
Name: reporterly
Version: 1.0.1
Summary: Add your description here
Project-URL: Repository, https://github.com/UlrikChristensenGit/reporterly.git
Requires-Python: >=3.10.8
Description-Content-Type: text/markdown
Requires-Dist: plotly>=6.7.0

# What is Reporterly

`reportly` is a Python package for turning a set of Plotly figures into a single standalone HTML file.

## Example

```py
from reporterly import Report
import plotly.graph_objects as go


def make_figures(year: int, country: str):
    time_series = go.Figure()
    time_series.add_trace(go.Scatter(x=[1, 2, 3], y=[4, 5, 6]))
    time_series.update_layout(title=f"Time Series for {country} in {year}")

    histogram = go.Figure()
    histogram.add_trace(go.Histogram(x=[1, 2, 2, 3, 3, 3]))
    histogram.update_layout(title=f"Histogram for {country} in {year}")

    return time_series, histogram


# Make report with all combinations of "year" and "country"
report = Report(
    callback=make_figures,
    year=[2020, 2021],
    country=["Denmark", "Sweden"],
)

# Write to HTML file
report.write_html("report.html")
```

**Output**

![alt text](docs/showcase.gif)

## Technical description

The HTML file is made by adding all figures to the file, and then using dropdown filters to determine which figures should be visible. This is there reason no server og Python runtime is necessary when viewing the file. However, this also imposes some limitations what you can, since all figures are generated up front.
