station_outage_rates¶
station_outage_rates
¶
Per-station fraction of time empty (stockout) and full (saturation).
The most basic service-quality statistic, the kind reported as "station X is empty 24% of the time". A pure boolean count over the observed snapshots.
Returns:
| Type | Description |
|---|---|
DataFrame
|
|
See Also
service_reliability_index : Time-of-day service probabilities.
outage_survival : Duration of the outages this counts.
censored_time_ratio : The same censoring as a single ratio.
Examples:
>>> import pandas as pd
>>> panel = pd.DataFrame({
... "system_id": "s", "station_id": "a",
... "num_bikes_available": [0, 0, 5, 5], "num_docks_available": [10, 10, 5, 0],
... })
>>> out = station_outage_rates(panel)
>>> float(out["stockout_rate"].iloc[0]), float(out["saturation_rate"].iloc[0])
(0.5, 0.25)