aboutsummaryrefslogtreecommitdiffstats
path: root/app/components.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/components.js')
-rw-r--r--app/components.js83
1 files changed, 59 insertions, 24 deletions
diff --git a/app/components.js b/app/components.js
index 1c8c6aa..0995692 100644
--- a/app/components.js
+++ b/app/components.js
@@ -422,7 +422,7 @@ export class Sidebar {
children: [
Dom.heading(
3,
- "Scoring",
+ "Scoring Weights",
new DomOptions({
styles: {
color: "#333",
@@ -431,60 +431,95 @@ export class Sidebar {
},
}),
),
+ // Basic house properties
Widgets.slider(
"w-price",
- "Price weight",
+ "Price",
"price",
this.#weights.price,
this.#onWeightChange,
),
Widgets.slider(
+ "w-year",
+ "Construction Year",
+ "constructionYear",
+ this.#weights.constructionYear,
+ this.#onWeightChange,
+ ),
+ Widgets.slider(
+ "w-area",
+ "Living Area",
+ "livingArea",
+ this.#weights.livingArea,
+ this.#onWeightChange,
+ ),
+
+ // Location factors
+ Widgets.slider(
"w-market",
- "Market distance",
+ "Market Distance",
"distanceMarket",
this.#weights.distanceMarket,
this.#onWeightChange,
),
Widgets.slider(
"w-school",
- "School distance",
+ "School Distance",
"distanceSchool",
this.#weights.distanceSchool,
this.#onWeightChange,
),
+
+ // Transit distances
Widgets.slider(
- "w-crime",
- "Crime rate",
- "crimeRate",
- this.#weights.crimeRate,
+ "w-train",
+ "Train Distance",
+ "distanceTrain",
+ this.#weights.distanceTrain,
this.#onWeightChange,
),
Widgets.slider(
- "w-safety",
- "Safety index",
- "safety",
- this.#weights.safety,
+ "w-lightrail",
+ "Light Rail Distance",
+ "distanceLightRail",
+ this.#weights.distanceLightRail,
this.#onWeightChange,
),
Widgets.slider(
- "w-students",
- "S2 students",
- "s2Students",
- this.#weights.s2Students,
+ "w-tram",
+ "Tram Distance",
+ "distanceTram",
+ this.#weights.distanceTram,
this.#onWeightChange,
),
+
+ // Statistical area factors
Widgets.slider(
- "w-railway",
- "Railway distance",
- "distanceRailway",
- this.#weights.distanceRailway,
+ "w-foreign",
+ "Foreign Speakers",
+ "foreignSpeakers",
+ this.#weights.foreignSpeakers,
this.#onWeightChange,
),
Widgets.slider(
- "w-year",
- "Construction year",
- "constructionYear",
- this.#weights.constructionYear,
+ "w-unemployment",
+ "Unemployment Rate",
+ "unemploymentRate",
+ this.#weights.unemploymentRate,
+ this.#onWeightChange,
+ ),
+ Widgets.slider(
+ "w-income",
+ "Average Income",
+ "averageIncome",
+ this.#weights.averageIncome,
+ this.#onWeightChange,
+ ),
+ Widgets.slider(
+ "w-education",
+ "Higher Education",
+ "higherEducation",
+ this.#weights.higherEducation,
this.#onWeightChange,
),
],