{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "31e7d508",
   "metadata": {},
   "source": [
    "# 01 데이터 입수 — 기준 전망과 AI 수용도조사\n",
    "\n",
    "**목적.** AI 확산 시나리오 계산에 필요한 입력을 불러오고 검증한다.\n",
    "\n",
    "**2026-10 정비판.** 보고서1의 기준 시나리오가 정비되었다. BOKDPM 장기 정상상태를 고치고(잠재성장률 1.8%, 물가안정목표 2%, 실질유가 불변),\n",
    "실질금리를 1차 차분으로 투입하며, 시나리오 외생 경로의 레버를 연결한 뒤 산업 전망과 정합화를 다시 실행한 결과이다.\n",
    "이 판은 그 기준 시나리오(`data/inputs/base_va_62.csv`·`base_va_69.csv`)만 교체하였고, **AI 확산 층(산업 배분 A1, Λ 보정, 고용 중립 취업계수)은 이전 판과 같다.**\n",
    "이전 판 기준 시나리오는 `data/published_prev/`에 두고 정비 전후 비교와 이전 판 재현 점검에만 쓴다.\n",
    "\n",
    "| 입력 | 내용 | 출처 | 공개 |\n",
    "|---|---|---|---|\n",
    "| `data/inputs/base_va_62.csv`, `base_va_69.csv` | 기준 시나리오(S1) 산업별 실질부가가치, 2025 실적·2026–2035 전망 | 보고서1 5장 산출물(정합화 후, 2026-10 정비판) | 공개 |\n",
    "| `data/published_prev/base_va_62_prev.csv`, `base_va_69_prev.csv` | 이전 판 기준 시나리오(같은 형식) — 비교·재현 점검용 | 보고서1 5장 이전 판 산출물(2026-10-08 패키지 입력) | 공개 |\n",
    "| `data/private/AI수용도조사_통계표_260417.xlsx` | AI 수용도조사 통계표 E4-1·E5-1(AI 영향의 정도), E4·E5 상세(매출·고용 증감 구간) | 한국고용정보원 공유자료 | **비공개** |\n",
    "\n",
    "입력 파일의 출처·작성 시각·SHA-256은 `data/inputs/PROVENANCE.md`에 적었다.\n",
    "\n",
    "**산출물.** `data/interim/survey_signal_21.csv`(E4-1·E5-1 4시점 평균 점수), `data/interim/change_expect_21.csv`(2024년 대비 2040년 기대 매출·고용 증감률)\n",
    "\n",
    "비공개 통계표가 없으면 2절에서 멈춘다. 통계표는 과제 참여기관만 받을 수 있으며 배포 묶음에 넣지 않는다."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "eb817c03",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-10-08T00:08:18.269275Z",
     "iopub.status.busy": "2026-10-08T00:08:18.269275Z",
     "iopub.status.idle": "2026-10-08T00:08:18.896350Z",
     "shell.execute_reply": "2026-10-08T00:08:18.896350Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Python 3.12.10 · pandas 2.2.3 · numpy 2.4.6 · openpyxl 3.1.5 · matplotlib 3.11.0\n",
      "  판: 2026-10 정비판 · 배분 A1 · 취업계수 neutral · Λ 중심 0.5\n",
      "  기준 62          있음  data\\inputs\\base_va_62.csv\n",
      "  기준 69          있음  data\\inputs\\base_va_69.csv\n",
      "  이전 판 기준 62     있음  data\\published_prev\\base_va_62_prev.csv\n",
      "  이전 판 기준 69     있음  data\\published_prev\\base_va_69_prev.csv\n",
      "  크로스워크          있음  data\\crosswalk_21_62.csv\n",
      "  분화표            있음  data\\carveout_69.csv\n",
      "  설문 통계표(비공개)    있음  data\\private\\AI수용도조사_통계표_260417.xlsx\n"
     ]
    }
   ],
   "source": [
    "import os, hashlib\n",
    "import numpy as np, pandas as pd\n",
    "import config as C\n",
    "import ai_forecast as F\n",
    "pd.set_option(\"display.float_format\", lambda v: f\"{v:,.3f}\")\n",
    "C.setup()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f93c6b31",
   "metadata": {},
   "source": [
    "## 1. 기준 시나리오 — 보고서1 5장 산출물\n",
    "\n",
    "기준 시나리오는 BOKDPM 기준 경로(S1)를 외생으로 넣은 베이지언 VARX 산업 전망을 총량 벤치마킹과 기존 전망 결합으로 정합화한 결과이다.\n",
    "단위는 십억 원, 2020년 연쇄가격이다. 62분류와 69분류는 전산업 합계가 같아야 한다(69분류는 62분류의 일부 산업을 분화한 것이다).\n",
    "먼저 네 파일(정비판 2개, 이전 판 2개)의 SHA-256을 `config.INPUT_SHA256`의 기록과 대조한다."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "ccc59d9d",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-10-08T00:08:18.897853Z",
     "iopub.status.busy": "2026-10-08T00:08:18.897353Z",
     "iopub.status.idle": "2026-10-08T00:08:18.920519Z",
     "shell.execute_reply": "2026-10-08T00:08:18.920015Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>파일</th>\n",
       "      <th>SHA-256(앞 16자리)</th>\n",
       "      <th>기록과 일치</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>inputs/base_va_62.csv</td>\n",
       "      <td>81c0a99e7e67aad3</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>inputs/base_va_69.csv</td>\n",
       "      <td>694821fa05b22f06</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>published_prev/base_va_62_prev.csv</td>\n",
       "      <td>31e8573a5d2da3d7</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>published_prev/base_va_69_prev.csv</td>\n",
       "      <td>ee49d2c1323d58bd</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                   파일   SHA-256(앞 16자리)  기록과 일치\n",
       "0               inputs/base_va_62.csv  81c0a99e7e67aad3    True\n",
       "1               inputs/base_va_69.csv  694821fa05b22f06    True\n",
       "2  published_prev/base_va_62_prev.csv  31e8573a5d2da3d7    True\n",
       "3  published_prev/base_va_69_prev.csv  ee49d2c1323d58bd    True"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "62분류: 산업 62개 · 2025–2035 (이전 판 산업 62개 · 2025–2035)\n",
      "69분류: 산업 69개 · 2025–2035 (이전 판 산업 69개 · 2025–2035)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>62분류(조원)</th>\n",
       "      <th>69분류(조원)</th>\n",
       "      <th>차이(십억원)</th>\n",
       "      <th>이전 판 62분류(조원)</th>\n",
       "      <th>정비 전후 차이(%)</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>연도</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2025</th>\n",
       "      <td>2,178.489</td>\n",
       "      <td>2,178.489</td>\n",
       "      <td>-0.001</td>\n",
       "      <td>2,178.489</td>\n",
       "      <td>0.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2026</th>\n",
       "      <td>2,221.073</td>\n",
       "      <td>2,221.073</td>\n",
       "      <td>-0.001</td>\n",
       "      <td>2,219.013</td>\n",
       "      <td>0.093</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2027</th>\n",
       "      <td>2,259.627</td>\n",
       "      <td>2,259.627</td>\n",
       "      <td>-0.001</td>\n",
       "      <td>2,265.859</td>\n",
       "      <td>-0.275</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2028</th>\n",
       "      <td>2,306.255</td>\n",
       "      <td>2,306.255</td>\n",
       "      <td>-0.002</td>\n",
       "      <td>2,313.598</td>\n",
       "      <td>-0.317</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2029</th>\n",
       "      <td>2,349.581</td>\n",
       "      <td>2,349.581</td>\n",
       "      <td>-0.003</td>\n",
       "      <td>2,364.607</td>\n",
       "      <td>-0.635</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2030</th>\n",
       "      <td>2,392.963</td>\n",
       "      <td>2,392.963</td>\n",
       "      <td>0.001</td>\n",
       "      <td>2,417.734</td>\n",
       "      <td>-1.025</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2031</th>\n",
       "      <td>2,436.124</td>\n",
       "      <td>2,436.124</td>\n",
       "      <td>-0.002</td>\n",
       "      <td>2,471.718</td>\n",
       "      <td>-1.440</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2032</th>\n",
       "      <td>2,479.230</td>\n",
       "      <td>2,479.230</td>\n",
       "      <td>-0.006</td>\n",
       "      <td>2,526.031</td>\n",
       "      <td>-1.853</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2033</th>\n",
       "      <td>2,522.383</td>\n",
       "      <td>2,522.383</td>\n",
       "      <td>-0.002</td>\n",
       "      <td>2,580.376</td>\n",
       "      <td>-2.247</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2034</th>\n",
       "      <td>2,565.638</td>\n",
       "      <td>2,565.638</td>\n",
       "      <td>-0.001</td>\n",
       "      <td>2,634.576</td>\n",
       "      <td>-2.617</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2035</th>\n",
       "      <td>2,609.028</td>\n",
       "      <td>2,609.028</td>\n",
       "      <td>-0.004</td>\n",
       "      <td>2,688.518</td>\n",
       "      <td>-2.957</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      62분류(조원)  69분류(조원)  차이(십억원)  이전 판 62분류(조원)  정비 전후 차이(%)\n",
       "연도                                                           \n",
       "2025 2,178.489 2,178.489   -0.001      2,178.489        0.000\n",
       "2026 2,221.073 2,221.073   -0.001      2,219.013        0.093\n",
       "2027 2,259.627 2,259.627   -0.001      2,265.859       -0.275\n",
       "2028 2,306.255 2,306.255   -0.002      2,313.598       -0.317\n",
       "2029 2,349.581 2,349.581   -0.003      2,364.607       -0.635\n",
       "2030 2,392.963 2,392.963    0.001      2,417.734       -1.025\n",
       "2031 2,436.124 2,436.124   -0.002      2,471.718       -1.440\n",
       "2032 2,479.230 2,479.230   -0.006      2,526.031       -1.853\n",
       "2033 2,522.383 2,522.383   -0.002      2,580.376       -2.247\n",
       "2034 2,565.638 2,565.638   -0.001      2,634.576       -2.617\n",
       "2035 2,609.028 2,609.028   -0.004      2,688.518       -2.957"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def sha256(p):\n",
    "    h = hashlib.sha256()\n",
    "    with open(p, \"rb\") as f:\n",
    "        h.update(f.read())\n",
    "    return h.hexdigest()\n",
    "\n",
    "chk = pd.DataFrame([{\"파일\": k, \"SHA-256(앞 16자리)\": sha256(os.path.join(C.DATA, k))[:16],\n",
    "                     \"기록과 일치\": sha256(os.path.join(C.DATA, k)) == v} for k, v in C.INPUT_SHA256.items()])\n",
    "display(chk)\n",
    "assert chk[\"기록과 일치\"].all(), \"입력 파일이 기록된 SHA-256과 다르다 — data/inputs/PROVENANCE.md와 config.INPUT_SHA256을 확인한다\"\n",
    "\n",
    "base62, base69 = F.read_base(C.BASE_62), F.read_base(C.BASE_69)\n",
    "prev62, prev69 = F.read_base(C.BASE_62_PREV), F.read_base(C.BASE_69_PREV)\n",
    "for name, b, pb in [(\"62\", base62, prev62), (\"69\", base69, prev69)]:\n",
    "    print(f\"{name}분류: 산업 {b.shape[1]}개 · {b.index.min()}–{b.index.max()} (이전 판 산업 {pb.shape[1]}개 · {pb.index.min()}–{pb.index.max()})\")\n",
    "    assert list(b.columns) == list(pb.columns) and list(b.index) == list(pb.index), \"정비판과 이전 판의 산업·연도 구성이 다르다\"\n",
    "    assert (b.loc[C.START] - pb.loc[C.START]).abs().max() < 1e-6, \"2025년 실적이 이전 판과 다르다\"\n",
    "\n",
    "tot = pd.DataFrame({\"62분류(조원)\": base62.sum(axis=1) / 1e3, \"69분류(조원)\": base69.sum(axis=1) / 1e3})\n",
    "tot[\"차이(십억원)\"] = (tot[\"62분류(조원)\"] - tot[\"69분류(조원)\"]) * 1e3\n",
    "assert tot[\"차이(십억원)\"].abs().max() < 1.0, \"62·69 전산업 합계가 일치하지 않는다\"\n",
    "assert ((prev62.sum(axis=1) - prev69.sum(axis=1)).abs().max()) < 1.0, \"이전 판 62·69 전산업 합계가 일치하지 않는다\"\n",
    "tot[\"이전 판 62분류(조원)\"] = prev62.sum(axis=1) / 1e3\n",
    "tot[\"정비 전후 차이(%)\"] = (tot[\"62분류(조원)\"] / tot[\"이전 판 62분류(조원)\"] - 1) * 100\n",
    "tot"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "73bf5b57",
   "metadata": {},
   "source": [
    "두 판은 2025년 실적이 같고 2026년 이후 전망만 다르다. 정비판 기준 시나리오는 2035년 전산업이 이전 판보다 낮다.\n",
    "2025–2035년 연평균 증가율은 아래와 같다."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "b8c794ca",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-10-08T00:08:18.921022Z",
     "iopub.status.busy": "2026-10-08T00:08:18.921022Z",
     "iopub.status.idle": "2026-10-08T00:08:18.925539Z",
     "shell.execute_reply": "2026-10-08T00:08:18.925539Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>2025(조원)</th>\n",
       "      <th>2035(조원)</th>\n",
       "      <th>연평균(%)</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>정비판</th>\n",
       "      <td>2,178.489</td>\n",
       "      <td>2,609.028</td>\n",
       "      <td>1.820</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>이전 판</th>\n",
       "      <td>2,178.489</td>\n",
       "      <td>2,688.518</td>\n",
       "      <td>2.126</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      2025(조원)  2035(조원)  연평균(%)\n",
       "정비판  2,178.489 2,609.028   1.820\n",
       "이전 판 2,178.489 2,688.518   2.126"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.DataFrame({\"2025(조원)\": [tot.loc[C.START, \"62분류(조원)\"], tot.loc[C.START, \"이전 판 62분류(조원)\"]],\n",
    "              \"2035(조원)\": [tot.loc[C.END, \"62분류(조원)\"], tot.loc[C.END, \"이전 판 62분류(조원)\"]]},\n",
    "             index=[\"정비판\", \"이전 판\"]).assign(**{\"연평균(%)\": lambda d: F.cagr(d[\"2025(조원)\"], d[\"2035(조원)\"], C.END - C.START)})"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ab534157",
   "metadata": {},
   "source": [
    "## 2. AI 영향의 정도 — E4-1·E5-1\n",
    "\n",
    "조사는 2025년 사업체 2,297개(21개 업종)를 대상으로, 시점별(현재 2025년·2029년·2034년·2040년) AI 기술이 자사 업종의\n",
    "**성장(매출 규모, E4-1)** 과 **고용(일자리, E5-1)** 에 미치는 영향이 **어느 정도인지**를 9점 척도(①매우 낮음 · ⑤보통 · ⑨매우 높음)로 물었다.\n",
    "영향의 크기를 묻는 문항이며 방향(증가·감소)은 묻지 않았다. 따라서 5점은 '영향 없음'이 아니라 '보통'이고, '영향 최소'에 해당하는 점은 ①이다.\n",
    "표 제목(`E4-1.`, `E5-1.`)을 기준으로 블록을 찾으므로 행 번호가 바뀌어도 읽을 수 있다."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "2d849e42",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-10-08T00:08:18.927044Z",
     "iopub.status.busy": "2026-10-08T00:08:18.926039Z",
     "iopub.status.idle": "2026-10-08T00:08:20.843684Z",
     "shell.execute_reply": "2026-10-08T00:08:20.843177Z"
    },
    "tags": [
     "private-output"
    ]
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(비공개 설문 집계를 보여주는 셀이다. 공개 화면에서는 출력을 생략했다. 자료를 가진 경우 직접 실행하면 표시된다.)"
     ]
    }
   ],
   "source": [
    "if not os.path.exists(C.SURVEY_XLSX):\n",
    "    raise FileNotFoundError(\"비공개 통계표가 없다: data/private/ 에 'AI수용도조사_통계표_260417.xlsx'를 넣은 뒤 다시 실행한다.\")\n",
    "\n",
    "signal = F.read_survey_signal(C.SURVEY_XLSX)\n",
    "signal.to_csv(os.path.join(C.INTERIM, \"survey_signal_21.csv\"), encoding=\"utf-8-sig\")\n",
    "print(f\"읽은 행: {len(signal)} (21개 업종 + 전체·제조업·비제조업)\")\n",
    "signal.loc[[\"전체\", \"제조업\", \"비제조업\"]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "aeaad49c",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-10-08T00:08:20.844687Z",
     "iopub.status.busy": "2026-10-08T00:08:20.844188Z",
     "iopub.status.idle": "2026-10-08T00:08:20.849634Z",
     "shell.execute_reply": "2026-10-08T00:08:20.849130Z"
    },
    "tags": [
     "private-output"
    ]
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(비공개 설문 집계를 보여주는 셀이다. 공개 화면에서는 출력을 생략했다. 자료를 가진 경우 직접 실행하면 표시된다.)"
     ]
    }
   ],
   "source": [
    "detail = signal.drop(index=[\"전체\", \"제조업\", \"비제조업\"])\n",
    "s = detail[\"AI성장_2040\"].sort_values(ascending=False)\n",
    "pd.DataFrame({\"2040 성장 영향(상위 3)\": s.head(3).round(2).values, \"업종(상위)\": s.head(3).index,\n",
    "              \"2040 성장 영향(하위 3)\": s.tail(3).round(2).values, \"업종(하위)\": s.tail(3).index})"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0aa3bba7",
   "metadata": {},
   "source": [
    "## 3. 매출·고용의 기대 증감 — E4·E5 상세\n",
    "\n",
    "E4·E5는 2024년 대비 각 시점의 매출 규모와 고용 규모가 얼마나 늘거나 줄지를 18개 구간(①50% 이상 감소 … ⑦변동 없음 … ⑱100% 이상 증가)으로 물었다.\n",
    "**방향과 크기를 함께 묻는 문항**이므로, AI 확산에 따른 고용 반응(탄력성)을 정하는 근거로 쓴다. 구간 중간값의 가중평균으로 업종별 기대 증감률을 구하며,\n",
    "열린 구간 ⑱은 110%로 둔다."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "b8a452f1",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-10-08T00:08:20.850133Z",
     "iopub.status.busy": "2026-10-08T00:08:20.850133Z",
     "iopub.status.idle": "2026-10-08T00:08:23.242966Z",
     "shell.execute_reply": "2026-10-08T00:08:23.242464Z"
    },
    "tags": [
     "private-output"
    ]
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(비공개 설문 집계를 보여주는 셀이다. 공개 화면에서는 출력을 생략했다. 자료를 가진 경우 직접 실행하면 표시된다.)"
     ]
    }
   ],
   "source": [
    "expect = F.read_change_expectations(C.SURVEY_XLSX, 2040)\n",
    "expect.to_csv(os.path.join(C.INTERIM, \"change_expect_21.csv\"), encoding=\"utf-8-sig\")\n",
    "expect.loc[[\"전체\", \"제조업\", \"비제조업\"]]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "78f4dfac",
   "metadata": {},
   "source": [
    "## 4. 산출물\n",
    "\n",
    "다음 노트북(`02_분석.ipynb`)은 `data/interim/`의 두 파일과 기준 시나리오를 읽는다."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "600ffa5a",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-10-08T00:08:23.243967Z",
     "iopub.status.busy": "2026-10-08T00:08:23.243967Z",
     "iopub.status.idle": "2026-10-08T00:08:23.246967Z",
     "shell.execute_reply": "2026-10-08T00:08:23.246466Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "change_expect_21.csv            1,363 bytes\n",
      "survey_signal_21.csv            3,676 bytes\n"
     ]
    }
   ],
   "source": [
    "for f in sorted(os.listdir(C.INTERIM)):\n",
    "    p = os.path.join(C.INTERIM, f)\n",
    "    print(f\"{f:<28} {os.path.getsize(p):>8,d} bytes\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
