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.
Installation
To use in your own projects, pip install in a console first:
pip install ec-data-analysis
Then, simply import the ECDataset class:
from ec_data_analysis import ECDataset
Example Usage
Example usage is provided in the main.py file:
from ec_data_analysis import ECDataset
...
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.
Develop
In case want to play with the code yourself to add more plots or metrics, the project is provided with a formating tool (black) and typechecker (mypy). The code is almost fully annotated with type hints, and the provided Makefile typechecks with:
Make typecheck
To format, typecheck and then run main.py, run:
Make all
Or to simply run main.py:
Make run
Metadata
Release files for ec-data-analysis 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ec_data_analysis-0.9.1.tar.gz | 16.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ec_data_analysis-0.9.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.6 kB
Release files / ec_data_analysis-0.9.1.tar.gz
| Download URL | ec_data_analysis-0.9.1.tar.gz |
|---|---|
| Size | 16.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a890f02ab1879218381e631d4a3a3a55eb7cb680ac2a946ea1132940649c6bf9
|
|
BLAKE2b-256 checksum How to use checksums |
9272b024565dcc1a6e091ddd4c60e1901520f2add7a5794e1ae96d9da2d27449
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.7 Linux/6.11.4-arch1-1-surface
|
Release files / ec_data_analysis-0.9.1-py3-none-any.whl
| Download URL | ec_data_analysis-0.9.1-py3-none-any.whl |
|---|---|
| Size | 21.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c32ada83556fa8a5d0dcec122d89b528cd924030bf031fd4f80bef11fbcd4b0
|
|
BLAKE2b-256 checksum How to use checksums |
fb402717aba603478734a5bf756b0fd6846b2a9eaee9fd1363cd2d8a9781646b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.7 Linux/6.11.4-arch1-1-surface
|