Metadata-Version: 2.4
Name: evoeulerap
Version: 1.0.0
Summary: EvoEulerAP: Evolving Area-Proportional Euler and Venn Diagrams with Specific Properties
Author-email: Chi Ho Chan <c.chan3@napier.ac.uk>, Peter Chapman <p.chapman@napier.ac.uk>, Kevin Sim <k.sim@napier.ac.uk>, Ben Paechter <b.paechter@napier.ac.uk>
Maintainer-email: Chi Ho Chan <c.chan3@napier.ac.uk>
License-Expression: GPL-3.0-only
Project-URL: Repository, https://github.com/superchchan/evoeulerap
Keywords: Euler Diagrams,Venn Diagrams,Area-Proportional,Set Visualization,Multi-Objective Optimization
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: <3.12,>=3.10
Description-Content-Type: text/markdown
License-File: COPYING
Requires-Dist: streamlit==1.46.1
Requires-Dist: numpy<1.24,>=1.18
Requires-Dist: pandas==2.3.1
Requires-Dist: matplotlib==3.10.3
Requires-Dist: plotly==6.2.0
Requires-Dist: shapely==2.1.1
Requires-Dist: Pillow==11.3.0
Requires-Dist: pymoo==0.6.1.5
Provides-Extra: dev
Requires-Dist: mypy==1.19.1; extra == "dev"
Requires-Dist: ruff==0.14.10; extra == "dev"
Requires-Dist: pandas-stubs==2.3.3.251219; extra == "dev"
Requires-Dist: types-shapely==2.1.0.20250917; extra == "dev"
Provides-Extra: experiment
Requires-Dist: playwright; extra == "experiment"
Dynamic: license-file

# EvoEulerAP: Evolving Area-Proportional Euler and Venn Diagrams with Specific Properties
To the best of our knowledge, EvoEulerAP is the first area-proportional Euler and Venn diagram generation method that returns a set of non-dominated solutions (diagrams). Before optimization, a single shape type (an ellipse or an arbitrary simple closed shape with smoothing applied where possible) has to be chosen as the curve shape for all diagrams. Each solution is evaluated with six objectives (stress, missing zone, unwanted zone, triple point, concurrency, and disconnected zone) that together minimize area error and violations of well-matchedness and well-formedness properties.

EvoEulerAP is available as a Python package with both a web interface and an application programming interface (API). It extends [EvoEuler](https://github.com/superchchan/evoeuler), which generates non-area-proportional Euler and Venn diagrams with specific properties.

## Installation
Run the following command to install EvoEulerAP:
```bash
pip install evoeulerap
```

## Web Interface
Run the following command to launch the web interface:
```bash
evoeulerap
```

![EvoEulerAP Web Interface](https://raw.githubusercontent.com/superchchan/evoeulerap/main/EvoEulerAP.png)

## API
The example below shows the use of all functions provided by the API.

The supported algorithms for the API are: `NSGA-II` and `NSGA-III`.

The supported shapes for the API are: `ellipse` and `arbitrary_shape`.

If `n_process` is not set, all available logical CPU cores are used for parallelization.

```python
"""Search for area-proportional 3-set Euler diagrams with ellipses."""

import matplotlib.pyplot as plt

from evoeulerap import (
    diagram,
    metrics,
    obj_values,
    optimize,
    pcp,
    shape_params,
    zone_info,
)

if __name__ == "__main__":
    area_spec = {
        "A": 0.205,
        "B": 0.116,
        "C": 0.292,
        "A C": 0.104,
        "B C": 0.146,
    }

    # Start an optimization.
    result = optimize(
        area_spec=area_spec,
        shape="ellipse",
        algorithm="NSGA-II",
        n_gen=100,
        n_process=1,
    )

    # Print the number of non-dominated solutions.
    print(f"Number of non-dominated solutions: {len(result)}")

    # Show the parallel coordinates plot that visualizes the set of
    # non-dominated solutions.
    fig = pcp(result)
    fig.show()

    solution_idx = 0  # Solution index

    # Show the diagram of a non-dominated solution.
    diagram(
        result[solution_idx], show_target_areas=True, shade_unwanted_zones=True
    )
    plt.show()

    # Print the objective values of a non-dominated solution.
    print("Objective values:")
    print(obj_values(result[solution_idx]))

    # Print the metrics of a non-dominated solution.
    print("Metrics:")
    print(metrics(result[solution_idx]))

    # Print the zone information of a non-dominated solution.
    print("Zone info:")
    print(zone_info(result[solution_idx]))

    # Print the shape parameters of a non-dominated solution.
    print("Shape params:")
    print(shape_params(result[solution_idx]))

```

## Examples
Some example scripts for searching area-proportional Euler or Venn diagrams are in `./examples`.

## Contact
If you have any questions, please contact Chi Ho Chan at [c.chan3@napier.ac.uk](mailto:c.chan3@napier.ac.uk).
