Fun changes
This commit is contained in:
parent
cd778dd088
commit
349a6c1d53
60 changed files with 1260 additions and 2600 deletions
|
|
@ -28,16 +28,12 @@ pub struct FeatureConfig {
|
|||
pub raw: bool,
|
||||
/// If true, the slider uses absolute min/max/step instead of percentile scaling
|
||||
pub absolute: bool,
|
||||
/// Listing modes this feature is available in (empty = all modes)
|
||||
pub modes: &'static [&'static str],
|
||||
/// Name of the linked feature that swaps when switching modes (empty = no link)
|
||||
pub linked: &'static str,
|
||||
}
|
||||
|
||||
/// Features whose histogram bins should be exactly 1 unit wide (one per integer).
|
||||
/// p1/p99 are snapped to integer boundaries before binning.
|
||||
pub const INTEGER_BIN_FEATURES: &[&str] =
|
||||
&["Number of bedrooms & living rooms", "Bedrooms", "Bathrooms"];
|
||||
&["Number of bedrooms & living rooms"];
|
||||
|
||||
pub struct EnumFeatureConfig {
|
||||
pub name: &'static str,
|
||||
|
|
@ -69,13 +65,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
FeatureGroup {
|
||||
name: "Properties",
|
||||
features: &[
|
||||
Feature::Enum(EnumFeatureConfig {
|
||||
name: "Listing status",
|
||||
order: Some(&["Historical sale", "For sale", "For rent"]),
|
||||
description: "Whether the property is from historical sales, currently for sale, or for rent",
|
||||
detail: "Indicates the source of the property record: 'Historical sale' from HM Land Registry Price Paid data, 'For sale' from current online buy listings, or 'For rent' from current online rental listings.",
|
||||
source: "online-listings",
|
||||
}),
|
||||
Feature::Enum(EnumFeatureConfig {
|
||||
name: "Property type",
|
||||
order: Some(&["Detached", "Semi-Detached", "Terraced", "Flats/Maisonettes", "Other"]),
|
||||
|
|
@ -104,8 +93,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: false,
|
||||
absolute: true,
|
||||
modes: &["historical"],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Estimated current price",
|
||||
|
|
@ -121,25 +108,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: false,
|
||||
absolute: true,
|
||||
modes: &["historical"],
|
||||
linked: "Asking price",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Asking price",
|
||||
bounds: Bounds::Fixed {
|
||||
min: 0.0,
|
||||
max: 2_500_000.0,
|
||||
},
|
||||
step: 10000.0,
|
||||
description: "Asking price for properties currently listed for sale",
|
||||
detail: "The advertised asking price from online property portals. Only available for 'For sale' listings.",
|
||||
source: "online-listings",
|
||||
prefix: "£",
|
||||
suffix: "",
|
||||
raw: false,
|
||||
absolute: true,
|
||||
modes: &["buy"],
|
||||
linked: "Estimated current price",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Price per sqm",
|
||||
|
|
@ -155,8 +123,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &["historical"],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Est. price per sqm",
|
||||
|
|
@ -172,25 +138,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &["historical"],
|
||||
linked: "Asking price per sqm",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Asking price per sqm",
|
||||
bounds: Bounds::Percentile {
|
||||
low: 0.0,
|
||||
high: 98.0,
|
||||
},
|
||||
step: 100.0,
|
||||
description: "Asking price divided by total floor area",
|
||||
detail: "Calculated by dividing the listed asking price by the total floor area. Only available for properties currently listed for sale where floor area data exists.",
|
||||
source: "online-listings",
|
||||
prefix: "£",
|
||||
suffix: "",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &["buy"],
|
||||
linked: "Est. price per sqm",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Estimated monthly rent",
|
||||
|
|
@ -203,25 +150,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/mo",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &["historical"],
|
||||
linked: "Asking rent (monthly)",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Asking rent (monthly)",
|
||||
bounds: Bounds::Percentile {
|
||||
low: 0.0,
|
||||
high: 98.0,
|
||||
},
|
||||
step: 50.0,
|
||||
description: "Listed monthly rent for properties currently for rent",
|
||||
detail: "The advertised rental price from online property portals, converted to a monthly figure where needed (e.g. weekly or yearly listings). Only available for 'For rent' listings.",
|
||||
source: "online-listings",
|
||||
prefix: "£",
|
||||
suffix: "/mo",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &["rent"],
|
||||
linked: "Estimated monthly rent",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Total floor area (sqm)",
|
||||
|
|
@ -237,8 +165,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: " sqm",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Number of bedrooms & living rooms",
|
||||
|
|
@ -254,42 +180,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: " rooms",
|
||||
raw: false,
|
||||
absolute: true,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Bedrooms",
|
||||
bounds: Bounds::Fixed {
|
||||
min: 0.0,
|
||||
max: 10.0,
|
||||
},
|
||||
step: 1.0,
|
||||
description: "Number of bedrooms from online listing",
|
||||
detail: "Number of bedrooms as advertised in the online property listing. Only populated for online listings (for sale and for rent); null for historical sales.",
|
||||
source: "online-listings",
|
||||
prefix: "",
|
||||
suffix: "",
|
||||
raw: false,
|
||||
absolute: true,
|
||||
modes: &["buy", "rent"],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Bathrooms",
|
||||
bounds: Bounds::Fixed {
|
||||
min: 0.0,
|
||||
max: 10.0,
|
||||
},
|
||||
step: 1.0,
|
||||
description: "Number of bathrooms from online listing",
|
||||
detail: "Number of bathrooms as advertised in the online property listing. Only populated for online listings (for sale and for rent); null for historical sales.",
|
||||
source: "online-listings",
|
||||
prefix: "",
|
||||
suffix: "",
|
||||
raw: false,
|
||||
absolute: true,
|
||||
modes: &["buy", "rent"],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Construction year",
|
||||
|
|
@ -305,8 +195,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: true,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Date of last transaction",
|
||||
|
|
@ -322,25 +210,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: true,
|
||||
absolute: false,
|
||||
modes: &["historical"],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Listing date",
|
||||
bounds: Bounds::Fixed {
|
||||
min: 2006.0,
|
||||
max: 2026.0,
|
||||
},
|
||||
step: 1.0,
|
||||
description: "Date the property was first listed online",
|
||||
detail: "The date when the property listing first appeared on the online property portal. Stored as a datetime; converted to fractional year for filtering. Only populated for online listings.",
|
||||
source: "online-listings",
|
||||
prefix: "",
|
||||
suffix: "",
|
||||
raw: true,
|
||||
absolute: false,
|
||||
modes: &["buy", "rent"],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Enum(EnumFeatureConfig {
|
||||
name: "Former council house",
|
||||
|
|
@ -377,8 +246,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: " m",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &["historical"],
|
||||
linked: "",
|
||||
}),
|
||||
],
|
||||
},
|
||||
|
|
@ -399,8 +266,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: " km",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
],
|
||||
},
|
||||
|
|
@ -421,8 +286,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Good+ secondary schools within 2km",
|
||||
|
|
@ -438,8 +301,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Good+ primary schools within 5km",
|
||||
|
|
@ -455,8 +316,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Good+ secondary schools within 5km",
|
||||
|
|
@ -472,8 +331,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Education, Skills and Training Score",
|
||||
|
|
@ -489,8 +346,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
],
|
||||
},
|
||||
|
|
@ -508,8 +363,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Employment Score (rate)",
|
||||
|
|
@ -522,8 +375,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Health Deprivation and Disability Score",
|
||||
|
|
@ -539,8 +390,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Living Environment Score",
|
||||
|
|
@ -556,8 +405,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Indoors Sub-domain Score",
|
||||
|
|
@ -573,8 +420,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Outdoors Sub-domain Score",
|
||||
|
|
@ -590,8 +435,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
],
|
||||
},
|
||||
|
|
@ -612,8 +455,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/yr",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Minor crime per 1k residents (avg/yr)",
|
||||
|
|
@ -629,8 +470,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/yr",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Serious crime (avg/yr)",
|
||||
|
|
@ -646,8 +485,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/yr",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Minor crime (avg/yr)",
|
||||
|
|
@ -663,8 +500,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/yr",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Violence and sexual offences (avg/yr)",
|
||||
|
|
@ -680,8 +515,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/yr",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Burglary (avg/yr)",
|
||||
|
|
@ -697,8 +530,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/yr",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Robbery (avg/yr)",
|
||||
|
|
@ -714,8 +545,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/yr",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Vehicle crime (avg/yr)",
|
||||
|
|
@ -731,8 +560,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/yr",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Anti-social behaviour (avg/yr)",
|
||||
|
|
@ -748,8 +575,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/yr",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Criminal damage and arson (avg/yr)",
|
||||
|
|
@ -765,8 +590,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/yr",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Other theft (avg/yr)",
|
||||
|
|
@ -782,8 +605,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/yr",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Theft from the person (avg/yr)",
|
||||
|
|
@ -799,8 +620,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/yr",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Shoplifting (avg/yr)",
|
||||
|
|
@ -816,8 +635,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/yr",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Bicycle theft (avg/yr)",
|
||||
|
|
@ -833,8 +650,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/yr",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Drugs (avg/yr)",
|
||||
|
|
@ -850,8 +665,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/yr",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Possession of weapons (avg/yr)",
|
||||
|
|
@ -867,8 +680,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/yr",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Public order (avg/yr)",
|
||||
|
|
@ -884,8 +695,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/yr",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Other crime (avg/yr)",
|
||||
|
|
@ -901,8 +710,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "/yr",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
],
|
||||
},
|
||||
|
|
@ -923,8 +730,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: " years",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "% White",
|
||||
|
|
@ -940,8 +745,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "%",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "% South Asian",
|
||||
|
|
@ -957,8 +760,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "%",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "% Black",
|
||||
|
|
@ -974,8 +775,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "%",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "% East Asian",
|
||||
|
|
@ -991,8 +790,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "%",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "% Mixed",
|
||||
|
|
@ -1008,8 +805,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "%",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "% Other",
|
||||
|
|
@ -1025,8 +820,148 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "%",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
],
|
||||
},
|
||||
FeatureGroup {
|
||||
name: "Politics",
|
||||
features: &[
|
||||
Feature::Enum(EnumFeatureConfig {
|
||||
name: "Winning party",
|
||||
order: Some(&[
|
||||
"Labour",
|
||||
"Conservative",
|
||||
"Liberal Democrat",
|
||||
"Reform UK",
|
||||
"Green",
|
||||
"Other parties",
|
||||
]),
|
||||
description:
|
||||
"Party that won the parliamentary constituency in the 2024 General Election",
|
||||
detail: "The political party that won the most votes in the constituency covering this postcode, from the July 2024 UK General Election. Based on first-past-the-post results published by the UK Parliament. Constituencies were redrawn for 2024 using the Boundary Commission's 2023 review.",
|
||||
source: "election-results",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "% Labour",
|
||||
bounds: Bounds::Fixed {
|
||||
min: 0.0,
|
||||
max: 100.0,
|
||||
},
|
||||
step: 1.0,
|
||||
description: "Labour vote share in the 2024 General Election",
|
||||
detail: "Percentage of valid votes cast for the Labour Party in the constituency covering this postcode, from the July 2024 UK General Election. Includes votes for all Labour candidates where multiple stood.",
|
||||
source: "election-results",
|
||||
prefix: "",
|
||||
suffix: "%",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "% Conservative",
|
||||
bounds: Bounds::Fixed {
|
||||
min: 0.0,
|
||||
max: 100.0,
|
||||
},
|
||||
step: 1.0,
|
||||
description: "Conservative vote share in the 2024 General Election",
|
||||
detail: "Percentage of valid votes cast for the Conservative Party in the constituency covering this postcode, from the July 2024 UK General Election.",
|
||||
source: "election-results",
|
||||
prefix: "",
|
||||
suffix: "%",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "% Liberal Democrat",
|
||||
bounds: Bounds::Fixed {
|
||||
min: 0.0,
|
||||
max: 100.0,
|
||||
},
|
||||
step: 1.0,
|
||||
description: "Liberal Democrat vote share in the 2024 General Election",
|
||||
detail: "Percentage of valid votes cast for the Liberal Democrats in the constituency covering this postcode, from the July 2024 UK General Election.",
|
||||
source: "election-results",
|
||||
prefix: "",
|
||||
suffix: "%",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "% Reform UK",
|
||||
bounds: Bounds::Fixed {
|
||||
min: 0.0,
|
||||
max: 100.0,
|
||||
},
|
||||
step: 1.0,
|
||||
description: "Reform UK vote share in the 2024 General Election",
|
||||
detail: "Percentage of valid votes cast for Reform UK in the constituency covering this postcode, from the July 2024 UK General Election.",
|
||||
source: "election-results",
|
||||
prefix: "",
|
||||
suffix: "%",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "% Green",
|
||||
bounds: Bounds::Fixed {
|
||||
min: 0.0,
|
||||
max: 100.0,
|
||||
},
|
||||
step: 1.0,
|
||||
description: "Green Party vote share in the 2024 General Election",
|
||||
detail: "Percentage of valid votes cast for the Green Party in the constituency covering this postcode, from the July 2024 UK General Election.",
|
||||
source: "election-results",
|
||||
prefix: "",
|
||||
suffix: "%",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "% Other parties",
|
||||
bounds: Bounds::Fixed {
|
||||
min: 0.0,
|
||||
max: 100.0,
|
||||
},
|
||||
step: 1.0,
|
||||
description: "Combined vote share of all other parties and independents",
|
||||
detail: "Percentage of valid votes cast for parties other than Labour, Conservative, Liberal Democrat, Reform UK, and Green in the constituency covering this postcode. Includes independents, the Speaker, and smaller parties.",
|
||||
source: "election-results",
|
||||
prefix: "",
|
||||
suffix: "%",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Voter turnout (%)",
|
||||
bounds: Bounds::Percentile {
|
||||
low: 2.0,
|
||||
high: 98.0,
|
||||
},
|
||||
step: 0.5,
|
||||
description:
|
||||
"Percentage of registered voters who voted in the 2024 General Election",
|
||||
detail: "The proportion of the registered electorate who cast a valid vote in the July 2024 UK General Election. Calculated as valid votes divided by electorate size. Higher turnout generally correlates with more affluent areas and closer contests.",
|
||||
source: "election-results",
|
||||
prefix: "",
|
||||
suffix: "%",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Majority (%)",
|
||||
bounds: Bounds::Percentile {
|
||||
low: 2.0,
|
||||
high: 98.0,
|
||||
},
|
||||
step: 0.5,
|
||||
description:
|
||||
"Winning margin as a percentage of valid votes in the 2024 General Election",
|
||||
detail: "The difference in votes between the winning candidate and the runner-up, expressed as a percentage of total valid votes cast. A small majority indicates a marginal seat (competitive); a large majority indicates a safe seat. From the July 2024 UK General Election results published by the UK Parliament.",
|
||||
source: "election-results",
|
||||
prefix: "",
|
||||
suffix: "%",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
}),
|
||||
],
|
||||
},
|
||||
|
|
@ -1047,25 +982,21 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: " km",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Number of parks within 2km",
|
||||
name: "Number of parks within 1km",
|
||||
bounds: Bounds::Percentile {
|
||||
low: 5.0,
|
||||
high: 95.0,
|
||||
},
|
||||
step: 1.0,
|
||||
description: "Number of parks and green spaces within 2km",
|
||||
detail: "Count of public parks, gardens, playing fields, and play spaces with at least one entrance within a 2km radius of the property's postcode centroid. Derived from the OS Open Greenspace dataset (Ordnance Survey), using park entrance locations for accurate proximity matching.",
|
||||
description: "Number of parks and green spaces within 1km",
|
||||
detail: "Count of public parks, gardens, playing fields, and play spaces with at least one entrance within a 1km radius of the property's postcode centroid. Derived from the OS Open Greenspace dataset (Ordnance Survey), using park entrance locations for accurate proximity matching.",
|
||||
source: "os-open-greenspace",
|
||||
prefix: "",
|
||||
suffix: "",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Number of restaurants within 2km",
|
||||
|
|
@ -1081,8 +1012,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Number of grocery shops and supermarkets within 2km",
|
||||
|
|
@ -1098,8 +1027,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: "",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Numeric(FeatureConfig {
|
||||
name: "Noise (dB)",
|
||||
|
|
@ -1115,8 +1042,6 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
suffix: " dB",
|
||||
raw: false,
|
||||
absolute: false,
|
||||
modes: &[],
|
||||
linked: "",
|
||||
}),
|
||||
Feature::Enum(EnumFeatureConfig {
|
||||
name: "Max available download speed (Mbps)",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue