lgtm
This commit is contained in:
parent
f7e0814a38
commit
fd2860070a
55 changed files with 4084 additions and 186 deletions
|
|
@ -217,6 +217,16 @@ pub async fn get_postcode_stats(
|
|||
stats::crime_latest_available_year(&state.crime_by_year)
|
||||
};
|
||||
|
||||
let (crime_outcode, crime_sector, crime_area_averages) = stats::area_crime_averages_for(
|
||||
Some(postcode_str.as_str()),
|
||||
&state.area_crime_averages,
|
||||
fields_specified,
|
||||
&field_set,
|
||||
);
|
||||
|
||||
// Usual residents (Census 2021) for this postcode. Display-only.
|
||||
let population = state.population.for_postcode(&postcode_str);
|
||||
|
||||
Ok(HexagonStatsResponse {
|
||||
count: total_count,
|
||||
numeric_features,
|
||||
|
|
@ -224,7 +234,11 @@ pub async fn get_postcode_stats(
|
|||
price_history,
|
||||
crime_by_year,
|
||||
crime_latest_year,
|
||||
crime_outcode,
|
||||
crime_sector,
|
||||
crime_area_averages,
|
||||
central_postcode: None,
|
||||
population,
|
||||
filter_exclusions,
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue