Skip to content
Open
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
13 changes: 12 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ on:
# stars, contributors and the activity feed every day
- cron: "17 21 * * *"
workflow_dispatch:
# the lounge shows GitHub Discussions, so a new post or answer rebuilds the site
discussion:
types: [created, edited, deleted, labeled, unlabeled, category_changed, answered, unanswered]
discussion_comment:
types: [created, deleted]

permissions:
contents: write
discussions: read

concurrency:
group: pages
Expand All @@ -36,6 +42,11 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python3 scripts/build_activity.py data/activity.json || echo "activity feed kept as is"

- name: Build the lounge feed
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python3 scripts/build_lounge.py data/lounge.json || echo "lounge kept as is"

- name: Copy the web book glossary
run: python3 scripts/build_glossary.py

Expand All @@ -51,7 +62,7 @@ jobs:
- name: Collect site files
run: |
mkdir _site
cp -r index.html article.html game.html lab.html library.html 404.html .nojekyll robots.txt sitemap.xml assets data articles builders badges _site/
cp -r index.html article.html game.html lab.html library.html lounge.html 404.html .nojekyll robots.txt sitemap.xml assets data articles builders badges _site/

# The Iterglow public SDK key lives in the ITERGLOW_SDK_KEY secret, not in the repo. It is added to the
# published experiments.json only while an experiment is switched on; with no key, experiments stay off.
Expand Down
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<header class="site-header">
<div class="wrap header-row">
<a class="brand" href="/"><img class="brand-logo" src="/assets/img/team-mark.png" alt="" width="34" height="34"><span class="brand-text"><span class="brand-name">Causal Inference Hub</span><span class="brand-sub">가짜연구소 인과추론팀</span></span></a>
<nav class="site-nav" aria-label="주요 메뉴"><a href="/#curriculum" class="stn s-main">커리큘럼</a><a href="/library.html" class="stn s-topics">자료실</a><a href="/#contrib" class="stn s-ml">Builder</a><a href="/#events" class="stn s-exp">행사</a><a href="/#posts" class="stn s-behavior">연재</a><a href="/#join" class="stn s-research" data-event="click_join" data-event-params='{"target":"pseudo","source":"nav"}'>참여하기</a></nav>
<nav class="site-nav" aria-label="주요 메뉴"><a href="/#curriculum" class="stn s-main">커리큘럼</a><a href="/library.html" class="stn s-topics">자료실</a><a href="/lounge.html" class="stn s-lounge">라운지</a><a href="/#contrib" class="stn s-ml">Builder</a><a href="/#events" class="stn s-exp">행사</a><a href="/#posts" class="stn s-behavior">연재</a><a href="/#join" class="stn s-research" data-event="click_join" data-event-params='{"target":"pseudo","source":"nav"}'>참여하기</a></nav>
<a class="hdr-ev" id="hdr-event" hidden></a>
<button type="button" class="pass-btn" data-passport aria-label="활동 여권 열기">여권 <b data-passport-count>0/9</b></button>
</div>
Expand Down
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,21 @@ python3 scripts/builder_cards.py
- `weekOf`(그 주 월요일)를 넣으면 그 주의 ‘이번 주 포스트’로 고정됩니다. 없으면 일주일 안에 올라온 새 글, 그다음은 돌아가며 보여 줍니다.
- 다른 블로그에 올린 글은 `"url": "https://..."`를 넣으면 그 주소로 연결됩니다(본문 파일은 필요 없습니다).
- `date`가 미래인 글은 그날(한국 시간)까지 목록에 보이지 않습니다. 연재 여러 편을 PR 하나로 올려 두고, 편마다 `date`와 `weekOf`를 그 주 월요일로 넣으면 한 주에 한 편씩 열립니다. 미리 보려면 `article.html#<slug>`로 직접 엽니다.
- `"pin": true`를 넣으면 라운지 맨 위에 ‘고정’으로 걸립니다. 출간 소식이나 정오표처럼 오래 보여야 할 글에만 씁니다.
- `related`에는 `map.json`의 책·강의 id나, `repos.json`에서 `site`가 있는 레포 이름(예: `Causal-Inference-with-Python`)을 넣습니다. 글 아래에 이어지는 자료로 보입니다.

## 라운지

라운지(`lounge.html`, 홈의 ‘라운지’ 탭)는 이 저장소의 GitHub Discussions와 `data/articles.json`의 연재 글을 한 목록으로 보여 줍니다. 연재는 ‘연재’ 게시판으로 들어가고, `pin`이 있는 글이 맨 위, 나머지는 최신순입니다. 홈에는 고정 글과 최신 글 세 개가 보입니다. 글쓰기와 답, 수정, 삭제는 모두 GitHub에서 하고, 허브는 읽기만 합니다.

- **게시판:** Discussions 카테고리 `질문`(Question / Answer 형식), `공유`, `회고`, `소식`. 허브는 이름으로 게시판을 알아봅니다. 글쓰기 버튼은 GitHub의 카테고리 고르기 화면으로 연결합니다.
- **갱신:** 글이나 답이 생기거나 바뀌면 배포 워크플로가 돌아 `scripts/build_lounge.py`가 `data/lounge.json`을 새로 씁니다. 매일 배포와 수동 실행에서도 갱신됩니다. 저장소의 `data/lounge.json`은 처음 화면용 빈 파일입니다.
- **스팸:** 성인·도박·대출 광고 낱말, 메신저 연락처 링크, 만든 지 며칠 안 된 계정의 링크 글은 피드에서 빠지고 워크플로 로그에 번호와 이유가 남습니다. GitHub의 글은 그대로이니, 정말 스팸이면 GitHub에서 지우거나 숨깁니다.
- **숨기기:** 글에 `spam`이나 `hidden` 라벨을 달면 다음 배포에서 허브에서 빠집니다. 라벨을 떼면 돌아옵니다.
- **Builder 표시:** 글쓴이의 GitHub 아이디가 `data/builders.json`의 `github`에 있으면 이름과 Builder 표시가 붙습니다.
- **연재로 옮기기:** 매월 고른 글은 글쓴이에게 알린 뒤 [연재 쓰기](#연재-쓰기) 순서대로 `articles/`에 옮기고, `url`로 원래 토론을 함께 걸어 둡니다.
- **로컬에서 규칙 시험:** GraphQL 응답을 파일로 저장해 `python3 scripts/build_lounge.py /tmp/lounge.json --from answer.json`.

## 활동 여권과 실험실

스탬프 정의는 `assets/js/passport.js`의 `STAMPS`에 있습니다. `kind: "auto"`는 허브가 알아서 찍고(`window.hubStamp("post")`), `kind: "self"`는 행사 후기, 강의 후기, 레포 댓글처럼 허브 밖에서 하는 일이라 방문자가 ‘했어요’를 눌러 찍습니다. 레벨 스탬프(`stage_L0`–`stage_L4`)는 그 레벨의 퀘스트를 모두 클리어하면 허브가 찍습니다. L3·L4처럼 `data/levels.json`에 `quests`(스탬프 id 목록)가 있는 레벨은 그 스탬프들이 퀘스트이고, 없는 레벨은 `steps`에 적은 자료가 퀘스트입니다. 레벨 진단 스탬프(`level_test`)는 진단을 끝까지 풀면 찍히고, 결과는 `cil-hub-level`에 남습니다. `/?level`로 들어오면 진단이 바로 열립니다. 이미 받은 스탬프는 다시 주지 않고, 기록은 `localStorage`에만 남습니다. 웹북 독자 스탬프는 같은 도메인의 웹북이 남기는 `cil-book-read`(읽은 장)를 보고 찍고, 역 정보 창의 '내 진도'와 '이어 읽기'는 `cil-book-read`, `cil-book-last`를 읽습니다. `/#passport`로 들어오면 여권이 바로 열립니다. 교란 실험실(`lab.html`, `assets/js/lab.js`)의 데이터는 페이지에서 만드는 가상 사용자입니다.
Expand All @@ -101,6 +114,8 @@ python3 scripts/builder_cards.py

`assets/js/track.js`의 `hubTrack(이름, 파라미터)`가 GA4로 이벤트를 보냅니다. 허브는 `assets/js/ga.js`에서 자체 Google 태그(`G-CS9K0E86LR`, 허브 GA4 속성의 스트림)만 불러오고, 웹북 태그와는 섞이지 않습니다. GA4가 설치되지 않았으면 아무 일도 하지 않습니다. 이벤트 이름과 파라미터는 PM 문서의 이벤트 사전을 따르고, 새 이벤트를 넣을 때는 사전에도 같이 적습니다. HTML에서는 `data-event="click_join" data-event-params='{"target":"template","source":"builder_page"}'`처럼 속성만으로도 보낼 수 있습니다. 로컬에서 확인하려면 콘솔에서 `window.HUB_DEBUG = true`를 켭니다.

라운지는 `lounge_write`(category, placement: 쓰기 버튼), `lounge_open`(category, placement: 토론 글 열기, 연재 글은 `read_post`의 placement `lounge_home`·`lounge_lounge`), `lounge_more`(홈에서 라운지 전체 보기), `lounge_filter`(category: 게시판 탭)를 보냅니다. 새 파라미터 이름에는 `source`, `medium`, `campaign`, `content`, `term`을 쓰지 않습니다. GA가 유입 경로 값으로 읽습니다.

한빛미디어 링크는 `track.js`가 한곳에서 처리합니다. 누를 때마다 `click_partner`(item, action, placement)를 한 번 보내고 링크에 `utm_source=causalinference_hub`를 붙이므로, 한빛 링크에는 따로 `data-event`를 달지 않습니다. `item`은 책 `paid-book`, 강의 `paid-lecture`, 채널 H 연재 `channel-h`이고, 그 밖의 한빛 주소는 `other`입니다. 들어온 링크의 `utm_*`는 `ga.js`가 주소창에서 지우기 전에 `sessionStorage`의 `cil-hub-landing`에 남깁니다. `utm_source=forum5`처럼 `forum<회차>`로 들어오면 그 탭에서는 진단이 행사 현장 모드가 됩니다. 진단 결과에 네트워킹 카드가 생기고, 진단 이벤트에 `context`가 붙습니다. 카드는 행사 다음 날까지만 나옵니다.

## 배포
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**가짜연구소 인과추론팀이 2022년부터 함께 만든 오픈소스와 자료를 Level 0–4 커리큘럼으로 엮은 곳입니다.**

인과추론에서 시작해 온라인 실험, 데이터 에이전트까지 AI 시대에 데이터로 판단하는 힘을 함께 공부하고 만듭니다.
인과추론에서 시작해 온라인 실험, 데이터 에이전트까지 AI 시대에 데이터로 판단하는 힘을 함께 공부하고 만듭니다. 라운지에서는 데이터 실무자 누구나 묻고, 나누고, 회고를 남깁니다.

**[causalinferencelab.github.io](https://causalinferencelab.github.io)**

Expand All @@ -16,6 +16,7 @@
| 처음 공부한다 | [Causal Studio](https://www.youtube.com/@CausalStudio): 짧은 입문 영상과 Colab 노트북으로 상관과 인과의 차이부터 |
| 글로 차근차근 읽고 싶다 | [Brave & True 웹북](https://causalinferencelab.github.io/Causal-Inference-with-Python/): 원서 25장과 부록 5편을 모두 옮긴 한국어판 |
| 현업 문제에 바로 쓰고 싶다 | [실무자 특강 영상 17강](https://www.youtube.com/playlist?list=PLKKkeayRo4PWuwIL0_C7n_QQQ_at6CpoE), [산업 사례 템플릿](https://github.com/CausalInferenceLab/causal-inference-practice), [온라인 실험 자료](https://github.com/CausalInferenceLab/OCE-Materials) |
| 묻고 싶거나 나누고 싶다 | [라운지](https://causalinferencelab.github.io/lounge.html): 질문, 공유, 회고, 소식. GitHub 계정으로 누구나 씁니다 |
| 직접 만들고 싶다 | [참여하는 방법](#참여하는-방법) |

여기까지의 자료는 모두 무료입니다. Causal Studio는 처음 보는 분을 위한 입문 영상이고, 실무자 특강 영상은 책의 장마다 현업 사례를 다루는 Level 2 자료라 개념을 익힌 뒤 보는 편이 좋습니다.
Expand Down Expand Up @@ -87,15 +88,15 @@

## English summary

The Causal Inference Hub is the home of the Pseudo-Lab Causal Inference Team (가짜연구소 인과추론팀). It gathers the team's open-source work since 2022 into one Level 0–4 curriculum: a video primer (Causal Studio), the full Korean edition of *Causal Inference for The Brave and True*, applied templates and online-experiment materials, a data agent (Lang2SQL) and a research R package (ccwr). A three-minute level test points you to where to start. Each cohort, Builders open projects and runners join them; the hub shows those projects, the people who led them, and how to take part.
The Causal Inference Hub is the home of the Pseudo-Lab Causal Inference Team (가짜연구소 인과추론팀). Its lounge, built on GitHub Discussions, is where anyone with a GitHub account asks questions and shares posts and retrospectives. It also gathers the team's open-source work since 2022 into one Level 0–4 curriculum: a video primer (Causal Studio), the full Korean edition of *Causal Inference for The Brave and True*, applied templates and online-experiment materials, a data agent (Lang2SQL) and a research R package (ccwr). A three-minute level test points you to where to start. Each cohort, Builders open projects and runners join them; the hub shows those projects, the people who led them, and how to take part.

## 이 레포에 대해

허브는 빌드 도구 없이 `data/` 폴더의 JSON을 읽어 그리는 정적 사이트입니다. `main`에 머지되면 GitHub Actions가 통계를 갱신하고 Builder 페이지를 만들어 배포합니다.

| 폴더·파일 | 들어 있는 것 |
| --- | --- |
| `index.html`, `library.html`, `article.html`, `game.html`, `lab.html` | 허브, 자료실, 연재 글, 게임, 실험실 페이지 |
| `index.html`, `library.html`, `lounge.html`, `article.html`, `game.html`, `lab.html` | 허브, 자료실, 라운지, 연재 글, 게임, 실험실 페이지 |
| `data/` | 레포, 커리큘럼, 레벨 진단, 행사, Builder 정보. 내용을 바꿀 때는 대부분 여기만 고칩니다 |
| `articles/` | 연재 글 원고(Markdown) |
| `assets/` | 스타일, 스크립트, 이미지 |
Expand Down
2 changes: 1 addition & 1 deletion article.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<img class="brand-logo" src="assets/img/team-mark.png" alt="" width="34" height="34">
<span class="brand-text"><span class="brand-name">Causal Inference Hub</span><span class="brand-sub">가짜연구소 인과추론팀</span></span>
</a>
<nav class="site-nav" aria-label="주요 메뉴"><a href="/#curriculum" class="stn s-main">커리큘럼</a><a href="/library.html" class="stn s-topics">자료실</a><a href="/#contrib" class="stn s-ml">Builder</a><a href="/#events" class="stn s-exp">행사</a><a href="/#posts" class="stn s-behavior">연재</a><a href="/#join" class="stn s-research" data-helper-ask="같이 하고 싶어요" data-event="click_join" data-event-params='{"target":"pseudo","source":"nav"}'>참여하기</a></nav>
<nav class="site-nav" aria-label="주요 메뉴"><a href="/#curriculum" class="stn s-main">커리큘럼</a><a href="/library.html" class="stn s-topics">자료실</a><a href="/lounge.html" class="stn s-lounge">라운지</a><a href="/#contrib" class="stn s-ml">Builder</a><a href="/#events" class="stn s-exp">행사</a><a href="/#posts" class="stn s-behavior">연재</a><a href="/#join" class="stn s-research" data-helper-ask="같이 하고 싶어요" data-event="click_join" data-event-params='{"target":"pseudo","source":"nav"}'>참여하기</a></nav>
<a class="hdr-ev" id="hdr-event" hidden></a>
<button type="button" class="pass-btn" data-passport aria-label="활동 여권 열기">여권 <b data-passport-count>0/9</b></button>
</div>
Expand Down
Loading