Skip to main content

PyPI - Version PyPI - Python Version

DecarbAI Demands

Predicts 8760-hour heating, cooling, electricity, and DHW demand profiles for Swiss buildings using a per-city, per-building-type XGBoost + PCA ensemble, served through an interactive Dash dashboard.

Demo

Demo

Install

pip install decarbai-demands

Requires Python 3.11+.

Model download

Model artifacts are not bundled in the package. On the first prediction for a given city the package downloads {city}.tar (~100 MB) from a public S3 bucket and caches it at ~/.cache/decarbai/models/. Subsequent runs use the local cache.

Run the dashboard

After installing the package, launch the dashboard with the bundled CLI:

decarbai-demands dashboard

Or, from a source checkout:

uv run python -m decarbai_demands.dashboard

Opens an interactive Dash UI at http://127.0.0.1:8050/ for configuring a building and predicting its hourly heating, cooling, electricity, and DHW demand profiles.

Repo structure

src/decarbai_demands/
├── schema.py              Pydantic InputData + the 17-feature ordered vector
├── model.py               XGBoost + PCA ensemble loader (Model + load_artifacts)
├── pipeline.py            run_pipeline: feeds InputData through the per-city models
├── dashboard/             Dash app (subpackage)
│   ├── app.py             create_app() + run_dashboard() + __main__
│   ├── layout.py          UI tree (header, form sections, panels, modal hookup)
│   ├── callbacks.py       Prediction, CSV download, live range validation, modal toggle
│   ├── styles.py          Style dicts shared across the UI
│   ├── constants.py       Cities, building types, demand types, form defaults
│   └── ranges.py          TRAINING_RANGES + the info-modal builder
└── model_cache.py         S3 download + local cache at ~/.cache/decarbai/models/
                           Layout: {country}/{city}/{building_type}/{demand}.zst

Heating and cooling each have their own .zst model file; DHW and electricity share electricity_dhw.zst (first 8760 values = DHW, next 8760 = electricity).

Model training envelope

Predictions are most reliable when inputs lie within the ranges the model was trained on. Outside this envelope, the model extrapolates and confidence drops. The dashboard surfaces the same ranges inline next to each input and in the ⓘ info modal.

Direct inputs

Feature Min Max
Width [m] 5.0 14.0
Length [m] 10.0 19.0
Floor Height [m] 2.5 3.5
Number of Floors 1 4
Construction Year 1918 2015
North Angle [°] 0 90
WWR (N / E / S / W) 0.0 0.75
U_Ground [W/m²K] 0.12 1.24
U_Wall [W/m²K] 0.11 3.06
U_Roof [W/m²K] 0.11 1.63
U_Window [W/m²K] 0.78 5.67

Derived features (computed from geometry)

Feature Min Max
Footprint [m²] 50.0 266.0
Total Height [m] 2.5 14.0
Volume [m³] 125.0 3724.0
Envelope Area [m²] 175.0 1456.0
Relative Compactness [-] 0.65 1.0
Characteristic Length [m] 0.71 2.56
Average WWR [-] 0.0 0.75

Credits

This tool was developed under the Innosuisse DecarbAI project, a UK/CH bilateral research collaboration.

  • ML models & methodology — Dr. Hassan Bazazzadeh & Dr. Georgios Mavromatidis (Urban Energy Systems Laboratory, Empa)
  • Building stock data & simulation inputs — BuildingAtlas, providing a scientifically grounded, data-rich foundation for Swiss and European building typologies
  • ML deployment & dashboard — Youssef Sherif & Sympheny's Team (Sympheny)
  • Funding — Innosuisse UK/CH bilateral grant

Release files for decarbai-demands 1.0.4

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

Source distribution (sdist)

Source distribution for decarbai-demands 1.0.4
File Size Uploaded
decarbai_demands-1.0.4.tar.gz 15.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for decarbai-demands 1.0.4
File Interpreter ABI Platform
decarbai_demands-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 34.4 kB

Release files / decarbai_demands-1.0.4.tar.gz

Download URL decarbai_demands-1.0.4.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
187037f33e09ff94e5f93301908e312ea8624d2ec8bdbf3a4fd4a4182a24d98d
BLAKE2b-256 checksum
How to use checksums
9d09ccb37bbe8b8356c8a7a4f79caf3a7b0d3d8081a804af8bf8ef2342278b19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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 / decarbai_demands-1.0.4-py3-none-any.whl

Download URL decarbai_demands-1.0.4-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dab6e1cbee99457736be1a438e21b1624a05a0abb6b7b7e3cfd3aaad1154a921
BLAKE2b-256 checksum
How to use checksums
ba0396f43d4192038c57a1c79a958554346e853195784b30ef4531d5ef0942c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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 history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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