260202_01_ENH: route 구조 초창기 기획으로 다시 변경 및 Category 별 하위 페이지에 샘플 데이터 모두 적용

This commit is contained in:
2026-02-02 11:32:50 +09:00
parent 4b40c43962
commit 6f8e09bcf3
60 changed files with 1750 additions and 464 deletions

View File

@@ -154,7 +154,6 @@ const splitTo100 = (r: () => number, n: number, minEach: number, maxEach: number
return out;
};
/** ✅ 그룹 키 정의(각 그룹 합 100) */
const BANNER_GROUPS: Record<string, BannerKey[]> = {
lifeStage: ["single", "noKids", "preschoolKids", "schoolKids", "adultKids", "independentSenior"],
household: ["hh1", "hh2", "hh3", "hh4Plus"],
@@ -202,7 +201,7 @@ export const bannerRow = (
year,
rowLabel,
total,
...makeBannerDistDefault(`${year}|${rowLabel}`, range), // ✅ min/max 적용
...makeBannerDistDefault(`${year}|${rowLabel}`, range),
...(extra ?? {}),
});
@@ -305,9 +304,9 @@ export const apiOwnershipSummary: ServerBannerRow[] = [
* -------------------------- */
export const apiYearIndex: ServerBannerRow[] = [
bannerRow(26, "사례수", 2000),
bannerRow(26, "26", 100),
bannerRow(25, "25", 100),
bannerRow(24, "24", 100),
bannerRow(26, "26", 15),
bannerRow(25, "25", 14),
bannerRow(24, "24", 13),
];
/** ---------------------------
@@ -361,7 +360,7 @@ export const apiFridgeDoorTypeByYear: ServerBannerRow[] = [
* year rowLabel total banner
* 25/26 사례수 + 보유 경로(구매 경로)
* -------------------------- */
export const apiPurchasePathByYear: ServerBannerRow[] = [
export const apiOwnershipPathByYear: ServerBannerRow[] = [
bannerRow(25, "사례수", 520),
bannerRow(25, "신규 구입", 8),
bannerRow(25, "기존 제품 작동하나 신규 구입", 4),
@@ -375,6 +374,30 @@ export const apiPurchasePathByYear: ServerBannerRow[] = [
bannerRow(26, "추가 구입", 48),
];
export const apiOwnershipTriggerByYear: ServerBannerRow[] = [
bannerRow(25, "사례수", 520),
bannerRow(25, "오래되어 새로운 제품 교체 필요", 23),
bannerRow(25, "이사로 인해 새로 구입", 22),
bannerRow(25, "이전 제품 고장으로 새로 구입", 17),
bannerRow(25, "새로운 기능/기술 사용하고 싶어서", 14),
bannerRow(25, "리모델링, 인테리어 계기로 새로 구입", 7),
bannerRow(25, "혼수로 장만", 7),
bannerRow(25, "(결혼 외) 가구 분가/독립하게 되어서", 6),
bannerRow(25, "가구 구성원이 늘어서", 3),
bannerRow(25, "가구 구성원이 줄어서", 2),
bannerRow(26, "사례수", 540),
bannerRow(26, "오래되어 새로운 제품 교체 필요", 23),
bannerRow(26, "이사로 인해 새로 구입", 22),
bannerRow(26, "이전 제품 고장으로 새로 구입", 17),
bannerRow(26, "새로운 기능/기술 사용하고 싶어서", 14),
bannerRow(26, "리모델링, 인테리어 계기로 새로 구입", 7),
bannerRow(26, "혼수로 장만", 7),
bannerRow(26, "(결혼 외) 가구 분가/독립하게 되어서", 6),
bannerRow(26, "가구 구성원이 늘어서", 3),
bannerRow(26, "가구 구성원이 줄어서", 2),
];
/** ---------------------------
* API #11
* year rowLabel total banner