fix(analytics): align portfolio series to area buckets in quartirography (#1406) #1675
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#1675
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/quartirography-area-bucket-1406"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Проблема (#1406)
Ось графика — диапазоны площади (м²), ряд deals по площади, а portfolio набирался по числу комнат (ONE/TWO/THREE/FOUR) и фронт делал ложную эквивалентность «4+»↔«80+ м²». Сравнение несопоставимых метрик под видом «парадокса портфеля».
Решение
analytics_queries.py:quartirography(source='portfolio')переписан — берётdomrf_flat_area_distribution(room_count_type='TOTAL'), агрегирует 8 area-бакетов в 5 бакетов оси по средней площади, percent считается так же как в deals-ветке.QuartirographyChart.tsx: убран хардкодportfolioMap, прямойbuckets.map()lookup. Обе серии теперь по площади.Verify
ruffclean;pytest -k "analytics or quartir or portfolio"→ 26 passed;tsc --noEmit→ 0 ошибок.⚠️ Follow-up (не в этом PR)
page.tsx:115текст «52% портфеля» опирался на старое room-count распределение; post-fix area-бакеты дают ~56% в «1-к 30-45». Направление верное, число слегка устарело — нужен copy-refresh отдельной правкой.Closes #1406