# 046. Weekday and weekend load

**Question:** How do interval energy distributions differ across weekdays?

## Result

The largest computed metric is 111.5 for 0.0; the smallest is 87.12 for 1.0. Metric: mean_wh (Wh per 10-minute interval).

Weekday 0 is Monday. Changes in weather and household behavior are not controlled.

![Weekday and weekend load](outputs/chart.png)

| weekday | intervals | median_wh | mean_wh | p90_wh |
| --- | --- | --- | --- | --- |
| 0 | 2778 | 60 | 111.5 | 280 |
| 1 | 2880 | 60 | 87.12 | 140 |
| 2 | 2880 | 70 | 89.93 | 140 |
| 3 | 2880 | 60 | 90.43 | 150 |
| 4 | 2845 | 60 | 104.6 | 260 |
| 5 | 2736 | 70 | 106.2 | 240 |
| 6 | 2736 | 60 | 94.92 | 150 |

The chart shows 7 of 7 result rows; the table previews the first 7 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

Calendar-day categories with robust energy summaries.

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

Use the observed schedule as a hypothesis to compare with occupancy and appliance logs.

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/046-weekday-and-weekend-load/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.
