LGTM
This commit is contained in:
parent
a8165249a4
commit
a4103b0896
64 changed files with 5376 additions and 3832 deletions
|
|
@ -12,6 +12,8 @@ pub const SERVER_ADDRESS: &str = "0.0.0.0:8001";
|
|||
pub const GRID_CELL_SIZE: f32 = 0.01;
|
||||
pub const MAX_POIS_PER_REQUEST: usize = 10000;
|
||||
pub const MAX_CELLS_PER_REQUEST: usize = 50000;
|
||||
pub const MAX_ROWS_PER_BOUNDS_QUERY: usize = 2_000_000;
|
||||
pub const MAX_ROWS_PER_EXPORT: usize = 250_000;
|
||||
pub const DEFAULT_PROPERTIES_LIMIT: usize = 100;
|
||||
pub const MAX_PROPERTIES_LIMIT: usize = 500;
|
||||
pub const MAX_PRICE_HISTORY_POINTS: usize = 5000;
|
||||
|
|
|
|||
|
|
@ -167,8 +167,8 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
max: 100.0,
|
||||
},
|
||||
step: 1.0,
|
||||
description: "Estimated tree canopy coverage percentile for the property's street",
|
||||
detail: "Approximate street-level tree coverage derived from Forest Research's 2025 Trees Outside Woodland map. Tree canopy polygons for lone trees and groups of trees are counted within 50m of postcode centroids, averaged across Price Paid addresses on the same street, then converted to a percentile across English streets. This is a street proxy, not an exact address-to-road-segment measurement.",
|
||||
description: "Estimated tree canopy coverage percentile for the property's postcode",
|
||||
detail: "Approximate tree canopy coverage around the postcode centroid, derived from Forest Research's 2025 Trees Outside Woodland map. Tree canopy polygons for lone trees and groups of trees are counted within 50m of each postcode centroid, then converted to a percentile across English postcodes. This is a postcode-centroid proxy, not an exact property or street-segment measurement.",
|
||||
source: "forest-research-tow",
|
||||
prefix: "",
|
||||
suffix: "",
|
||||
|
|
@ -500,7 +500,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
},
|
||||
step: 0.1,
|
||||
description: "Serious crime rate per 1,000 residents per year",
|
||||
detail: "Violence, robbery, burglary, and weapons possession per 1,000 usual residents per year in the LSOA. Uses police.uk street-level crime data (2023-2025) and Census 2021 population counts. Normalises for population density so areas are comparable regardless of size.",
|
||||
detail: "Violence, robbery, burglary, and weapons possession per 1,000 usual residents per year in the LSOA. Uses police.uk street-level crime data and Census 2021 population counts. Normalises for population density so areas are comparable regardless of size.",
|
||||
source: "crime",
|
||||
prefix: "",
|
||||
suffix: "/yr",
|
||||
|
|
@ -515,7 +515,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
},
|
||||
step: 0.1,
|
||||
description: "Minor crime rate per 1,000 residents per year",
|
||||
detail: "Anti-social behaviour, shoplifting, bicycle theft, and other lower-severity crime per 1,000 usual residents per year in the LSOA. Uses police.uk street-level crime data (2023-2025) and Census 2021 population counts. Normalises for population density so areas are comparable regardless of size.",
|
||||
detail: "Anti-social behaviour, shoplifting, bicycle theft, and other lower-severity crime per 1,000 usual residents per year in the LSOA. Uses police.uk street-level crime data and Census 2021 population counts. Normalises for population density so areas are comparable regardless of size.",
|
||||
source: "crime",
|
||||
prefix: "",
|
||||
suffix: "/yr",
|
||||
|
|
@ -530,7 +530,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
},
|
||||
step: 1.0,
|
||||
description: "Aggregate of serious crime categories per year",
|
||||
detail: "Sum of violence, robbery, burglary, and weapons possession per year in the LSOA, from police.uk street-level crime data (2023-2025). Provides a single serious crime metric.",
|
||||
detail: "Sum of violence, robbery, burglary, and weapons possession per year in the LSOA, from police.uk street-level crime data. Provides a single serious crime metric.",
|
||||
source: "crime",
|
||||
prefix: "",
|
||||
suffix: "/yr",
|
||||
|
|
@ -545,7 +545,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
},
|
||||
step: 1.0,
|
||||
description: "Aggregate of minor crime categories per year",
|
||||
detail: "Sum of anti-social behaviour, shoplifting, bicycle theft, and other lower-severity crime per year in the LSOA, from police.uk street-level crime data (2023-2025). Provides a single minor crime metric.",
|
||||
detail: "Sum of anti-social behaviour, shoplifting, bicycle theft, and other lower-severity crime per year in the LSOA, from police.uk street-level crime data. Provides a single minor crime metric.",
|
||||
source: "crime",
|
||||
prefix: "",
|
||||
suffix: "/yr",
|
||||
|
|
@ -560,7 +560,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
},
|
||||
step: 1.0,
|
||||
description: "Average yearly violent and sexual offences in the area",
|
||||
detail: "Average number of violence and sexual offences per year in the LSOA, from police.uk street-level crime data (2023-2025). Includes assault, harassment, and sexual offences.",
|
||||
detail: "Average number of violence and sexual offences per year in the LSOA, from police.uk street-level crime data. Includes assault, harassment, and sexual offences.",
|
||||
source: "crime",
|
||||
prefix: "",
|
||||
suffix: "/yr",
|
||||
|
|
@ -575,7 +575,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
},
|
||||
step: 1.0,
|
||||
description: "Average yearly burglary offences in the area",
|
||||
detail: "Average number of burglary offences per year in the LSOA, from police.uk street-level crime data (2023-2025). Includes residential and commercial burglary.",
|
||||
detail: "Average number of burglary offences per year in the LSOA, from police.uk street-level crime data. Includes residential and commercial burglary.",
|
||||
source: "crime",
|
||||
prefix: "",
|
||||
suffix: "/yr",
|
||||
|
|
@ -590,7 +590,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
},
|
||||
step: 1.0,
|
||||
description: "Average yearly robbery offences in the area",
|
||||
detail: "Average number of robbery offences per year in the LSOA, from police.uk street-level crime data (2023-2025). Robbery involves theft with force or threat of force.",
|
||||
detail: "Average number of robbery offences per year in the LSOA, from police.uk street-level crime data. Robbery involves theft with force or threat of force.",
|
||||
source: "crime",
|
||||
prefix: "",
|
||||
suffix: "/yr",
|
||||
|
|
@ -605,7 +605,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
},
|
||||
step: 1.0,
|
||||
description: "Average yearly vehicle crime in the area",
|
||||
detail: "Average number of vehicle crime incidents per year in the LSOA, from police.uk street-level crime data (2023-2025). Includes theft of and from vehicles.",
|
||||
detail: "Average number of vehicle crime incidents per year in the LSOA, from police.uk street-level crime data. Includes theft of and from vehicles.",
|
||||
source: "crime",
|
||||
prefix: "",
|
||||
suffix: "/yr",
|
||||
|
|
@ -620,7 +620,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
},
|
||||
step: 1.0,
|
||||
description: "Average yearly anti-social behaviour incidents in the area",
|
||||
detail: "Average number of anti-social behaviour incidents per year in the LSOA, from police.uk street-level crime data (2023-2025). Includes nuisance, environmental, and personal anti-social behaviour.",
|
||||
detail: "Average number of anti-social behaviour incidents per year in the LSOA, from police.uk street-level crime data. Includes nuisance, environmental, and personal anti-social behaviour.",
|
||||
source: "crime",
|
||||
prefix: "",
|
||||
suffix: "/yr",
|
||||
|
|
@ -635,7 +635,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
},
|
||||
step: 1.0,
|
||||
description: "Average yearly criminal damage and arson in the area",
|
||||
detail: "Average number of criminal damage and arson incidents per year in the LSOA, from police.uk street-level crime data (2023-2025).",
|
||||
detail: "Average number of criminal damage and arson incidents per year in the LSOA, from police.uk street-level crime data.",
|
||||
source: "crime",
|
||||
prefix: "",
|
||||
suffix: "/yr",
|
||||
|
|
@ -650,7 +650,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
},
|
||||
step: 1.0,
|
||||
description: "Average yearly other theft offences in the area",
|
||||
detail: "Average number of 'other theft' offences per year in the LSOA, from police.uk street-level crime data (2023-2025). Includes theft not classified under burglary, vehicle crime, shoplifting, or bicycle theft.",
|
||||
detail: "Average number of 'other theft' offences per year in the LSOA, from police.uk street-level crime data. Includes theft not classified under burglary, vehicle crime, shoplifting, or bicycle theft.",
|
||||
source: "crime",
|
||||
prefix: "",
|
||||
suffix: "/yr",
|
||||
|
|
@ -665,7 +665,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
},
|
||||
step: 1.0,
|
||||
description: "Average yearly theft from the person in the area",
|
||||
detail: "Average number of theft from the person offences per year in the LSOA, from police.uk street-level crime data (2023-2025). Includes pickpocketing and bag snatching without force.",
|
||||
detail: "Average number of theft from the person offences per year in the LSOA, from police.uk street-level crime data. Includes pickpocketing and bag snatching without force.",
|
||||
source: "crime",
|
||||
prefix: "",
|
||||
suffix: "/yr",
|
||||
|
|
@ -680,7 +680,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
},
|
||||
step: 1.0,
|
||||
description: "Average yearly shoplifting offences in the area",
|
||||
detail: "Average number of shoplifting offences per year in the LSOA, from police.uk street-level crime data (2023-2025).",
|
||||
detail: "Average number of shoplifting offences per year in the LSOA, from police.uk street-level crime data.",
|
||||
source: "crime",
|
||||
prefix: "",
|
||||
suffix: "/yr",
|
||||
|
|
@ -695,7 +695,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
},
|
||||
step: 1.0,
|
||||
description: "Average yearly bicycle theft in the area",
|
||||
detail: "Average number of bicycle theft offences per year in the LSOA, from police.uk street-level crime data (2023-2025).",
|
||||
detail: "Average number of bicycle theft offences per year in the LSOA, from police.uk street-level crime data.",
|
||||
source: "crime",
|
||||
prefix: "",
|
||||
suffix: "/yr",
|
||||
|
|
@ -710,7 +710,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
},
|
||||
step: 1.0,
|
||||
description: "Average yearly drug offences in the area",
|
||||
detail: "Average number of drug offences per year in the LSOA, from police.uk street-level crime data (2023-2025). Includes possession and trafficking offences.",
|
||||
detail: "Average number of drug offences per year in the LSOA, from police.uk street-level crime data. Includes possession and trafficking offences.",
|
||||
source: "crime",
|
||||
prefix: "",
|
||||
suffix: "/yr",
|
||||
|
|
@ -725,7 +725,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
},
|
||||
step: 1.0,
|
||||
description: "Average yearly weapons possession offences in the area",
|
||||
detail: "Average number of possession of weapons offences per year in the LSOA, from police.uk street-level crime data (2023-2025).",
|
||||
detail: "Average number of possession of weapons offences per year in the LSOA, from police.uk street-level crime data.",
|
||||
source: "crime",
|
||||
prefix: "",
|
||||
suffix: "/yr",
|
||||
|
|
@ -740,7 +740,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
},
|
||||
step: 1.0,
|
||||
description: "Average yearly public order offences in the area",
|
||||
detail: "Average number of public order offences per year in the LSOA, from police.uk street-level crime data (2023-2025). Includes causing fear, alarm, or distress.",
|
||||
detail: "Average number of public order offences per year in the LSOA, from police.uk street-level crime data. Includes causing fear, alarm, or distress.",
|
||||
source: "crime",
|
||||
prefix: "",
|
||||
suffix: "/yr",
|
||||
|
|
@ -755,7 +755,7 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
},
|
||||
step: 1.0,
|
||||
description: "Average yearly other crime in the area",
|
||||
detail: "Average number of other crime offences per year in the LSOA, from police.uk street-level crime data (2023-2025). A catch-all category for offences not classified elsewhere.",
|
||||
detail: "Average number of other crime offences per year in the LSOA, from police.uk street-level crime data. A catch-all category for offences not classified elsewhere.",
|
||||
source: "crime",
|
||||
prefix: "",
|
||||
suffix: "/yr",
|
||||
|
|
@ -990,8 +990,8 @@ pub static FEATURE_GROUPS: &[FeatureGroup] = &[
|
|||
max: 80.0,
|
||||
},
|
||||
step: 1.0,
|
||||
description: "Road noise level at the postcode in decibels (Lden)",
|
||||
detail: "Road noise level in decibels (Lden, a 24-hour weighted average) from Defra's Strategic Noise Mapping Round 4 (2022). Modelled at 4m above ground on a 10m grid. Above ~55 dB is typically noticeable; above ~70 dB is considered harmful by the WHO.",
|
||||
description: "Maximum transport noise level near the postcode in decibels (Lden)",
|
||||
detail: "Maximum road, rail, or airport noise level in decibels (Lden, a 24-hour weighted average) from Defra's Strategic Noise Mapping Round 4 (2022). Modelled at 4m above ground on a 10m grid and sampled as the maximum 10m cell around the postcode representative point. Above ~55 dB is typically noticeable; above ~70 dB is considered harmful by the WHO.",
|
||||
source: "noise",
|
||||
prefix: "",
|
||||
suffix: " dB",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ mod fields;
|
|||
mod filters;
|
||||
mod h3;
|
||||
|
||||
pub use bounds::{bounds_intersect, h3_cell_bounds, parse_bounds, require_bounds};
|
||||
pub use bounds::{
|
||||
bounds_intersect, h3_cell_bounds, parse_bounds, require_bounds, require_candidate_count,
|
||||
};
|
||||
pub use fields::{
|
||||
parse_enum_dist, parse_field_indices, parse_field_indices_with_poi, parse_field_set,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue