An easy way to nagivate EFA days and settlement periods in GB electricity trading.
Project description
efaciency
A package to simplify working with EFA blocks and settlement periods in the GB electricity trading system.
Installation
This package can be installed via pip:
$ pip install efaciency
Quick start
Define a settlement period and get the corresponding half-hour datetime.
>>> from datetime import date
>>> from efaciency import SettlementPeriod
>>> sp = SettlementPeriod(settlement_date=date(2023, 7, 1), settlement_period=24)
>>> sp["ts"]
datetime.datetime(2023, 7, 1, 11, 30, tzinfo=<DstTzInfo 'Europe/London' BST+1:00:00 DST>)
Create ranges of half-hour granularity for all SPs in between two dates.
>>> from datetime import date
>>> from efaciency import settlement_period_range
>>> sp_range = settlement_period_range(
... from_efa_date=date(2023, 7, 1),
... to_efa_date=date(2023, 7, 2),
... )
>>> sp_range[0]
{
'settlement_date': datetime.date(2023, 6, 30)
'settlement_period': 47,
'ts': datetime.datetime(2023, 6, 30, 23, 0, tzinfo=<DstTzInfo 'Europe/London' BST+1:00:00 DST>),
'efa_date': datetime.date(2023, 7, 1),
'efa_block': 1
}
Define EFA blocks and get the corresponding start and end datetimes.
>>> from datetime import date
>>> from efaciency import EFABlock
>>> efa = EFABlock(efa_date=date(2023, 7, 1), efa_block=3)
>>> efa["start_ts"].strftime("%Y-%m-%d %H:%M")
'2023-07-01 07:00'
>>> efa["end_ts"].strftime("%Y-%m-%d %H:%M")
'2023-07-01 11:00'
Contribution
Please make a pull request or log an issue on GitHub.
License
Code is released as free software under the MIT License (see LICENSE file).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file efaciency-0.1.tar.gz.
File metadata
- Download URL: efaciency-0.1.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c25b2da2bc8749ae47ea1ac824669e2587e4a960c71dd3d0b7d1bfeabc7fa231
|
|
| MD5 |
0ff25cd886793a818bf1526831d1c7b0
|
|
| BLAKE2b-256 |
c3f3eeec4893d585bc0950b999b5b48ff88139e0a0e16684d6d31ad8e7d11d25
|
File details
Details for the file efaciency-0.1-py2.py3-none-any.whl.
File metadata
- Download URL: efaciency-0.1-py2.py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
181d308c38620311690f66b700a226d520e9d3e51e866db275269d83ab1011e1
|
|
| MD5 |
6422d6fb123501f1794985e64db55d8e
|
|
| BLAKE2b-256 |
c805072a4a92a0894745b78e308b3f6534b0d93dec6e115405c2b62e66658be8
|