all is well
This commit is contained in:
parent
eac1bd0d13
commit
2f149503bb
53 changed files with 1543 additions and 354 deletions
|
|
@ -4,7 +4,7 @@ use metrics::counter;
|
|||
use rustc_hash::FxHashMap;
|
||||
use tracing::error;
|
||||
|
||||
use crate::consts::MAX_PRICE_HISTORY_POINTS;
|
||||
use crate::consts::PRICE_HISTORY_POINTS_LIMIT;
|
||||
use crate::data::{FeatureStats, PostcodePoiMetrics, PropertyData};
|
||||
|
||||
use super::hexagon_stats::{EnumFeatureStats, HistogramStats, NumericFeatureStats, PricePoint};
|
||||
|
|
@ -32,9 +32,9 @@ pub fn extract_price_history(
|
|||
}
|
||||
})
|
||||
.collect();
|
||||
if points.len() > MAX_PRICE_HISTORY_POINTS {
|
||||
let step = points.len() as f64 / MAX_PRICE_HISTORY_POINTS as f64;
|
||||
points = (0..MAX_PRICE_HISTORY_POINTS)
|
||||
if points.len() > PRICE_HISTORY_POINTS_LIMIT {
|
||||
let step = points.len() as f64 / PRICE_HISTORY_POINTS_LIMIT as f64;
|
||||
points = (0..PRICE_HISTORY_POINTS_LIMIT)
|
||||
.map(|i| {
|
||||
let idx = (i as f64 * step) as usize;
|
||||
PricePoint {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue