Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions FINDINGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,12 @@ on the standard deviation), and the region explains 23.3% of utility-level
variance against 42.0% under random labels, so utilities do differ, by roughly a
quarter of what the raw numbers suggest.

**Worked example.** PPL Electric Utilities carries 98 study groups and 349
projects in this population, with survivors exposed to 1.80x and 60.5% of scoped
cost stranded under a sunk-cost rule. That is seventh of sixteen PJM utilities
and within 0.03x of the PJM median, which given the null is the honest reading:
indistinguishable from typical.
**Worked example.** The example is picked by rule rather than by result: the
PJM transmission owner with the most study groups, which is AEP. It carries 267
study groups and 868 projects in this population, with survivors exposed to
1.75x and 60.8% of scoped cost stranded under a sunk-cost rule. That is eleventh
of sixteen PJM utilities and within 0.03x of the PJM median, which given the
null is the honest reading: indistinguishable from typical.

**Rests on.** Real transmission owner labels for 89.7% of study groups. Loci
where the modal owner holds under half the reported labels are dropped rather
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ doubling of assigned cost; queue congestion and exposure alone produce only
failures are published, not fixed by re-fitting.
- **The claims are guarded.** `tools/check_claims.py` pairs every figure in this
file with the results that produce it, fails on drift, requires the caveats to
stay, and rejects overclaiming phrasings. 244 tests cover the rest.
stay, and rejects overclaiming phrasings. 245 tests cover the rest.
- **It is checked against what actually happened, and the failures are
published.** `results/external_validation.json` scores the mechanisms against
2024-2026 cluster outcomes: three pass and three fail, and the failures bound
Expand Down Expand Up @@ -384,7 +384,7 @@ results/ one JSON per track plus validation.json, meta.json and
run_mode.json, which is what check_claims verifies against
figures/ 9 figures
data/ queue_source.json (the input pin) and external/evidence.csv
tests/ 244 tests
tests/ 245 tests
```

## Reproduce
Expand All @@ -410,11 +410,11 @@ summary statistics. No non-public, internal, confidential or
commercially sensitive information appears anywhere in this repository or its
history.

That matters most for track 9, which reports exposure by transmission owner and
uses one PJM transmission owner as its worked example. Those figures are derived
entirely from the public LBNL queue, and given that track's own finding, that
utility's number is statistically indistinguishable from the median of its
peers.
Track 9 reports exposure by transmission owner. Its worked example is picked by
rule, not by result: the PJM owner with the most study groups (AEP). Those
figures are derived entirely from the public LBNL queue, and given that track's
own finding, that utility's number is statistically indistinguishable from the
median of its peers.

## Data and license

Expand Down
Binary file modified figures/fig7_track9_utility.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion queuetax/shared/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ def fig_track9_utility(payload: dict) -> Path:
fig, axes = plt.subplots(1, 2, figsize=(10.5, 4.4), width_ratios=[2, 1])

values = table["weighted_inflation"].to_numpy(float)
colors = [ACCENT if u.upper() == "PPL" else MUTED for u in table["utility"]]
ex = payload.get("worked_example", {})
colors = [ACCENT if (u, r) == (ex.get("utility"), ex.get("region")) else MUTED
for u, r in zip(table["utility"], table["region"])]
axes[0].bar(range(len(values)), values, color=colors, width=0.9)
axes[0].axhline(np.median(values), color=SECOND, linewidth=1.2, linestyle="--",
label="median utility")
Expand Down
24 changes: 20 additions & 4 deletions queuetax/tracks/track9_utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,25 @@ def compare_to_regional_spread(table: pd.DataFrame, regional_table: pd.DataFrame
return out


def worked_example(table: pd.DataFrame, utility: str = "PPL") -> dict:
"""One utility's own exposure, in the terms its interconnection team uses."""
match = table[table["utility"].str.upper() == utility.upper()]
def example_utility(table: pd.DataFrame, region: str = "PJM") -> str:
"""The worked example is picked by a fixed rule, not by its result: the
transmission owner with the most study groups in the region, which is also
the one whose number rests on the most data."""
block = table[table["region"] == region]
return str(block.sort_values(["n_groups", "utility"], ascending=[False, True])
.iloc[0]["utility"])


def worked_example(table: pd.DataFrame, utility: str | None = None,
region: str = "PJM") -> dict:
"""One utility's own exposure, in the terms its interconnection team uses.

Matched on region as well as name: some owners (AEP, for one) report
in more than one region, and each region is a separate row."""
if utility is None:
utility = example_utility(table, region)
match = table[(table["utility"].str.upper() == utility.upper())
& (table["region"] == region)]
if match.empty:
return {"available": False, "utility": utility}
row = match.iloc[0]
Expand Down Expand Up @@ -255,5 +271,5 @@ def run(
"permutation_null": permutation_null(labelled, table, n_permutations=n_permutations),
"variance_decomposition": variance_decomposition(table),
"versus_regional": compare_to_regional_spread(table, regional_table),
"worked_example_ppl": worked_example(table, "PPL"),
"worked_example": worked_example(table),
}
2 changes: 1 addition & 1 deletion results/meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"n_tests": 244,
"n_tests": 245,
"n_figures": 9,
"n_tracks": 10,
"n_result_files": 18
Expand Down
16 changes: 8 additions & 8 deletions results/track9_utility.json
Original file line number Diff line number Diff line change
Expand Up @@ -716,17 +716,17 @@
},
"west_exceeds_cross_region": true
},
"worked_example_ppl": {
"worked_example": {
"available": true,
"utility": "PPL",
"utility": "AEP",
"region": "PJM",
"n_groups": 98,
"n_projects": 349,
"weighted_inflation": 1.797056618041088,
"stranded_share_of_initial": 0.6050654895933012,
"mean_survivor_mw_share": 0.26230108380551875,
"n_groups": 267,
"n_projects": 868,
"weighted_inflation": 1.7455991108448161,
"stranded_share_of_initial": 0.6081649385146042,
"mean_survivor_mw_share": 0.26231278664580554,
"rank_in_region": [
7,
11,
16
],
"region_median_inflation": 1.7736734989380674
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_hybrid_capacity_is_summed_across_mw_columns():
"mw3": [np.nan],
"region": ["PJM"],
"entity": ["PJM"],
"utility": ["PPL"],
"utility": ["AEP"],
"cluster": [None],
"service": ["NRIS"],
"project_type": ["Generation"],
Expand Down
20 changes: 15 additions & 5 deletions tests/test_track9.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,22 @@ def test_raw_spread_comparison_would_have_been_misleading(results):
def test_worked_example_reports_rank_not_just_a_number(results):
"""A single utility's exposure means nothing without its position among
peers, given how much of the spread is noise."""
ppl = results["track9_utility"]["worked_example_ppl"]
assert ppl["available"]
assert ppl["region"] == "PJM"
rank, total = ppl["rank_in_region"]
ex = results["track9_utility"]["worked_example"]
assert ex["available"]
assert ex["region"] == "PJM"
rank, total = ex["rank_in_region"]
assert 1 <= rank <= total
assert abs(ppl["weighted_inflation"] - ppl["region_median_inflation"]) < 0.2
assert abs(ex["weighted_inflation"] - ex["region_median_inflation"]) < 0.2


def test_worked_example_is_picked_by_rule_not_by_result(results):
"""The example must be the PJM owner with the most study groups, so nobody
can choose a utility because its number tells a convenient story."""
payload = results["track9_utility"]
pjm = [r for r in payload["table"] if r["region"] == "PJM"]
largest = max(pjm, key=lambda r: r["n_groups"])
assert payload["worked_example"]["utility"] == largest["utility"]
assert payload["worked_example"]["n_groups"] == largest["n_groups"]


def test_variance_decomposition_sums_to_one(results):
Expand Down
7 changes: 5 additions & 2 deletions tools/check_claims.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,11 @@ def d(*path, source):
Claim("t9_null_between", r"against ([\d.]+)% under random labels",
lambda: d("permutation_null", "null_between_region_share_mean", source=t9) * 100,
pct, 0.05),
Claim("t9_ppl", r"survivors exposed to ([\d.]+)x",
lambda: d("worked_example_ppl", "weighted_inflation", source=t9), mult, 0.01),
Claim("t9_example", r"survivors exposed to ([\d.]+)x",
lambda: d("worked_example", "weighted_inflation", source=t9), mult, 0.01),
Claim("t9_example_stranded", r"1\.\d+x and ([\d.]+)% of scoped cost stranded",
lambda: d("worked_example", "stranded_share_of_initial", source=t9) * 100,
pct, 0.05),
Claim("t10_coverage", r"come to ([\d.]+)% of the cost shifted",
lambda: d("headline", "coverage_ratio", source=t10) * 100, pct, 0.05),
# Two phrasings, each anchored so it cannot capture a neighbouring bound:
Expand Down
Loading