Skip to content

Commit 396d01a

Browse files
committed
feat(urban-nature): add אזורי טבע עירוני to Urban95 Nature scoring
- Export אזורי טבע עירוני from SekerTevaIroni.gdb to urban_nature_areas.geojson - Score binary 300m proximity as Nature subcategory (50/50 with parks) - Add subtle green map overlay with layer toggle (off by default) - Regenerate buildings lookup and neighborhood aggregates with new subscore
1 parent 430720f commit 396d01a

26 files changed

Lines changed: 242 additions & 16 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ new-data/
1313
# Keep docs/data/ for website deployment (generated by preprocessing)
1414
!docs/data/
1515
docs/data/buildings_accessibility.geojson
16+
docs/data/SekerTevaIroni.gdb
1617
docs/score-mockups/
1718
docs/superpowers/

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ Each category is itself built from subcategory weights in `src/index calculation
6565
- Trees: 20%
6666
- Distance from fast roads: 40%
6767
- **Nature**
68-
- Parks: 100%
68+
- Parks: 50%
69+
- Urban nature areas: 50% (any site polygon within 300 m)
6970
- **Play**
7071
- Playgrounds: 100%
7172
- **Safety & Mobility**

docs/app.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const {
88
POPULATION_GRID_URL,
99
SOCIOECONOMIC_URL,
1010
PARKS_URL,
11+
URBAN_NATURE_AREAS_URL,
1112
TREES_URL,
1213
STREET_LIGHTS_URL,
1314
AMENITIES_CLEAN_URL,
@@ -68,6 +69,7 @@ const {
6869
createBuildingsFillLayer,
6970
createBuildingsSelectedLayer,
7071
applyParkDotPattern,
72+
applyUrbanNatureDotPattern,
7173
Urban95ScoreSidebar,
7274
Urban95InfoModal,
7375
Urban95Dashboards,
@@ -156,6 +158,7 @@ const legendLabels = document.getElementById("legend-labels");
156158
const SYM_PCT_KEY = "_u95_symb_pct";
157159
const tooltip = document.getElementById("tooltip");
158160
const radiusToggle = document.getElementById("radius-toggle");
161+
const showUrbanNatureToggle = document.getElementById("show-urban-nature-toggle");
159162
const showTreesToggle = document.getElementById("show-trees-toggle");
160163
const showLightsToggle = document.getElementById("show-lights-toggle");
161164
const showAmenityPointsToggle = document.getElementById("show-amenity-points-toggle");
@@ -361,6 +364,7 @@ const SCHOOLS_SOURCE_ID = "schools";
361364
const SCHOOLS_LAYER_ID = "schools-points";
362365
const KIDS_POPULATION_SOURCE_ID = "kids-population-grid";
363366
const KIDS_POPULATION_LAYER_ID = "kids-population-grid-fill";
367+
const URBAN_NATURE_LAYER_ID = "urban-nature-fill";
364368
const SOCIOECONOMIC_SOURCE_ID = "socioeconomic-statareas";
365369
const SOCIOECONOMIC_FILL_LAYER_ID = "socioeconomic-statareas-fill";
366370
const SOCIOECONOMIC_OUTLINE_LAYER_ID = "socioeconomic-statareas-outline";
@@ -785,6 +789,7 @@ const modeController = Urban95ModeController.create({
785789
function switchMode(mode) {
786790
const result = modeController.switchMode(mode);
787791
applySchoolsLayerVisibility();
792+
applyUrbanNatureVisibility();
788793
return result;
789794
}
790795
const applyHouseModeHexBackground = modeController.applyHouseModeHexBackground;
@@ -1241,9 +1246,11 @@ Urban95AppStartupBridge.bindStartup({
12411246
applyScoreModeAmenities: amenityMode.apply,
12421247
clearDerivedCaches: clearDerivedCachesState,
12431248
applyHouseModeHexBackground: applyHouseModeHexBackground,
1249+
applyUrbanNatureVisibility: applyUrbanNatureVisibility,
12441250
},
12451251
renderers: {
12461252
applyParkDotPattern: applyParkDotPattern,
1253+
applyUrbanNatureDotPattern: applyUrbanNatureDotPattern,
12471254
addAmenityLayers: Urban95MapRenderers.addAmenityLayers,
12481255
applyShowPointsToggle: Urban95MapRenderers.applyShowPointsToggle,
12491256
updateBuildingColors: Urban95MapRenderers.updateBuildingColors,
@@ -1254,6 +1261,7 @@ Urban95AppStartupBridge.bindStartup({
12541261
urls: {
12551262
buildings: BUILDINGS_URL,
12561263
parks: PARKS_URL,
1264+
urbanNatureAreas: URBAN_NATURE_AREAS_URL,
12571265
},
12581266
});
12591267
Urban95MapEvents.bind({
@@ -1366,6 +1374,17 @@ function ensureKidsPopulationLayer() {
13661374
);
13671375
}
13681376
}
1377+
function applyUrbanNatureVisibility() {
1378+
if (!map.getLayer(URBAN_NATURE_LAYER_ID)) return;
1379+
const enabled = showUrbanNatureToggle && showUrbanNatureToggle.checked;
1380+
const showInMode = currentMode === "house" || currentMode === "citywide";
1381+
map.setLayoutProperty(
1382+
URBAN_NATURE_LAYER_ID,
1383+
"visibility",
1384+
enabled && showInMode ? "visible" : "none"
1385+
);
1386+
}
1387+
13691388
function applyKidsPopulationVisibility() {
13701389
if (!map.getLayer(KIDS_POPULATION_LAYER_ID)) return;
13711390
const visible = showKidsPopulationToggle && showKidsPopulationToggle.checked;
@@ -1662,6 +1681,10 @@ if (showRoadsToggle) {
16621681
showRoadsToggle.addEventListener("change", applyRoadSymbologyVisibility);
16631682
map.on("load", applyRoadSymbologyVisibility);
16641683
}
1684+
if (showUrbanNatureToggle) {
1685+
showUrbanNatureToggle.addEventListener("change", applyUrbanNatureVisibility);
1686+
map.on("load", applyUrbanNatureVisibility);
1687+
}
16651688
if (showKidsPopulationToggle) {
16661689
showKidsPopulationToggle.addEventListener("change", applyKidsPopulationVisibility);
16671690
}
127 KB
Binary file not shown.

docs/data/buildings_lookup.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/data/buildings_lookup.json.gz

23 KB
Binary file not shown.

docs/data/citywide_stats.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)