CoolFace
Apppublic

causalscience/Impact_Analysis_Tools

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

Impact Analysis Tools — Causal & Time‑Series Toolkit (Gradio)

An interactive Hugging Face Space built with Gradio for causal inference and time‑series workflows. Provides a user-friendly interface for conducting various causal inference analyses. This project is an extension of knowledge gained from the Udemy course "Econometrics and Statistics for Business in R & Python" by Diogo Alves de Resende (mid-2023).

What’s inside (tabs)

  • —EDA — interactive exploration via PyGWalker
  • —Difference‑in‑Differences (DiD) — standard & matched DiD flows
  • —Interrupted Time Series (ITS) — pre/post intervention effects
  • —Granger Causality — lag selection and tests
  • —Time Series Forecasting — Auto‑ARIMA, ETS, Prophet, SARIMAX
  • —Propensity Score Matching — nearest‑neighbor, caliper, stratification with Love plots

Repository layout

.
├── models/
│   ├── did.py
│   ├── granger.py
│   ├── its.py
│   ├── propensity.py
│   └── timeseries_forecasting.py
├── ui/
│   ├── did_tab.py
│   ├── eda_tab.py
│   ├── granger_tab.py
│   ├── its_tab.py
│   ├── propensity_tab.py
│   └── timeseries_tab.py
├── app.py
├── README.md
└── requirements.txt

Data expectations (by tab)

  • —EDA: CSV input; renders a PyGWalker explorer.
  • —DiD: long or wide format (binary treatment, pre/post indicator, outcome). Matched flows use pair IDs and pre/post columns.
  • —- ITS: date column, target, pre/post windows; optional controls.
  • —Propensity: binary 0/1 treatment and numeric covariates for matching. Outputs include Love plots and matched-unit/edge CSVs.
  • —Granger: at least two numeric series; configurable max lags and IC (AIC/BIC/HQIC/FPE).
  • —Forecasting: date, target, optional numeric exogenous regressors; horizon and frequency configurable.

Dependencies

Install via requirements.txt (key libraries):

  • —numpy, pandas
  • —matplotlib, seaborn, pillow
  • —statsmodels, scipy, patsy
  • —scikit-learn, pmdarima, prophet
  • —gradio, pygwalker, causalpy, pytensor

License

MIT