Fmt
This commit is contained in:
parent
479ef92236
commit
c38d654ac7
44 changed files with 2526 additions and 701 deletions
|
|
@ -168,7 +168,12 @@ impl PostcodeData {
|
|||
local_aabbs.push((aabb_south, aabb_west, aabb_north, aabb_east));
|
||||
}
|
||||
|
||||
Ok::<_, anyhow::Error>((local_postcodes, local_polygons, local_centroids, local_aabbs))
|
||||
Ok::<_, anyhow::Error>((
|
||||
local_postcodes,
|
||||
local_polygons,
|
||||
local_centroids,
|
||||
local_aabbs,
|
||||
))
|
||||
})
|
||||
.collect::<Result<Vec<_>, _>>()?;
|
||||
|
||||
|
|
|
|||
|
|
@ -543,10 +543,9 @@ impl PropertyData {
|
|||
listings_buy
|
||||
.lazy()
|
||||
.with_column(
|
||||
(col("Asking price").cast(DataType::Float64)
|
||||
/ col("Total floor area (sqm)"))
|
||||
.round(0)
|
||||
.alias("Asking price per sqm"),
|
||||
(col("Asking price").cast(DataType::Float64) / col("Total floor area (sqm)"))
|
||||
.round(0)
|
||||
.alias("Asking price per sqm"),
|
||||
)
|
||||
.collect()
|
||||
.context("Failed to derive Asking price per sqm")?
|
||||
|
|
|
|||
|
|
@ -820,8 +820,7 @@ async fn poll_pocketbase_counts(state: &AppState) {
|
|||
("type", "redeemed"),
|
||||
),
|
||||
] {
|
||||
if let Some(total) = pb_count(&state.http_client, pb_url, &token, "invites", filter).await
|
||||
{
|
||||
if let Some(total) = pb_count(&state.http_client, pb_url, &token, "invites", filter).await {
|
||||
gauge!(metric, labels.0 => labels.1.to_string()).set(total as f64);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ use std::sync::Arc;
|
|||
use axum::http::StatusCode;
|
||||
use axum::response::Json;
|
||||
use axum::Extension;
|
||||
use metrics::counter;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::{json, Value};
|
||||
use metrics::counter;
|
||||
use tracing::{info, warn};
|
||||
|
||||
use crate::auth::OptionalUser;
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@ use axum::extract::Query;
|
|||
use axum::http::StatusCode;
|
||||
use axum::response::{IntoResponse, Json};
|
||||
use axum::Extension;
|
||||
use metrics::histogram;
|
||||
use rayon::prelude::*;
|
||||
use rustc_hash::FxHashMap;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::{Map, Value};
|
||||
use metrics::histogram;
|
||||
use tracing::info;
|
||||
|
||||
use crate::aggregation::Aggregator;
|
||||
|
|
@ -230,8 +230,13 @@ pub async fn get_hexagons(
|
|||
) {
|
||||
continue;
|
||||
}
|
||||
let cell_id =
|
||||
cell_for_row_cached(row, precomputed, h3_res, need_parent, &mut h3_cache);
|
||||
let cell_id = cell_for_row_cached(
|
||||
row,
|
||||
precomputed,
|
||||
h3_res,
|
||||
need_parent,
|
||||
&mut h3_cache,
|
||||
);
|
||||
let agg = local_groups
|
||||
.entry(cell_id)
|
||||
.or_insert_with(|| Aggregator::new(num_features));
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ use axum::extract::{Path, Query};
|
|||
use axum::http::StatusCode;
|
||||
use axum::response::{IntoResponse, Json};
|
||||
use axum::Extension;
|
||||
use metrics::histogram;
|
||||
use rustc_hash::FxHashMap;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::{Map, Value};
|
||||
use metrics::histogram;
|
||||
use tracing::info;
|
||||
|
||||
use crate::aggregation::Aggregator;
|
||||
|
|
|
|||
|
|
@ -67,9 +67,7 @@ enum FeatureAccum {
|
|||
global_max: f32,
|
||||
},
|
||||
/// Enum: count occurrences per variant index.
|
||||
Enum {
|
||||
value_counts: Vec<u64>,
|
||||
},
|
||||
Enum { value_counts: Vec<u64> },
|
||||
/// Feature skipped (not in field_set).
|
||||
Skip,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue