# 049. Indoor conditions and appliance use

**Question:** Which recorded indoor conditions have the strongest rank associations with appliance energy?

## Result

The largest computed metric is 0.3051 for t2; the smallest is -0.2297 for rh_6. Metric: spearman_rho (Spearman correlation).

Contemporaneous measurements cannot be assumed available in advance. Serial dependence prevents interpreting ordinary correlation as causal evidence.

![Indoor conditions and appliance use](outputs/chart.png)

| feature | spearman_rho | absolute_rho | paired_rows |
| --- | --- | --- | --- |
| t2 | 0.3051 | 0.3051 | 19735 |
| t1 | 0.244 | 0.244 | 19735 |
| t6 | 0.2425 | 0.2425 | 19735 |
| t8 | 0.2361 | 0.2361 | 19735 |
| rh_6 | -0.2297 | 0.2297 | 19735 |
| rh_8 | -0.2172 | 0.2172 | 19735 |
| t3 | 0.2169 | 0.2169 | 19735 |
| t4 | 0.2072 | 0.2072 | 19735 |
| t5 | 0.1858 | 0.1858 | 19735 |
| t7 | 0.1819 | 0.1819 | 19735 |
| t9 | 0.167 | 0.167 | 19735 |
| rh_9 | -0.1646 | 0.1646 | 19735 |
| rh_2 | -0.1197 | 0.1197 | 19735 |
| rh_7 | -0.1194 | 0.1194 | 19735 |

The chart shows 14 of 18 result rows; the table previews the first 14 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

Pairwise Spearman correlations for room temperatures and humidity.

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 schedules and occupancy before treating indoor conditions as explanatory drivers.

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/049-indoor-conditions-and-appliance-use/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.
