This release is a pre-release and may not be stable for production use.
SHRECC
Simple Hourly Resolution Electricity Consumption Calculation
Description
SHRECC creates time-resolved electricity-consumption databases for Brightway. It uses measured Energy Charts data for historical years and ENTSO-E TYNDP scenario data for prospective years, while exposing the same workflow for both.
Features
- Hourly production, trade, consumption-volume, and consumption-mix results.
- One reduced country-network solver shared by Energy Charts and TYNDP data.
- Historical ecoinvent allocation and prospective premise/IAM mapping.
- Hourly, daily, weekly, monthly, and explicit timestamp selections.
- Inspectable intermediate results before any Brightway database is changed.
- Resumable source acquisition and compressed, time-chunked result caches.
- Brightway 2 and 2.5 database writing through
NewDatabase. - Multi-year runs with a separate, year-labelled foreground database for each requested year.
Documentation
The full documentation is hosted at Read the Docs page for shrecc
The internal data flow and module responsibilities are summarized in docs/architecture.md.
Installation
shrecc can be installed from pypi or from source.
From pypi
The package is published at pypi.org/projects/shrecc.
You can install it with pip (or any other pypi compatible util like uv or poetry as follows:
pip install shrecc
Install optional premise geography support or the notebook environment with:
pip install "shrecc[premise,notebooks]"
From source
To install shrecc from source, clone the code and then install the package and if necessary the dependencies manually.
Usage
The repository contains a minimal getting-started notebook and a more detailed analysis notebook. Both are also available in the documentation (only for main releases) at read the docs.
The harmonized historical/prospective workflow is available through
NewDatabase:
from shrecc import NewDatabase
electricity = NewDatabase(
scenario="DE",
years=[2035, 2040, 2050],
climate_year=2009,
bg_db_name={
2035: "premise-remind-eu-2035",
2040: "premise-remind-eu-2040",
2050: "premise-remind-eu-2050",
},
my_db_name="shrecc_tyndp_DE_june_noon",
countries=["ES", "FR", "DE", "IT", "PT", "BE", "NL", "LU", "AT", "CH"],
time_range=["2040-06-01 00:00:00", "2040-06-30 23:00:00"],
hour_range=[10, 14],
project_name="SHRECCei311",
source="auto",
)
electricity.create()
electricity.write()
For a multi-year run, the month/day/time selection is reused for each year and
write() creates one foreground database per year. A year suffix is added to
my_db_name automatically unless explicit year-specific names are supplied.
Foreground activity names and metadata also record their model year.
Intermediate canonical results and mapped tables remain available on the class
instance through results(year) and table(year). Use
mapping_report(year) to inspect any historical technologies assigned to a
country-specific high-voltage fallback activity.
Contributing
Please take a look at the DEVELOPPING.md file for details on how to contribute code to the repository.
License
Copyright © 2025 Luxembourg Institute of Science and Technology Licensed under the MIT License.
Authors
- Sabina Bednářová (sabina.bednarova@list.lu)
- Thomas Gibon (thomas.gibon@list.lu)
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 shrecc-0.1.0.dev2.tar.gz.
File metadata
- Download URL: shrecc-0.1.0.dev2.tar.gz
- Upload date:
- Size: 184.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eef1209a15c8673e3ee3a00582f30a8a8316c7bbe18ad55bfe146e746555328e
|
|
| MD5 |
b7f8ff91c0fc0b529a1a5599e22c91a9
|
|
| BLAKE2b-256 |
862e15a72c1c96d9b6fd01b36fd8df828be29c497b0eb2c5eeca0fdeebf11b0c
|
File details
Details for the file shrecc-0.1.0.dev2-py3-none-any.whl.
File metadata
- Download URL: shrecc-0.1.0.dev2-py3-none-any.whl
- Upload date:
- Size: 240.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
188efc9cb261be23f83e1fc36055db9bbeb3dce69cc94211af7c4c4aa5a90bca
|
|
| MD5 |
41a4ee0debfc2ca586dd2230eacbd617
|
|
| BLAKE2b-256 |
9e1455ff7c7619ab4e82feab3d838637be622280b41408c2c89c2b50409f5c31
|