# 015. Daily peak concentration

**Question:** What share of a complete day’s rentals occurs in its four busiest hours?

## Result

The largest computed metric is 0.4107 for 2012-02; the smallest is 0.3652 for 2011-07. Metric: mean_peak_share (Share of daily rentals).

Busiest hours are selected retrospectively for each day. This is not an advance peak-hour forecast.

![Daily peak concentration](outputs/chart.png)

| month | complete_days | mean_peak_share | median_peak_share |
| --- | --- | --- | --- |
| 2011-01 | 11 | 0.4084 | 0.4091 |
| 2011-02 | 12 | 0.3993 | 0.3992 |
| 2011-03 | 18 | 0.4068 | 0.4091 |
| 2011-04 | 29 | 0.4098 | 0.4046 |
| 2011-05 | 31 | 0.3867 | 0.3919 |
| 2011-06 | 30 | 0.3824 | 0.3941 |
| 2011-07 | 31 | 0.3652 | 0.3695 |
| 2011-08 | 29 | 0.3934 | 0.4069 |
| 2011-09 | 27 | 0.39 | 0.3989 |
| 2011-10 | 30 | 0.3926 | 0.4017 |
| 2011-11 | 29 | 0.4013 | 0.4057 |
| 2011-12 | 28 | 0.3943 | 0.3938 |
| 2012-01 | 28 | 0.4107 | 0.4074 |
| 2012-02 | 25 | 0.4107 | 0.41 |

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

Daily concentration restricted to dates with all 24 observed hours.

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

Evaluate peak service requirements with actual fleet and station constraints.

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/015-daily-peak-concentration/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.
