# 055. Hourly carbon monoxide pattern

**Question:** What daily pattern appears in observed reference carbon monoxide measurements?

## Result

The largest computed metric is 3.733 for 19.0; the smallest is 0.7129 for 5.0. Metric: mean_co (CO reference concentration (source units)).

Each hour-of-day mean uses available reference readings only. This is not an exposure or compliance assessment.

![Hourly carbon monoxide pattern](outputs/chart.png)

| hour | observed_hours | median_co | mean_co | p90_co |
| --- | --- | --- | --- | --- |
| 0 | 329 | 1.6 | 1.786 | 2.8 |
| 1 | 323 | 1.3 | 1.468 | 2.4 |
| 2 | 320 | 0.9 | 1.099 | 2 |
| 3 | 312 | 0.7 | 0.8885 | 1.6 |
| 4 | 179 | 0.6 | 0.7587 | 1.32 |
| 5 | 317 | 0.6 | 0.7129 | 1.1 |
| 6 | 320 | 0.9 | 0.9216 | 1.5 |
| 7 | 321 | 1.5 | 1.811 | 3.6 |
| 8 | 320 | 2.85 | 2.824 | 4.8 |
| 9 | 327 | 2.9 | 2.972 | 5.2 |
| 10 | 327 | 2.4 | 2.566 | 4.4 |
| 11 | 325 | 2.1 | 2.261 | 3.7 |
| 12 | 326 | 2 | 2.17 | 3.45 |
| 13 | 326 | 2 | 2.201 | 3.75 |

The chart shows 24 of 24 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

Hour-of-day reference summaries with paired observation counts and quantiles.

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

Compare traffic and meteorology data before explaining a diurnal pattern.

The -200 sentinel is treated as missing. Reference instruments have incomplete coverage; comparisons use paired observations. Sensor calibration is retrospective, not a health or regulatory compliance assessment. 

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/055-hourly-carbon-monoxide-pattern/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

[Air Quality](https://archive.ics.uci.edu/dataset/360/air+quality), De Vito (2008). [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Source data are transformed and aggregated in this study. [Source provenance](../../data/provenance/air.json) and [prepared-data audit](../../data/provenance/air_prepared.json) record the downloaded files, field coverage and hashes.
