From 428dfebe8398690e19b7fd6573adcf328c13d1b4 Mon Sep 17 00:00:00 2001 From: Emi Griffith Date: Sat, 11 Jul 2026 17:25:36 -0700 Subject: [PATCH] Compare: match-score ranking, tolerance range, fix Feels basis (#69) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ranking by raw comfort% tied extreme places (Death Valley ranked #2 just because 26% of days happened to land in-band). Replace it with a weighted score that folds in tolerance days and miss magnitude, add an outer tolerance range, and fix the Feels basis. - Match score (0–100): each day scores full credit inside comfort [lo,hi], partial credit inside the tolerance range (ramped 1→0 by how far past the comfort edge it lands), zero beyond tolerance. Rank by the mean; tie-break by smaller typical miss. Death Valley's hot days now score ~0 so it drops to last. The score is the card's headline number. - Tolerance range [tlo, thi] as an outer dual-thumb pair on the same track (four handles, tlo ≤ lo ≤ hi ≤ thi), persisted + in the share hash. Defaults to comfort widened 10° each side. The diverging bar now splits each side into a within-tolerance band (lighter, near centre) and a beyond-tolerance band (saturated), and the baseline strip shades the tolerance range faintly around the comfort band. - Feels basis now judges the felt daytime high (fmax) instead of the combined `feels` metric, which reports whichever apparent extreme is furthest from 65°F — in mild climates that flips to the cold overnight low in winter and made comfortable days nearly vanish. --- static/compare.html | 13 +++-- static/compare.js | 124 ++++++++++++++++++++++++++++++++------------ static/style.css | 31 +++++++---- 3 files changed, 121 insertions(+), 47 deletions(-) diff --git a/static/compare.html b/static/compare.html index 70c41b9..92722b0 100644 --- a/static/compare.html +++ b/static/compare.html @@ -59,13 +59,18 @@ the date range or the location set trigger a data load. -->