Per-cad_quarter price aggregation из 6.83M rosreestr_deals. Source verification (postgres MCP): - rosreestr_deals total: 6 830 001 - price_per_sqm filled 99.9% (fallback deal_price/area) - quarter_cad_number (NOT cad_quarter), period_start_date, realestate_type_code SQL (95_mv_quarter_price.sql, ~124 LOC): - Filter realestate_type_code='002001003000' (новостройки) + outlier 30K..800K - Percentile p25/median/p75 + mean + temporal slices (6m/12m/24m) - 24-month window, HAVING COUNT(*)>=3 - WITH NO DATA + REFRESH after INDEX (#194 pattern) - UNIQUE INDEX (quarter_cad_number) для CONCURRENTLY - ~52 492 quarters в MV (all-Russia; EKB subset ~9700) Python helper (quarter_price_refresh.py, ~65 LOC): - refresh_quarter_price(db, concurrently=True) с try/except fallback Phase B (analyze integration — quarter median вместо district) — отдельный PR. |
||
|---|---|---|
| .. | ||
| alembic | ||
| app | ||
| db/init | ||
| output | ||
| tests | ||
| .dockerignore | ||
| .env.example | ||
| .env.runtime.example | ||
| alembic.ini | ||
| debug.log | ||
| Dockerfile | ||
| pyproject.toml | ||
| uv.lock | ||