bih-power-data
Continuously refreshed dataset and monthly report for the Bosnia and Herzegovina power system (BA control area, operated by NOSBiH), collected from the ENTSO-E Transparency Platform.
Live report: report/index.html (enable GitHub Pages on this repo to serve it).
What's collected
| dataset | description |
|---|---|
load_actual |
actual total load, hourly |
load_forecast |
day-ahead load forecast |
generation_per_type |
actual generation per production type (lignite, hydro ×3, wind, solar…) |
generation_forecast |
day-ahead generation forecast |
installed_capacity |
installed capacity per type (annual) |
flow_BA_XX / flow_XX_BA |
cross-border physical flows with HR / RS / ME, both directions |
sched_BA_XX / sched_XX_BA |
scheduled commercial exchanges with HR / RS / ME |
day_ahead_prices, hydro_reservoir_storage |
attempted; BA may not report these (status noted in data/state.json) |
Everything is stored as parquet in data/, full history from 2015 where available.
data/state.json tracks coverage and per-dataset status.
Setup
-
Register (free) at transparency.entsoe.eu and generate an API security token in your account settings.
-
First full collection (locally):
pip install -r requirements.txt ENTSOE_TOKEN=your-token python src/collect.py # full history on first run (takes a while) python src/build_report.py # writes report/index.html
-
Push to GitHub, then add the token so the weekly refresh works: Settings → Secrets and variables → Actions → New repository secret → name
ENTSOE_TOKEN.
The included workflow (.github/workflows/refresh.yml) then re-collects incrementally every
Monday 03:17 UTC and commits any new data plus a rebuilt report. You can also trigger it manually
from the Actions tab (Run workflow).
Pipeline test without a token
python src/collect.py --demo && python src/build_report.py
generates synthetic data so the whole pipeline and report can be exercised end-to-end.
Graph-ready dataset
src/join_graph.py joins the ENTSO-E time series onto the ≥220 kV topology
(topology/out/) and writes a graph-ready dataset into dataset/: hourly
zone-level series (UTC), 51 buses with nearest_place labels and per-type
plant capacities (from the curated topology/plants.csv), 67 per-circuit
edges with electrical parameters, generation→bus weight vectors, and a
MultiGraph GraphML. All design decisions (zone-level vs node-level signals,
plant mapping coverage, cleaning rules) are documented in
dataset/DESIGN.md. Runs offline from the repo checkout:
python src/join_graph.py
bihgrid — PyTorch Geometric package
The dataset ships as a PyG InMemoryDataset (auto-downloads from the GitHub
release or raw files, caches locally):
pip install bihgrid
from bihgrid import BiHGrid
ds = BiHGrid(root="data/bihgrid") # revision="v0.1.0" pins a release
data = ds[0]
data.x # [51, 9] voltage, coords, role, per-type plant MW
data.edge_index # [2, 134] 67 undirected per-circuit edges, both directions
data.edge_attr # [134, 8] r, x, b, s_nom, length_km, circuits, flags
data.zone_series # [T, 18] hourly zone signals, UTC (NaN = gap/cleaned)
ds.zone_dataframe() # same as pandas DataFrame
ds.node_generation("Fossil coal (combined)") # [T, 51] heuristic — see DESIGN.md
Feature orders: bihgrid.dataset.NODE_FEATURES / EDGE_FEATURES. Read
dataset/DESIGN.md and DATASET_CARD.md
before treating node-level signals as measurements — they are documented
heuristics over zone-level data. Tests: python -m pytest tests/.
Releasing
git tag vX.Y.Z && git push origin vX.Y.Z → tests, GitHub release with
dataset zip, PyPI publish, Zenodo DOI. One-time account setup in
PUBLISHING.md.
Roadmap
- Combine with grid topology (PyPSA-Eur / OpenStreetMap extract for BiH) into a
graph-ready dataset — candidate for publication. →
dataset/,src/join_graph.py - PyG package
bihgrid(InMemoryDataset, auto-download, PyPI). →bihgrid/ - Zenodo deposit with versioned DOI + dataset card. →
.zenodo.json,DATASET_CARD.md, automated viarelease.yml(one-time setup inPUBLISHING.md) - Data paper (Scientific Data / NeurIPS D&B).
- Companion collectors for EIA + ERCOT following the same layout.
License / attribution
Data © ENTSO-E Transparency Platform, reported by NOSBiH; reuse subject to ENTSO-E's terms. Collection and report code: MIT.
Metadata
Release files for bihgrid 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bihgrid-0.1.5.tar.gz | 8.3 kB | With provenance | Details for bihgrid-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bihgrid-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for bihgrid-0.1.5-py3-none-any.whl |
Total release size: 17.5 kB
Release files / bihgrid-0.1.5.tar.gz
| Download URL | bihgrid-0.1.5.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f20fd554dd747be34a5e82f5e4d2cf66e294dc1b6db7bd72a6d20e9842464ab
|
|
BLAKE2b-256 checksum How to use checksums |
29a2653464d93c49e32e371351412526e6aa8a2c9eba18680d1c8f009c557428
|
| 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 Nov 25, 2026.
Transparency logRelease files / bihgrid-0.1.5-py3-none-any.whl
| Download URL | bihgrid-0.1.5-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6737dccd1dbb97cee98d18944ca68a194e80e7cbf3e31c5aaa232ce3c46ec444
|
|
BLAKE2b-256 checksum How to use checksums |
24e36b44407efa715c63e332c99271b5afcaf2c89333786abc20e30ee88755cf
|
| 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 Nov 25, 2026.
Transparency logSecurity for bihgrid 0.1.5
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.
Attestation for bihgrid-0.1.5.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 Nov 25, 2026.
Transparency logA 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.