Skip to main content

⚡ enerdatasynth

PyPI Python 3.10-3.14 Tests: 272 passing License: MIT

PyPI: https://pypi.org/project/enerdatasynth/

enerdatasynth generates synthetic energy profiles for electric load and wind. Trained conditional models sit behind one Python interface: you describe the conditions you want (season, temperature, day type) and get a profile back.

Generators

Two resources share one interface, enerdatasynth.model(<name>, zone=...).

PJM electric load. A conditional diffusion model for 24-hour load profiles in the PJM PS zone, conditioned on month, day of week, holiday and temperature. Report: docs/models/pjm_load.md.

Wind. A conditional diffusion model for 24-hour wind profiles at 5-minute resolution, with three channel presets (1ch, 2ch, 3ch), conditioned on calendar, temperature and wind regime. Report: docs/models/wind.md.

Quick start

1. Check your Python. In a terminal, run python3 --version. It must say 3.10, 3.11, 3.12, 3.13 or 3.14. If it says 3.9 or lower (the default on many Macs), install Python 3.12 from python.org/downloads and open a new terminal. Without this, pip installs an old 0.4.1 release that doesn't work as described here. Don't pick a brand-new release such as 3.15; PyTorch doesn't publish builds for it yet and the install fails.

2. Install.

python3 -m pip install --upgrade pip
python3 -m pip install enerdatasynth

We write python3 -m pip because many machines have no plain pip command. The first line is there because the pip that comes with a fresh Python is often too old to install PyTorch (you'd see "conflicting dependencies" and a torch error).

3. Use it. Type python3 and press Enter. The prompt changes to >>>. Then type these lines, pressing Enter after each:

import enerdatasynth
enerdatasynth.load(month=7, Tmax=90, Tmin=74)
enerdatasynth.wind(month=7, wind_regime="high")

load prints one generated day of PJM load, hour by hour, in MW. wind prints one generated day of wind speed in m/s. Call either one on its own with the conditions you want. The models ship inside the package, so this works from any folder. The first call takes about a minute while torch loads. Type exit() to leave Python.

Conditions for load: month (1 to 12), Tmax and Tmin in degrees Fahrenheit, and optionally weekday=True/False, holiday=True/False or day_of_week (0 is Monday). Conditions for wind: preset ("1ch" for speed only, "2ch" or "3ch" for speed and direction), wind_regime ("low", "mid" or "high"), month, and temp_min and temp_max in degrees Celsius. Both return the numbers as a numpy array, and the same seed= gives the same day.

Type the lines one at a time. Pasting several lines at once into >>> can run them together and give a SyntaxError on some Python versions.

More control

For many samples at once, use the fuller interface. Save this as try_it.py and run python3 try_it.py:

import enerdatasynth

load = enerdatasynth.model("pjm_load", zone="PS")
load.set(month=7, Tmax=86, Tmin=70, weekday=True)
samples = load.sample(n=100, seed=0)
print("load:", samples.shape)            # (100, 24), MW

wind = enerdatasynth.model("wind", zone="1ch")
wind.set(wind_regime="high", month=7, temp_min=10, temp_max=22)
samples = wind.sample(n=10, seed=0)
print("wind:", samples.shape)            # (10, 288, 2), m/s and degrees

If you end up with version 0.4.1, your python3 is older than 3.10. If the install fails on a torch error, your Python is newer than 3.14. Wind sampling is slow on CPU for larger n; see docs/models/wind.md. To train your own checkpoints you need a clone of this repository and your own copy of the data; see docs/installation.md and docs/quickstart.md.

How it works

data -> conditioning -> generative model -> synthetic profile -> evaluation

Source data is cleaned and reduced to a conditioning vector (calendar plus weather). A conditional diffusion model turns pure noise into a profile that matches that vector. Load and wind each have their own pipeline, because the two problems are different enough that forcing them into one would not help. Generated profiles are scored against real ones with a metric suite (a different one per resource), and load gets a small bias correction on top. The interface is the same for both; what runs underneath is not. Details are in the architecture docs and the two model reports.

Model reports

Each resource has a full report covering the input data, conditioning, architecture, training, evaluation, results and known limitations. They are the main scientific documentation for the project, so start there if you want more than basic usage:

Documentation

Installation Quick start
API reference Architecture
Evaluation Extending (add a resource)
PJM load model report Wind model report
Model card Data card
Developer guide FAQ

The full map is in docs/README.md.

Data and reproducibility

This repository contains no real data, raw or processed. You get trained checkpoints and the generation interface, not the datasets behind them.

Resource Where the data comes from
PJM load PJM hourly metered load (hrl_load_metered) from PJM Data Miner 2
Temperature (for load conditioning) NOAA Integrated Surface Database, fetched for each zone's weather stations
Wind A separate research pipeline (wind_diffusion). Its model report says what is and isn't known about the original data source

To reproduce load preprocessing end to end, download the PJM and NOAA files yourself, put them in data/raw/pjm_load/ (the README there explains what is needed), and run enerdatasynth preprocess. Wind has no reproduction path here: the raw wind data was never part of this repository, and the wind report says so.

Citation

No paper yet. If you use this software, please cite the repository:

@software{enerdatasynth,
  title  = {enerdatasynth: A Research SDK for Synthetic PJM Energy Resource Profiles},
  author = {Sharma, Sonakshi and Tikkawar, Pranav and Mieth, Robert},
  year   = {2026},
  note   = {Software}
}

License

MIT © 2026 Sonakshi Sharma

Metadata

Release files for enerdatasynth 0.8.2

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

Source distribution (sdist)

Source distribution for enerdatasynth 0.8.2
File Size Uploaded Provenance Actions
enerdatasynth-0.8.2.tar.gz 13.7 MB With provenance Details for enerdatasynth-0.8.2.tar.gz

Built distribution (wheel)

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

Total release size: 27.4 MB

Release files / enerdatasynth-0.8.2.tar.gz

Download URL enerdatasynth-0.8.2.tar.gz
Size 13.7 MB
Tags Source
SHA-256 checksum
How to use checksums
28329116191b8c2fad36eba598b631293e08a0dde0c631fa63586bced62df889
BLAKE2b-256 checksum
How to use checksums
03c6ec67f2836654802bdc0327c2ecceb1f37f5c33638698fd86cceb20114b8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / enerdatasynth-0.8.2-py3-none-any.whl

Download URL enerdatasynth-0.8.2-py3-none-any.whl
Size 13.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
956d93a62d1cf07963d367aa286832ae72e3821b00557cd1f4ed40c4b16583c4
BLAKE2b-256 checksum
How to use checksums
4fb56cdeab4f66d7b7838ec3eab5b4780c0bd26573a689927370edff6c6e7159
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Security for enerdatasynth 0.8.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for enerdatasynth-0.8.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

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.

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