# 013. Missing rental-hour coverage

**Question:** When are calendar hours missing from the rental dataset?

## Result

The largest computed metric is 0.07527 for 2011-01; the smallest is 0 for 2011-05. Metric: missing_share (Missing-hour share).

Observed records remain distinct from the complete calendar; absent counts are never filled with zero.

![Missing rental-hour coverage](outputs/chart.png)

| month | calendar_hours | missing_hours | missing_share |
| --- | --- | --- | --- |
| 2011-01 | 744 | 56 | 0.07527 |
| 2011-02 | 672 | 23 | 0.03423 |
| 2011-03 | 744 | 14 | 0.01882 |
| 2011-04 | 720 | 1 | 0.001389 |
| 2011-05 | 744 | 0 | 0 |
| 2011-06 | 720 | 0 | 0 |
| 2011-07 | 744 | 0 | 0 |
| 2011-08 | 744 | 13 | 0.01747 |
| 2011-09 | 720 | 3 | 0.004167 |
| 2011-10 | 744 | 1 | 0.001344 |
| 2011-11 | 720 | 1 | 0.001389 |
| 2011-12 | 744 | 3 | 0.004032 |
| 2012-01 | 744 | 3 | 0.004032 |
| 2012-02 | 696 | 4 | 0.005747 |

The chart shows 14 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

Reindex to a complete hourly timeline and audit monthly observation coverage.

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

Clarify whether gaps reflect outages, suppressed zero counts or missing ingestion before training.

Historical system rentals measure realized use, not unmet demand or station inventory. Missing hours are unknown. Weather associations do not establish causal effects. 

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/013-missing-rental-hour-coverage/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

[Bike Sharing](https://archive.ics.uci.edu/dataset/275/bike+sharing+dataset), Fanaee-T (2013). [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Source data are transformed and aggregated in this study. [Source provenance](../../data/provenance/bikes.json) and [prepared-data audit](../../data/provenance/bikes_prepared.json) record the downloaded files, field coverage and hashes.
