You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(scoring): replace weighted Urban95 scores with categorical status averages
- Remove weights and numeric total scores from Urban95 calculations
- Classify indicators as Disappointing, Functioning, or Thriving
- Infer continuous building and neighborhood status surfaces
- Redesign legends, explainers, and comparisons around stoplight statuses
-**Three scales** — Single building (with walking-time area), neighborhood comparison, and citywide summary.
14
14
15
15
---
16
16
@@ -36,53 +36,33 @@ Processed layers for the website live under **`docs/data/`** (GeoJSON plus `neig
36
36
37
37
Typical files include building footprints with accessibility fields, amenity layers (`amenities_new.geojson`, `amenities_all.geojson`), trees, parks, street lights, precomputed walking isochrones, and neighborhood boundaries. Exact filenames must match `docs/app.js`.
-**Urban95 subcategory scores**: `score_weighted_sub_<category>_<subcategory>_*` (generated by `python -m pipeline run score` via `stages/urban95_scoring.py` from `lib/urban95_weights.py`).
-**Urban95 direct indicator status**: `u95_status_sub_<category>_<indicator>_*`.
44
+
-**Urban95 diagnostic status**: `u95_status_detail_<category>_<parent>_<child>_*`. School and Kindergarten are Education diagnostics; Clinic and Tipat Halav are Health diagnostics. They are visible in drill-downs but excluded from means.
43
45
-**Amenities Focus score**: `score_expanded_*`.
44
46
45
-
(`*` is one of `_5min`, `_10min`, `_15min`.)
47
+
`*` is one of `_5min`, `_10min`, `_15min`; the frontend currently consumes `_10min`. Urban95 publishes status strings, raw explanation measurements such as `summer_si`, and no numeric overview total.
46
48
47
49
---
48
50
49
51
## Scoring methodology
50
52
51
-
### Urban95 (displayed as direct 0-100 score)
52
-
53
-
Urban95 total score is a weighted sum of five category scores. It is a methodology-driven score: category and subcategory definitions are fixed, and score logic is not directly tied to amenity filter categories in the UI.
54
-
55
-
- Environmental Quality: **20%**
56
-
- Nature: **15%**
57
-
- Play: **15%**
58
-
- Safety & Mobility: **25%**
59
-
- Family Services: **25%**
60
-
61
-
Each category is itself built from subcategory weights in `lib/urban95_weights.py`:
62
-
63
-
-**Environmental Quality**
64
-
- Shade: 40% — Beer Sheva BDAR **Spatial Shade Index (`summer_SI`)** from the [Derech Tzel shading metrics guide](https://tzel.org.il/wp-content/uploads/2025/08/Shade-Indicators_eng-2.6.pdf). Values are used as-is (**SI, not SAI**; not recalculated). Each building gets a **300 m area-weighted mean `summer_SI` around the building footprint (near-edge buffer)**, then stored/displayed `summer_si` is **rounded to 1 decimal place with standard half-up ties before output and scoring** (`0.15 → 0.2`, `0.35 → 0.4`). The map shows continuous 0–1 SI using the official interpretation buckets (`<0.10 severe lack`, `0.10–<0.20 significant lack`, `0.20–<0.40 needs improvement`, `0.40–<0.60 good shade`, `≥0.60 excellent shade`). The Urban95 shade sub-score keeps a project-specific ternary mapping on that **rounded** building SI: `<0.20 → 0`, `0.20–<0.40 → 50`, `≥0.40 → 100`.
65
-
- Trees: 20% — count of trees within **20 m of the building footprint edge** (0 / 1–2 / ≥3 → 0 / 50 / 100)
66
-
- Distance from fast roads: 40% — nearest fast road distance measured to the **building footprint edge**
67
-
-**Nature**
68
-
- Parks: 50%
69
-
- Urban nature areas: 50% (any site polygon within 300 m)
70
-
-**Play**
71
-
- Playgrounds: 100%
72
-
-**Safety & Mobility**
73
-
- Street lights: 15%
74
-
- Bicycle access: 15%
75
-
- Bus stops: 30%
76
-
- Shelters: 40%
77
-
-**Family Services**
78
-
- Education: 30%
79
-
- Community centers: 20%
80
-
- Business centers: 20%
81
-
- Health: 30%
82
-
83
-
`Explain score` in the app uses these saved top-level and subcategory score columns so each component shows both its weight and its score.
84
-
85
-
Urban95 columns are stored per `_5min/_10min/_15min` for consistency with the rest of the data model, but Urban95 logic itself is mostly based on fixed-distance **near-edge** rules (buffers/distances from the building footprint) inside category functions in `lib/urban95_weights.py` rather than UI amenity filters. Amenities Focus walking isochrones still originate from building centroids.
53
+
### Urban95 (equal-mean traffic-light statuses)
54
+
55
+
Urban95 preserves the existing spatial indicator rules but presents every public Urban95 result as **Disappointing**, **Functioning**, **Thriving**, or **Unknown**. It does not publish, display, rank, or reconstruct a numeric Urban95 overview total.
56
+
57
+
The hierarchy is Environmental Quality (Shade, Trees, Distance from fast roads), Nature (Parks, Urban nature areas), Play (Playgrounds), Safety & Mobility (Street lights, Bicycle access, Bus stops, Shelters), and Family Services (Education, Community centers, Business centers, Health). Direct indicators retain their project rules and internal 0/0.5/1 attainment levels. Sibling direct indicators contribute equally to their category; the five categories contribute equally to the overview. Thus categories with more indicators do not have extra influence.
58
+
59
+
Category and overview means use the following status cutoffs: attainment below `0.25` is Disappointing, `0.25` through below `0.75` is Functioning, and `0.75` through `1.00` is Thriving. Exact midpoint ties classify upward. If any required direct child is Unknown, its category is Unknown; if any category is Unknown, the overview is Unknown. Unknown is never replaced with zero or omitted from a denominator.
60
+
61
+
Missing, unreadable, schema-invalid, or failed source evidence produces Unknown for dependent results. A valid empty source or valid empty subtype remains available and follows the normal indicator rule. Per-building calculation failures produce Unknown only for that building. Area summaries count all four statuses and use the uniquely predominant building status only; ties and unsupported areas publish Unknown with a summary reason rather than a hidden average.
62
+
63
+
**Environmental Quality / Shade** — Beer Sheva BDAR **Spatial Shade Index (`summer_SI`)** comes from the [Derech Tzel shading metrics guide](https://tzel.org.il/wp-content/uploads/2025/08/Shade-Indicators_eng-2.6.pdf). Values are used as-is (**SI, not SAI**; not recalculated). Each building gets a **300 m area-weighted mean `summer_SI` around the building footprint (near-edge buffer)**, then stored/displayed `summer_si` is **rounded to 1 decimal place with standard half-up ties before output and status calculation** (`0.15 → 0.2`, `0.35 → 0.4`). The separate official SI interpretation remains `<0.10 severe lack`, `0.10–<0.20 significant lack`, `0.20–<0.40 needs improvement`, `0.40–<0.60 good shade`, and `≥0.60 excellent shade`. Urban95's status rule is project-defined: rounded SI `<0.20`, `0.20–<0.40`, and `≥0.40` map to low, middle, and high attainment respectively.
64
+
65
+
Urban95 status columns retain `_5min/_10min/_15min` for compatibility even though its direct rules are generally fixed-distance **near-edge** rules from building footprints. Amenities Focus walking isochrones still originate from building centroids.
86
66
87
67
### Amenities Focus (internally `expanded`)
88
68
@@ -153,7 +133,7 @@ The commands and browser-facing output contracts above are unchanged. In `run al
153
133
154
134
For acceptance-only warm-run checks, set `PIPELINE_FORBID_MAPBOX=1`. A guarded run validates the complete `(building_id, minutes)` warm aggregate and aborts before token/session/network work when it is incomplete; ordinary unguarded runs retain their existing Mapbox/cache behavior.
155
135
156
-
To recompute Urban95 weighted columns (including shade SI) on existing buildings without Mapbox or isochrones:
136
+
To recompute Urban95 status fields (including shade SI) on existing buildings without Mapbox or isochrones:
157
137
158
138
```powershell
159
139
$env:PYTHONPATH="src"
@@ -168,7 +148,7 @@ You can refresh **one concern** without Mapbox or a full rebuild — but only if
168
148
169
149
| You changed… | Run (no Mapbox unless noted) | Must refresh for the live app |
0 commit comments