feat(tradein-estimator): exclude rosreestr deals from output #504
1 changed files with 10 additions and 6 deletions
|
|
@ -402,8 +402,12 @@ async def estimate_quality(
|
||||||
) -> AggregatedEstimate:
|
) -> AggregatedEstimate:
|
||||||
"""Главная функция — оценка квартиры по реальным данным.
|
"""Главная функция — оценка квартиры по реальным данным.
|
||||||
|
|
||||||
|
NOTE 2026-05-24: rosreestr_deals temporarily NOT included in actual_deals
|
||||||
|
output (they contain ДДУ first-market data that skews secondary-market
|
||||||
|
median). See Decision_TradeIn_DataQuality_8PR_Roadmap.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
AggregatedEstimate с estimate_id, медианой, диапазоном, аналогами, сделками.
|
AggregatedEstimate с estimate_id, медианой, диапазоном, аналогами.
|
||||||
"""
|
"""
|
||||||
# 1. Geocode
|
# 1. Geocode
|
||||||
geo: GeocodeResult | None = None
|
geo: GeocodeResult | None = None
|
||||||
|
|
@ -585,11 +589,11 @@ async def estimate_quality(
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.warning("cian_valuation: lookup failed (graceful): %s", exc)
|
logger.warning("cian_valuation: lookup failed (graceful): %s", exc)
|
||||||
|
|
||||||
# 5. Deals — фактические сделки за период
|
# 5. Deals — отключены 2026-05-24 (см. Decision_TradeIn_DataQuality_8PR_Roadmap).
|
||||||
deals = _fetch_deals(
|
# rosreestr_deals содержит ДДУ первичного рынка (177-200 К/м²), что искажает
|
||||||
db, lat=geo.lat, lon=geo.lon, rooms=payload.rooms, area=payload.area_m2,
|
# оценку вторички (~114 К/м²). Возвращаемся к этому когда отделим вторичные
|
||||||
radius_m=DEFAULT_RADIUS_M,
|
# сделки от ДДУ в источнике.
|
||||||
)
|
deals: list[dict[str, Any]] = []
|
||||||
|
|
||||||
# 6. Сохраняем в trade_in_estimates
|
# 6. Сохраняем в trade_in_estimates
|
||||||
estimate_id = uuid4()
|
estimate_id = uuid4()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue