good changes

This commit is contained in:
Andras Schmelczer 2026-03-25 08:04:48 +00:00
parent 160283f1a1
commit c997ea46a5
26 changed files with 991 additions and 288 deletions

View file

@ -68,9 +68,9 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
features: &[
FeatureConfig {
name: "Last known price",
bounds: Bounds::Percentile {
low: 0.0,
high: 98.0,
bounds: Bounds::Fixed {
min: 0.0,
max: 2_500_000.0,
},
step: 10000.0,
description: "Most recent sale price from the Land Registry",
@ -79,15 +79,15 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
prefix: "£",
suffix: "",
raw: false,
absolute: false,
absolute: true,
modes: &["historical"],
linked: "",
},
FeatureConfig {
name: "Estimated current price",
bounds: Bounds::Percentile {
low: 0.0,
high: 98.0,
bounds: Bounds::Fixed {
min: 0.0,
max: 2_500_000.0,
},
step: 10000.0,
description: "Inflation-adjusted estimate of the current property value",
@ -96,7 +96,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
prefix: "£",
suffix: "",
raw: false,
absolute: false,
absolute: true,
modes: &["historical"],
linked: "Asking price",
},
@ -252,9 +252,9 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
},
FeatureConfig {
name: "Asking price",
bounds: Bounds::Percentile {
low: 0.0,
high: 98.0,
bounds: Bounds::Fixed {
min: 0.0,
max: 2_500_000.0,
},
step: 10000.0,
description: "Listed asking price for properties currently for sale",
@ -263,7 +263,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
prefix: "£",
suffix: "",
raw: false,
absolute: false,
absolute: true,
modes: &["buy"],
linked: "Estimated current price",
},
@ -949,6 +949,23 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
modes: &[],
linked: "",
},
FeatureConfig {
name: "Median age",
bounds: Bounds::Percentile {
low: 2.0,
high: 98.0,
},
step: 0.5,
description: "Median age of the local population",
detail: "From the 2021 Census (TS007A). Median age of usual residents in the LSOA, computed by linear interpolation from five-year age band counts. Areas with younger populations tend to be urban, university towns, or have more families; older medians are typical in rural and coastal areas.",
source: "census-2021",
prefix: "",
suffix: " years",
raw: false,
absolute: false,
modes: &[],
linked: "",
},
],
},
FeatureGroup {
@ -996,8 +1013,8 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
},
step: 1.0,
description: "Number of parks and green spaces within 2km",
detail: "Count of parks, gardens, nature reserves, and other green spaces within a 2km radius of the property's postcode centroid. Derived from OpenStreetMap POI data.",
source: "osm-pois",
detail: "Count of public parks, gardens, playing fields, and play spaces within a 2km radius of the property's postcode centroid. Derived from the OS Open Greenspace dataset (Ordnance Survey), which provides authoritative polygon boundaries for green spaces across Great Britain.",
source: "os-open-greenspace",
prefix: "",
suffix: "",
raw: false,
@ -1005,6 +1022,23 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
modes: &[],
linked: "",
},
FeatureConfig {
name: "Distance to nearest park (km)",
bounds: Bounds::Percentile {
low: 2.0,
high: 98.0,
},
step: 0.1,
description: "Distance to the closest park or green space",
detail: "Straight-line distance in kilometres from the property's postcode centroid to the nearest public park, garden, playing field, or play space. Derived from the OS Open Greenspace dataset (Ordnance Survey), which provides authoritative polygon boundaries for green spaces across Great Britain.",
source: "os-open-greenspace",
prefix: "",
suffix: " km",
raw: false,
absolute: false,
modes: &[],
linked: "",
},
],
},
FeatureGroup {
@ -1056,6 +1090,13 @@ pub static ENUM_FEATURE_GROUPS: &[EnumFeatureGroup] = &[
detail: "From HM Land Registry Price Paid data and EPC certificates. Detached, Semi-Detached, Terraced (includes all terrace sub-types), Flats/Maisonettes, or Other (bungalows, park homes, etc.).",
source: "price-paid",
},
EnumFeatureConfig {
name: "Former council house",
order: Some(&["Yes", "No"]),
description: "Whether the property was ever recorded as social housing",
detail: "Derived from the TENURE field in Energy Performance Certificate data. If any EPC certificate for this property recorded the tenure as social rental, it indicates the property was council or housing-association stock at the time of that inspection. Properties that were later sold (e.g. via Right to Buy) retain this flag.",
source: "epc",
},
EnumFeatureConfig {
name: "Current energy rating",
order: Some(&["A", "B", "C", "D", "E", "F", "G"]),
@ -1082,55 +1123,6 @@ pub static ENUM_FEATURE_GROUPS: &[EnumFeatureGroup] = &[
detail: "Maximum available fixed broadband download speed in Megabits per second, from Ofcom's Connected Nations 2025 report. Measured at Output Area level and represents the maximum speed available from any provider, not actual achieved speeds. Tiers: 10 = basic, 30 = superfast (SFBB), 100 = ultrafast 100Mbit, 300 = ultrafast (UFBB), 1000 = gigabit.",
source: "broadband",
},
EnumFeatureConfig {
name: "Environmental risk",
order: Some(&["Low", "Moderate", "Significant"]),
description: "Highest ground stability risk across all six hazard types",
detail: "Overall ground stability risk for the area, taken as the maximum across all six GeoSure hazard categories (collapsible deposits, compressible ground, landslides, running sand, shrink-swell, and soluble rocks). From Ordnance Survey GeoSure data on a 5km hex grid.",
source: "geosure",
},
EnumFeatureConfig {
name: "Collapsible deposits risk",
order: Some(&["Low", "Moderate", "Significant"]),
description: "Risk of ground collapse from natural underground cavities",
detail: "From OS GeoSure. Indicates the likelihood of ground collapse due to natural cavities formed by dissolution of soluble rocks or the collapse of old mines and natural pipes. Rated on a 5km hex grid across Great Britain.",
source: "geosure",
},
EnumFeatureConfig {
name: "Compressible ground risk",
order: Some(&["Low", "Moderate", "Significant"]),
description: "Risk of ground compression causing subsidence",
detail: "From OS GeoSure. Indicates the potential for ground to compress under loading, which can cause gradual settlement or subsidence of buildings and infrastructure. Typically associated with soft clay, silt, or peat deposits.",
source: "geosure",
},
EnumFeatureConfig {
name: "Landslide risk",
order: Some(&["Low", "Moderate", "Significant"]),
description: "Risk of landslide or slope instability",
detail: "From OS GeoSure. Indicates the susceptibility of the ground to landslides and slope instability. Based on slope angle, geology, and historical landslide records.",
source: "geosure",
},
EnumFeatureConfig {
name: "Running sand risk",
order: Some(&["Low", "Moderate", "Significant"]),
description: "Risk of sand becoming fluid when saturated",
detail: "From OS GeoSure. Indicates the potential for fine-grained sand to behave like a fluid when saturated with water, which can affect excavations and foundations.",
source: "geosure",
},
EnumFeatureConfig {
name: "Shrink-swell risk",
order: Some(&["Low", "Moderate", "Significant"]),
description: "Risk of clay shrinking and swelling with moisture changes",
detail: "From OS GeoSure. Indicates the potential for clay-rich soils to shrink when dry and swell when wet, causing ground movement that can damage buildings and infrastructure. One of the most common causes of subsidence in the UK.",
source: "geosure",
},
EnumFeatureConfig {
name: "Soluble rocks risk",
order: Some(&["Low", "Moderate", "Significant"]),
description: "Risk of sinkholes from dissolution of soluble rocks",
detail: "From OS GeoSure. Indicates the potential for soluble rocks (limestone, chalk, gypsum) to dissolve, creating underground voids that can lead to sinkholes and ground subsidence.",
source: "geosure",
},
],
},
];