Metadata-Version: 2.4
Name: reporterly
Version: 2.0.0
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

`reporterly` 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

# Create a report
report = Report()

# Add figures with selection criteria
for year in [2020, 2021]:
    for country in ["Denmark", "Sweden"]:
        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}")

        # Add figures with their selection criteria
        report.add(
            selection={"year": year, "country": country},
            figure=[time_series, histogram],
        )

# 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 the reason no server or Python runtime is necessary when viewing the file. However, this also imposes some limitations on what you can do, since all figures are generated up front.
