Skip to main content

OpenEnergyID

Open Source Python library for energy data analytics and simulations.

OpenEnergyID is a powerful Python library that provides a wide range of tools for energy data analysis and simulation. Whether you are a data scientist, researcher, or developer working in the energy sector, OpenEnergyID can help you gain valuable insights from your data and build sophisticated models.

more info for developers

Getting Started

To get started with OpenEnergyID, you can install it using pip:

pip install openenergyid

Analyses

OpenEnergyID provides a variety of analysis modules to help you work with your energy data.

Baseload Analysis

The baseload analysis module helps you determine the baseload consumption of a building or a portfolio of buildings.

  • Use BaseloadAnalyzer(timezone="Europe/Brussels"), prepare data with prepare_power_series(energy_lf) and then call analyze(power_lf, "1h").
  • Accepts either energy (timestamp/total in kWh per 15 min) or precomputed power (timestamp/power watts); gapped or zero-valued intervals are kept and handled safely.
  • For homes with unmeasured PV, use nighttime_only=True to filter to nighttime readings only (uses pvlib for solar position).
  • Outputs energy splits (baseload vs total) and baseload ratios per chosen reporting granularity, keeping computations lazy via Polars LazyFrame.

Capacity Analysis

The capacity analysis module helps you identify peaks in your power data.

from openenergyid.capacity import CapacityAnalysis

analyzer = CapacityAnalysis(data=power_series, threshold=2.5)
peaks = analyzer.find_peaks()

Dynamic Tariff Analysis

The dynamic tariff analysis module helps you analyze the impact of dynamic tariffs on your energy costs.

from openenergyid.dyntar import calculate_dyntar_columns

df_with_dyntar = calculate_dyntar_columns(df)

Energy Sharing

The energy sharing module helps you simulate energy sharing scenarios.

from openenergyid.energysharing import calculate

result = calculate(df, method=CalculationMethod.OPTIMAL)

Evening Peak Avoidance

The evening peak avoidance module ("Avondpiek mijden") measures how much of a connection's consumption falls inside a fixed evening window, for peak-shifting campaigns.

from openenergyid.evening_peak import EveningPeakAnalyzer

analyzer = EveningPeakAnalyzer(timezone="Europe/Amsterdam")
net_offtake = analyzer.prepare_net_offtake(gross_offtake_lf, gross_injection_lf)
result = analyzer.analyze(net_offtake)
moments = analyzer.peak_moments(net_offtake, num_peaks=10)
  • Takes the two gross meter registers in kWh per quarter-hour; injection is clipped to zero per quarter-hour, before summation, so the share stays in 0–100% and stays comparable between households with and without PV.
  • Reports per day the highest quarter-hour power inside the window (kW) and the share of net daily offtake falling inside it (%), plus Monday-aligned weekly medians as a reference line.
  • The window (default 16:00–21:00) and the threshold for counting good days (default 37%) are configurable.
  • Summarises the threshold two ways: how many measured days fell below it, and how far below they got in total, as percentage points clipped at zero per day.
  • Day boundaries and coverage are DST-aware: a 25-hour October day is expected to have 100 quarter-hours, not 96. Days that are only partly measured report no share rather than one computed against an incomplete denominator, and unmeasured days stay in the index as nulls so a gap in the data reads as a gap.

See docs/specs/evening-peak-avoidance.md and demo_evening_peak.ipynb.

Multivariate Linear Regression (MVLR)

The MVLR module helps you build multivariate linear regression models to predict energy consumption.

from openenergyid.mvlr import find_best_mvlr

model = find_best_mvlr(data)
if not model.is_valid:
    print(model.validation_message)  # e.g. "Best adjusted R²: 0.63 (need ≥0.75)."

find_best_mvlr returns the best fit it can produce across the configured granularities. A fit that misses the caller's thresholds is returned with is_valid=False so callers can render it with a warning; only a structurally degenerate fit (typically df_resid == 0 after resampling) raises DegenerateModelError, which subclasses ValueError and carries nobs / df_model / df_resid. See docs/specs/mvlr-degenerate-models.md.

PV Simulation

The PV simulation module helps you simulate the output of a photovoltaic system.

from openenergyid.pvsim import get_simulator, apply_simulation

simulator = get_simulator(input)
simulation_results = simulator.simulate()
df_with_pv = apply_simulation(df, simulation_results)

Simulation Evaluation

The simulation evaluation module helps you evaluate the results of your energy simulations.

from openenergyid.simeval import evaluate

evaluation = evaluate(df)

Metadata

Release files for openenergyid 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openenergyid 0.4.0
File Size Uploaded Provenance Actions
openenergyid-0.4.0.tar.gz 86.3 kB Without provenance Details for openenergyid-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for openenergyid 0.4.0
File Interpreter ABI Platform Actions
openenergyid-0.4.0-py3-none-any.whl Python 3 none any Details for openenergyid-0.4.0-py3-none-any.whl

Total release size: 193.2 kB

Release files / openenergyid-0.4.0.tar.gz

Download URL openenergyid-0.4.0.tar.gz
Size 86.3 kB
Tags Source
SHA-256 checksum
How to use checksums
935abc58a083cc70355465e3e0a8b9ef0601e2c0b70bfd97a86fcdddd1419e03
BLAKE2b-256 checksum
How to use checksums
4a280c6a504d832a8b5ab2ba09d918ba0c777513fa25e744a15cb2f6d2346181
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / openenergyid-0.4.0-py3-none-any.whl

Download URL openenergyid-0.4.0-py3-none-any.whl
Size 107.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f47e9c3065f4763e6b099af04ea3dc7f6ad5b5d3a96a4b9ab8628604eb675153
BLAKE2b-256 checksum
How to use checksums
50a681576d4699d2f9acfbde0f916f8b44853825ceba5331d87a75207d6da199
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for openenergyid 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page