feat(discovery): issue → policy → dataset → effect, with T3 sample and randomization inference - #3
Merged
Merged
Conversation
- core/discovery: match social text to catalog policies (keyword score, optional LLM pick among candidates), recommend curated datasets plus optional live data.go.kr search; design comes from the catalog, not the LLM - catalog/policies.yaml: 8 policies with dates, datasets, licenses, pitfalls - cases/t3-land-permit-2025: pre-registered plan (2025.3.24 expansion, 25 Seoul districts x month, 2024-01..2025-09); simulation until an API key is set; MOLIT real-transaction adapter (not yet verified live) - estimators: randomization inference when treated units < 10. With 4 of 25 treated, CRV1 pre-trend tests rejected a true null 50-80% of the time; RI brings 95% CI coverage to ~95% in simulation - app: "이슈 → 데이터 → 효과" page Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EMnmZPBD5PQJW1UQAARN7q
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EMnmZPBD5PQJW1UQAARN7q
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #2 (merge #1 → #2 → this).
What's added
Issue → policy → dataset → effect. One social-media post or news headline in, a policy-effect analysis out.
catalog/policies.yaml(8 policies with dates, datasets, licenses, pitfalls)did_simultaneous/did_staggered/scm/its) with support statusplan.yaml→ existing six-step flowcases/t3-land-permit-2025: 2025-03-24 land-transaction-permit expansion (Gangnam, Seocho, Songpa, Yongsan) vs. the other 21 Seoul districts, monthly, 2024-01 to 2025-09. The window ends before the 2025-10-20 citywide designation, and 2025-03 is dropped as a transition month.core/adapters/molit.pyimplements the MOLIT apartment-transaction API but has not been verified against the live API.Statistical fix: few treated units
With 4 of 25 districts treated, cluster-robust (CRV1) inference is unreliable. In simulation with no pre-trend, the joint pre-trend Wald test rejected 50–80% of the time at α = 0.10.
core/estimators/ri.py: randomization inference (placebo-in-space over control units, 999 draws) for event-study and DiD whenever treated units < 10 on a balanced, simultaneous-adoption panel.few_treated_clusters; reports and figures state which inference was used.Verification
pytest: 45 passed;ruff check/ruff format --check: cleanNot yet done
DATA_GO_KR_API_KEY); live validation of the MOLIT adapter🤖 Generated with Claude Code
https://claude.ai/code/session_01EMnmZPBD5PQJW1UQAARN7q
Generated by Claude Code