# 048. Energy concentration in high-load intervals

**Question:** What fraction of appliance energy occurs in the highest-load recorded intervals?

## Result

The largest computed metric is 1 for 1.0; the smallest is 0.06947 for 0.01. Metric: energy_share (Share of appliance energy).

High observed load is not necessarily waste or shiftable demand.

![Energy concentration in high-load intervals](outputs/chart.png)

| top_interval_fraction | intervals | energy_share |
| --- | --- | --- |
| 0.01 | 198 | 0.06947 |
| 0.05 | 987 | 0.2373 |
| 0.1 | 1974 | 0.3708 |
| 0.2 | 3947 | 0.5068 |
| 0.5 | 9868 | 0.7551 |
| 1 | 19735 | 1 |

The chart shows 6 of 6 result rows; the table previews the first 6 in the analysis-defined order. [Download the full result table](outputs/results.csv). Numerical values are computed from the source; missing results stay unavailable.

## Method

Rank intervals by appliance Wh and compute concentration at prespecified fractions.

The study uses shared source preparation and reusable statistical routines. Its specific transformations are in [analysis.py](analysis.py), and common model/evaluation code is in [portfolio/methods.py](../../portfolio/methods.py). The [notebook](analysis.ipynb) executes the study and displays the saved results.

## Decision and limitations

Investigate the appliances responsible for high-load intervals before estimating flexible energy.

Measurements come from one home over a limited period. Energy is Wh per recorded 10-minute interval. This is not a representative household sample; tariffs and occupancy labels are unavailable. 

Related studies may share observations or holdouts. These are focused analytical studies, not independent replications or deployed business systems. Any model refinements informed by these results need new untouched evaluation data. No commercial impact is inferred from an association or backtest.

## Reproduce

From the repository root, after installing `requirements.txt`:

```powershell
python projects/048-energy-concentration-in-high-load-intervals/analysis.py
```

Source data are downloaded automatically if absent. Original archives are retained unchanged and checked by SHA-256. The cleaned cache normalizes column names; field-specific changes are visible in [data preparation](../../portfolio/data.py). Runtime evidence is in [receipt.json](outputs/receipt.json).

## Source

[Appliances Energy Prediction](https://archive.ics.uci.edu/dataset/374/appliances+energy+prediction), Candanedo (2017). [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Source data are transformed and aggregated in this study. [Source provenance](../../data/provenance/energy.json) and [prepared-data audit](../../data/provenance/energy_prepared.json) record the downloaded files, field coverage and hashes.
