Metadata-Version: 2.1
Name: ec-data-analysis
Version: 0.6.0
Summary: Manages Energy Community Datasets with support for computing optimal energy distribution, visualization and key statistics.
Home-page: https://github.com/skehrli/ec-data-analysis
License: MIT
Author: Sascha Kehrli
Author-email: skehrli@ethz.ch
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: markdown-pdf (>=1.3,<2.0)
Requires-Dist: matplotlib (>=3.9.2,<4.0.0)
Requires-Dist: networkx (>=3.3,<4.0)
Requires-Dist: numpy (>=2.1.1,<3.0.0)
Requires-Dist: openpyxl (>=3.1.5,<4.0.0)
Requires-Dist: pandas (>=2.2.2,<3.0.0)
Requires-Dist: seaborn (>=0.13.2,<0.14.0)
Project-URL: Repository, https://github.com/skehrli/ec-data-analysis
Description-Content-Type: text/markdown

Wrapper for datasets about Energy Communities providing the ability to immediately
extract key stats such as the breakdown of covered energy (self-coverage, trading over market,
and discharged from community battery) and automatically generate a report. The market is implicit and computed optimally at each timestep using a max-flow algorithm.

The functionality is provided by the *ECDataset* class. For its construction, provide it with two 2D Pandas DataFrames *production* and *consumption*, where *production*[i][j] is the production of community member j at timestep i and consumption[i][j] is the consumption of community member j at timestep i. Also, pass the timestep used in the dataset as a fraction/multiple of one hour as a parameter.


Example usage is provided in the main.py file:
```python
def main() -> None:
    data: pd.DataFrame = pd.read_excel("data/EC_EV_dataset.xlsx", sheet_name=None)
    production: pd.DataFrame = getSheet("PV", data)
    consumption: pd.DataFrame = getSheet("Load", data)

    ecData: ECDataset = ECDataset(production, consumption, 0.25)
    ecData.createReport()
```

The example report generated by this is in out/report.pdf based on the example dataset data/EC_EV_dataset.xlsx.

The code is annotated with type hints, and the provided Makefile typechecks with

```bash
Make typecheck
```

Run 
```bash
Make all
```
to format the python files, typecheck and run main.py, or
```bash
Make run
```
to simply run main.py.

