--- title: ImpactLab LATAM emoji: 🧪 colorFrom: blue colorTo: green sdk: static app_file: index.html license: mit short_description: Policy evaluation with DiD and synthetic controls. pinned: false fullWidth: true tags: - policy-analysis - causal-inference - latin-america - data-visualization - world-bank - research --- # ImpactLab LATAM · Policy Evaluation Studio **An open-source, browser-only research workbench for transparent, exploratory policy comparisons across Latin America.** **Author:** Rodrigo Pantoja (`@Hugdrigo`) **Release:** 1.0.0 **License:** MIT (original code). Public indicators remain governed by their source terms. **Hosting:** Hugging Face Static Space; no paid API key or running Python server is required. ## Why this project matters A country comparison does not become causal merely by plotting outcomes before and after a date. ImpactLab is designed to show each analytical choice and its limitations. A user selects a treated economy, donor economies, an outcome indicator, a study window, and an assumed policy-break year. The tool then produces **exploratory**, inspectable contrasts with provenance and reproducibility outputs. ## Eight research modules | Module | Function | | --- | --- | | 01 Overview | Summary, trend chart, main constraints and method availability | | 02 Time series | Observed treated and donor-mean trajectories, per-year contrasts | | 03 Difference-in-Differences | Explicit two-group pre/post comparison, pre-trend slope gap and year-resampling interval | | 04 Synthetic control | Nonnegative donor weights that sum to one; fitted on pre-break years only | | 05 Placebos | Alternative treated-country assignments and earlier break-year comparisons | | 06 Data audit | Completeness, missing years, latest reported year and method eligibility | | 07 Protocol | Intervention documentation, external evidence link, confounder checklist, notes | | 08 Export | Selected-panel CSV, research report Markdown, full restorable session JSON | ## Data provenance * **DEMO** (initial load): locally generated **fictional** observations, explicitly marked synthetic. These are not official country statistics and should never be used as evidence. * **WORLD BANK LIVE** (after button press): directly fetched from the [World Bank Indicators API v2](https://datahelpdesk.worldbank.org/knowledgebase/articles/889392) in the user's browser. No API key required. Indicators may have different reporting lags and definitions. * **IMPORTED**: research sessions restored from JSON. The application labels them **unverified imported data** regardless of their original metadata. See [DATA_DICTIONARY.md](DATA_DICTIONARY.md) and [PROVENANCE.md](PROVENANCE.md). ## What is and is not estimated **Included:** transparent DiD contrast, convex donor-weighted synthetic comparison, pre-break slope diagnostic, descriptive resampling range, year-placebo and unit-placebo exercises, completeness audit. **Not included:** identification of a real treatment event, randomized assignment, causal proof, instrumental-variable identification, generalized synthetic-control estimation, cluster-robust standard errors, significance testing, forecasting or policy recommendations generated by a large language model. The statistics do **not** establish that an actual policy caused a change. See [METHODOLOGY.md](METHODOLOGY.md) and [RESEARCH_ETHICS.md](RESEARCH_ETHICS.md). ## How to use 1. Open the **App** tab. The project starts in **SYNTHETIC DEMO** mode. 2. Choose the indicator, treated country, comparison countries and time window. 3. Enter a break year and click **Run evaluation**. 4. Explore the eight tabs. An explicit warning appears if data are insufficient. 5. To load real indicators, click **Load World Bank data** and wait for the **WORLD BANK LIVE** label. 6. Record the actual intervention and its external documentary source in **Protocol**, if known. 7. Download a report and an analysis session from **Export**. The default synthetic case includes an intentionally simulated shift for Chile in life expectancy after 2016, to make diagnostics testable. **It does not describe a real Chilean reform.** ## Reproduction and testing Code is vanilla JavaScript, HTML and CSS. There are no runtime package installations or secrets. ```bash node --test test_engine.cjs python -m http.server 8000 ``` The optional browser checks need Python Playwright and a local Chromium executable. They can also be run by providing an HTTP URL or by directly injecting local scripts into the test browser, as implemented in `test_browser.py`. See [QA_REPORT.md](QA_REPORT.md), [ARCHITECTURE.md](ARCHITECTURE.md) and [DEPLOYMENT_ES.md](DEPLOYMENT_ES.md). ## Responsible use * Do not upload private data, passwords or secrets to the public repository. * World Bank series may be revised and may not share identical reporting years. * Country selection, intervention timing and donor selection are researcher decisions and must be justified. * A high synthetic-control fit can coexist with confounding or invalid causal identification. * The research report labels synthetic, live and imported sources separately. **Research prototype. Not an official economic report or a validated causal-impact estimate.**