Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 기여 안내

번역을 고치거나 웹북을 손보려는 분을 위한 안내입니다. 읽기만 하신다면 [웹북](https://causalinferencelab.github.io/Causal-Inference-with-Python/)으로 가시면 됩니다.

## 번역 고치기

1. [번역 가이드](TRANSLATION_GUIDE.md)의 원칙과 용어표를 먼저 읽습니다.
2. 원고는 `causal-inference-for-the-brave-and-true/` 폴더의 노트북입니다. 마크다운 셀만 고치고, 코드 셀·출력·수식·링크 주소는 그대로 둡니다.
3. PR을 올리면 GitHub Actions가 웹북을 빌드해 확인합니다. 메인테이너 검토 뒤 머지되면 웹북에 반영됩니다.

용어를 바꾸거나 더하고 싶다면 [용어 제안 이슈](https://github.com/CausalInferenceLab/Causal-Inference-with-Python/issues/new?template=term-proposal.yml)로 먼저 의견을 나눠 주세요.

## 웹북 빌드와 미리 보기

웹북은 [Quarto](https://quarto.org/) Book으로 만듭니다. `main`에 머지되면 GitHub Actions(`.github/workflows/book.yml`)가 빌드해 GitHub Pages에 배포합니다. PR에서는 빌드만 확인하며, 결과물은 Actions의 `book-preview` 아티팩트로 내려받아 볼 수 있습니다.

로컬에서 미리 보려면 Quarto를 설치한 뒤 다음을 실행하세요. 노트북은 다시 실행하지 않고 저장된 출력을 그대로 씁니다.

```bash
pip install jupyter
python book/prepare.py
cd book && quarto preview
```

`book/prepare.py`는 빌드할 때 [번역 가이드](TRANSLATION_GUIDE.md)의 용어표로 웹북의 '용어집' 페이지를 만들고, `book/postrender.py`는 렌더링이 끝난 뒤 웹북 검색 색인(`search-index.json`)을 만듭니다. `book/prepare.py`는 빌드할 때만 장 제목, 수식 표기, 접힌 코드, 옮긴이 주 상자를 책 형식으로 바꿉니다. 그래서 노트북은 원서와 같은 구조로 두면 됩니다.

읽기 기능(읽은 장 기록, 이어 읽기, 장 끝 평가, 허브로 가는 링크)은 `book/reader.html`, GA4 설정은 `book/analytics.html`에 있습니다. 읽은 장 기록은 독자의 브라우저(`localStorage`의 `cil-book-*`)에만 남고, 같은 도메인의 [Causal Inference Hub](https://causalinferencelab.github.io/)가 이 기록으로 진도와 활동 여권 스탬프를 보여 줍니다.

## 원서 변경 반영 (메인테이너)

원서가 바뀌면 GitHub Actions(`Upstream watch`)가 매월 1일 확인해 바뀐 장과 본문 변경을 정리한 이슈를 메인테이너에게 배정합니다. 번역을 고친 PR이 메인테이너 검토를 거쳐 머지되면 웹북에 반영되고 이슈는 자동으로 닫힙니다. 자세한 절차는 [번역 가이드](TRANSLATION_GUIDE.md#5-원서-변경-반영)에 있습니다.
32 changes: 4 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Matheus Facure의 [Causal Inference for The Brave and True](https://matheusfacur
<a href="https://github.com/CausalInferenceLab/Causal-Inference-with-Python/pulls"><img src="https://img.shields.io/github/issues-pr/CausalInferenceLab/Causal-Inference-with-Python?color=a996d6" alt="Pull Requests"></a>
<a href="https://github.com/CausalInferenceLab/Causal-Inference-with-Python/issues"><img src="https://img.shields.io/github/issues/CausalInferenceLab/Causal-Inference-with-Python?color=a996d6" alt="Issues"></a>
<a href="https://github.com/CausalInferenceLab/Causal-Inference-with-Python/graphs/contributors"><img src="https://img.shields.io/github/contributors/CausalInferenceLab/Causal-Inference-with-Python?color=2b9348" alt="Contributors"></a>
<a href="https://github.com/CausalInferenceLab/Causal-Inference-with-Python/actions/workflows/book.yml"><img src="https://github.com/CausalInferenceLab/Causal-Inference-with-Python/actions/workflows/book.yml/badge.svg" alt="웹북 빌드"></a>
<a href="https://doi.org/10.5281/zenodo.4445778"><img src="https://img.shields.io/badge/%EC%9B%90%EC%84%9C%20DOI-10.5281%2Fzenodo.4445778-blue" alt="원서 DOI"></a>
</p>

Expand Down Expand Up @@ -75,7 +74,7 @@ Matheus Facure의 [Causal Inference for The Brave and True](https://matheusfacur
| 21 | [메타러너](https://causalinferencelab.github.io/Causal-Inference-with-Python/21-Meta-Learners.html) | 2023-12-31 | [박병수](https://github.com/Hinterhalter) |
| 22 | [편향 제거/직교화 머신러닝](https://causalinferencelab.github.io/Causal-Inference-with-Python/22-Debiased-Orthogonal-Machine-Learning.html) | 2023-11-03 | [홍성철](https://github.com/chulhongsung) |
| 23 | [효과 이질성과 비선형성](https://causalinferencelab.github.io/Causal-Inference-with-Python/23-Challenges-with-Effect-Heterogeneity-and-Nonlinearity.html) | 2024-01-10 | [임종언](https://github.com/limjongun95) |
| 24 | [이중차분법 사가](https://causalinferencelab.github.io/Causal-Inference-with-Python/24-The-Diff-in-Diff-Saga.html) | 2023-06-26 | [박시온](https://github.com/rockgoat95) |
| 24 | [이중차분법 시리즈](https://causalinferencelab.github.io/Causal-Inference-with-Python/24-The-Diff-in-Diff-Saga.html) | 2023-06-26 | [박시온](https://github.com/rockgoat95) |
| 25 | [합성 이중차분법](https://causalinferencelab.github.io/Causal-Inference-with-Python/25-Synthetic-Diff-in-Diff.html) | 2026-10-18 | [신진수](https://github.com/jsshin2022) |

### 부록
Expand All @@ -100,43 +99,20 @@ Matheus Facure의 [Causal Inference for The Brave and True](https://matheusfacur
- 용어와 문체를 『실무로 통하는 인과추론 with 파이썬』 기준으로 통일했습니다.
- 원문의 오류는 본문과 수식을 고치지 않고 옮긴이 주로 짚었습니다. 뜻이 분명한 오타만 바로잡고 그 사실을 주에 밝혔습니다.

자세한 원칙과 용어표는 [번역 가이드](TRANSLATION_GUIDE.md)에 있습니다.
원서가 바뀌면 매달 확인해 한국어판에 반영합니다. 자세한 원칙과 용어표는 [번역 가이드](TRANSLATION_GUIDE.md)에 있습니다.

<br>

## 함께 만들기

- 웹북의 각 장 끝 '의견 나누기'에서 GitHub 계정으로 로그인해 댓글을 남길 수 있습니다. 댓글은 장별로 [GitHub Discussions](https://github.com/CausalInferenceLab/Causal-Inference-with-Python/discussions)에 모입니다.
- 오역, 오탈자, 깨진 수식이나 그림은 [이슈](https://github.com/CausalInferenceLab/Causal-Inference-with-Python/issues)로 알려 주세요.
- 직접 고치고 싶다면 [번역 가이드](TRANSLATION_GUIDE.md)를 읽고 PR을 보내 주세요. 원고는 `causal-inference-for-the-brave-and-true/` 폴더의 노트북입니다.
- 직접 고치고 싶다면 [번역 가이드](TRANSLATION_GUIDE.md)와 [기여 안내](CONTRIBUTING.md)를 읽고 PR을 보내 주세요. 원고는 `causal-inference-for-the-brave-and-true/` 폴더의 노트북입니다.
- 더 나은 번역어가 있다면 [용어 제안](https://github.com/CausalInferenceLab/Causal-Inference-with-Python/issues/new?template=term-proposal.yml)으로 알려 주세요.
- 그 밖의 문의는 메인테이너 [신진수](https://github.com/jsshin2022)에게 부탁드립니다.

<br>

## 웹북 빌드

웹북은 [Quarto](https://quarto.org/) Book으로 만듭니다. `main`에 머지되면 GitHub Actions(`.github/workflows/book.yml`)가 빌드해 GitHub Pages에 배포합니다. PR에서는 빌드만 확인하며, 결과물은 Actions의 `book-preview` 아티팩트로 내려받아 볼 수 있습니다.

로컬에서 미리 보려면 Quarto를 설치한 뒤 다음을 실행하세요. 노트북은 다시 실행하지 않고 저장된 출력을 그대로 씁니다.

```bash
pip install jupyter
python book/prepare.py
cd book && quarto preview
```

`book/prepare.py`는 빌드할 때 [번역 가이드](TRANSLATION_GUIDE.md)의 용어표로 웹북의 '용어집' 페이지를 만들고, `book/postrender.py`는 렌더링이 끝난 뒤 웹북 검색 색인(`search-index.json`)을 만듭니다. `book/prepare.py`는 빌드할 때만 장 제목, 수식 표기, 접힌 코드, 옮긴이 주 상자를 책 형식으로 바꿉니다. 그래서 노트북은 원서와 같은 구조로 두면 됩니다.

읽기 기능(읽은 장 기록, 이어 읽기, 장 끝 평가, 허브로 가는 링크)은 `book/reader.html`, GA4 설정은 `book/analytics.html`에 있습니다. 읽은 장 기록은 독자의 브라우저(`localStorage`의 `cil-book-*`)에만 남고, 같은 도메인의 [Causal Inference Hub](https://causalinferencelab.github.io/)가 이 기록으로 진도와 활동 여권 스탬프를 보여 줍니다.

<br>

## 원서 변경 반영

원서가 바뀌면 GitHub Actions(`Upstream watch`)가 매월 1일 확인해 바뀐 장과 본문 변경을 정리한 이슈를 메인테이너에게 배정합니다. 번역을 고친 PR이 메인테이너 검토를 거쳐 머지되면 웹북에 반영되고 이슈는 자동으로 닫힙니다. 자세한 절차는 [번역 가이드](TRANSLATION_GUIDE.md#5-원서-변경-반영)에 있습니다.

<br>

## 감사의 말

한국어 번역을 흔쾌히 허락해 준 Matheus Facure에게 감사드립니다. 번역과 실습 자료를 함께 만든 인과추론팀 멤버들에게도 고마운 마음을 전합니다.
Expand Down
2 changes: 1 addition & 1 deletion book/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ book:
collapse-level: 3
header: |
<a class="hub-card" href="https://causalinferencelab.github.io/"><span class="hub-card-arrow" aria-hidden="true">←</span><span class="hub-card-text"><b>Causal Inference Hub</b><small>인과추론팀 커리큘럼과 오픈소스</small></span></a>
<a class="brand-lockup" href="https://pseudo-lab.com/" target="_blank" rel="noopener" aria-label="가짜연구소">
<a class="brand-lockup" href="https://causalinferencelab.github.io/" title="Causal Inference Hub로 가기" aria-label="가짜연구소 인과추론팀 Causal Inference Hub로 가기">
<img class="brand-pseudolab only-light" src="assets/pseudolab-dark.png" alt="가짜연구소 Pseudo Lab">
<img class="brand-pseudolab only-dark" src="assets/pseudolab-light.png" alt="가짜연구소 Pseudo Lab">
<span class="brand-divider"></span>
Expand Down
9 changes: 2 additions & 7 deletions book/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@ aliases:
```{=html}
<div class="hero">
<div class="hero-main">
<nav class="hero-crumb" aria-label="위치">
<a href="https://causalinferencelab.github.io/">인과추론 허브</a>
<span aria-hidden="true">›</span>
<a href="https://causalinferencelab.github.io/#station=Causal-Inference-with-Python">커리큘럼 L1</a>
</nav>
<div class="hero-brand">
<a class="hero-brand" href="https://causalinferencelab.github.io/" title="Causal Inference Hub로 가기">
<img class="hero-pseudolab" src="assets/pseudolab-light.png" alt="가짜연구소 Pseudo Lab">
<span class="hero-brand-divider"></span>
<span class="hero-brand-team">인과추론팀 <b>Causal-Lab</b></span>
</div>
</a>
<p class="hero-title">Python으로 하는<br>인과추론</p>
<p class="hero-sub"><a href="https://matheusfacure.github.io/python-causality-handbook/landing-page.html">Causal Inference for The Brave and True</a> 한국어판. 인과추론의 기초부터 실무 응용까지, 모든 실습을 파이썬으로.</p>
<div class="hero-actions">
Expand Down
2 changes: 1 addition & 1 deletion book/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"21-Meta-Learners": "메타러너",
"22-Debiased-Orthogonal-Machine-Learning": "편향 제거/직교화 머신러닝",
"23-Challenges-with-Effect-Heterogeneity-and-Nonlinearity": "효과 이질성과 비선형성",
"24-The-Diff-in-Diff-Saga": "이중차분법 사가",
"24-The-Diff-in-Diff-Saga": "이중차분법 시리즈",
"25-Synthetic-Diff-in-Diff": "합성 이중차분법",
"Debiasing-with-Orthogonalization": "직교화로 편향 제거하기",
"Debiasing-with-Propensity-Score": "성향점수로 편향 제거하기",
Expand Down
16 changes: 15 additions & 1 deletion book/reader.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

// ---------- 허브(같은 도메인의 팀 사이트)로 가는 링크: 같은 탭, utm_*, 클릭 이벤트 ----------
function placement(a) {
var spots = [["#quarto-sidebar", "sidebar"], [".quarto-secondary-nav", "topbar"], [".nav-footer", "footer"],
var spots = [[".cil-hubbar", "hubbar"], ["#quarto-sidebar", "sidebar"], [".quarto-secondary-nav", "topbar"], [".nav-footer", "footer"],
[".hero", "hero"], [".hub-banner", "intro_banner"], [".cil-end", "chapter_end"], ["main", "content"]];
for (var i = 0; i < spots.length; i++) if (a.closest(spots[i][0])) return spots[i][1];
return "other";
Expand Down Expand Up @@ -73,6 +73,20 @@
}
paintSidebar();

// 모든 페이지 맨 위: 이 책이 Causal Inference Hub의 자료라는 띠
if (main) {
var bar0 = document.createElement("div");
bar0.className = "cil-hubbar";
bar0.innerHTML =
'<a class="cil-hubbar-home" href="' + HUB + '"><img src="assets/causal-lab-mark.png" alt="" width="22" height="25">' +
'<span><b>Causal Inference Hub</b><small>가짜연구소 인과추론팀</small></span></a>' +
'<span class="cil-hubbar-where">이 책은 허브 커리큘럼의 <b>L1</b> 자료입니다</span>' +
'<nav class="cil-hubbar-nav" aria-label="Causal Inference Hub">' +
'<a href="' + HUB + '#curriculum">커리큘럼</a><a href="' + HUB + '#posts">연재</a><a href="' + HUB + '#join">참여하기</a>' +
"</nav>";
main.insertBefore(bar0, main.firstChild);
}

// 좁은 화면 상단 막대: 허브 바로가기
var nav = document.querySelector(".quarto-secondary-nav .container-fluid");
if (nav) {
Expand Down
15 changes: 15 additions & 0 deletions book/styles-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -234,3 +234,18 @@ body {
background: rgba(111, 207, 151, 0.1);
border-color: rgba(111, 207, 151, 0.3);
}

.cil-hubbar {
border-color: #2b2e40;
background: linear-gradient(90deg, rgba(180, 165, 234, 0.12) 0%, rgba(180, 165, 234, 0.04) 100%);
}

.cil-hubbar-home,
.cil-hubbar-where b,
.cil-hubbar-nav a {
color: #eceaff;
}

.cil-hubbar-where {
color: #9a9db0;
}
117 changes: 95 additions & 22 deletions book/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,101 @@ main:has(.hero) #title-block-header {
text-align: center;
}

// 모든 페이지 맨 위: Causal Inference Hub 띠
.cil-hubbar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.4rem 1rem;
margin: 0 0 1.4rem;
padding: 0.55rem 0.9rem;
border-radius: 12px;
border: 1px solid rgba($indigo, 0.14);
background: linear-gradient(90deg, $lavender-soft 0%, rgba($lavender-soft, 0.35) 100%);
font-size: 0.84rem;
}

.cil-hubbar a {
text-decoration: none;
}

.cil-hubbar-home {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: $navy;
}

.cil-hubbar-home img {
width: 22px;
height: auto;
margin: 0;
}

.cil-hubbar-home span {
display: flex;
flex-direction: column;
line-height: 1.25;
}

.cil-hubbar-home b {
font-weight: 800;
}

.cil-hubbar-home small {
font-size: 0.72rem;
color: $sidebar-fg;
}

.cil-hubbar-where {
color: lighten($body-color, 25%);
}

.cil-hubbar-where b {
color: $indigo;
}

.cil-hubbar-nav {
display: flex;
gap: 0.3rem;
margin-left: auto;
}

.cil-hubbar-nav a {
padding: 0.25rem 0.65rem;
border-radius: 999px;
color: $indigo;
font-weight: 650;
}

.cil-hubbar-nav a:hover {
background: rgba($indigo, 0.1);
}

@media (max-width: 767.98px) {
.cil-hubbar-where {
display: none;
}
.cil-hubbar-nav {
margin-left: 0;
width: 100%;
}
.cil-hubbar-nav a {
padding-left: 0;
padding-right: 0.8rem;
}
}

a.hero-brand {
color: inherit;
text-decoration: none;
}

a.hero-brand:hover .hero-brand-team {
text-decoration: underline;
text-underline-offset: 3px;
}

// 사이드바 맨 위: Causal Inference Hub로 가는 카드
.hub-card {
display: flex;
Expand Down Expand Up @@ -514,28 +609,6 @@ main:has(.hero) #title-block-header {
}
}

// 첫 화면 위치 표시: 인과추론 허브 › 서가
.hero .hero-crumb {
display: flex;
align-items: center;
gap: 0.45rem;
margin-bottom: 1.1rem;
font-size: 0.82rem;
color: rgba(255, 255, 255, 0.6);
}

.hero .hero-crumb a {
color: rgba(255, 255, 255, 0.88);
font-weight: 600;
text-decoration: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.hero .hero-crumb a:hover {
color: #fff;
border-bottom-color: #fff;
}

// 장 첫머리: 분량, 위치, 노트북
.cil-chapter-meta {
display: flex;
Expand Down
Loading
Loading