Python

Dynamic Panel Data Models in Python: From Nickell Bias to System GMM

When a firm gains or loses workers this year, how much of that change is still there next year? This Python tutorial uses data on 140 British firms to show why simple estimates of this persistence mislead and how more careful methods and checks reach a reliable answer. It comes with an interactive app that runs in your web browser.

Bouncing Back Better? Evaluating the Economic Impact of the Aceh Tsunami

How did the 2004 tsunami affect the economy of Aceh, Indonesia, over the long run? This beginner-friendly Python tutorial uses simulated data, nighttime lights, and several causal methods to compare damaged and undamaged areas before and after the disaster.

Double LASSO in Python: Does Abortion Reduce Crime?

Python companion to the R and Stata Double LASSO tutorials — same data, same five estimators, plus a hands-on introduction to the DoubleML library (DoubleMLPLR, DoubleMLIRM, and learner-robustness across LASSO, RandomForest, XGBoost).

Carbon Taxes and CO2 Emissions: A Synthetic-Control Analysis in Python

Did the carbon tax that Sweden introduced in 1991 cut carbon emissions from transport, and did it hurt the economy? This Python tutorial builds a look-alike Sweden from other wealthy countries and finds transport emissions about 11 percent lower each year, with no sign of slower economic growth. It comes with an interactive app that runs in your web browser.

Do Institutions Cause Prosperity? An IV Tutorial in Python

Do good institutions make countries richer? This Python tutorial revisits the 2001 study by Acemoglu, Johnson and Robinson, which uses death rates of early European settlers in 64 former colonies to isolate the effect of institutions, and shows that a simple comparison understates that effect. It comes with an interactive app that runs in your web browser.

Causal Machine Learning and the Resource Curse with Python EconML

Does mining wealth help or hurt local development, and do good local institutions make the difference? This Python tutorial uses causal machine learning on simulated district data with known true effects to measure how the impact of mining and mineral prices varies from place to place. It comes with an interactive app that runs in your web browser.

A Beginner's Guide to Causal Inference with DoWhy in Python

Does working from home make employees more productive, or do productive people simply choose to work from home? This beginner Python tutorial uses simulated data with a known answer to show a four-step approach to cause and effect: state your assumptions, decide what to compare, estimate the effect and stress-test it. It comes with an interactive app that runs in your web browser.

Double Machine Learning with 401(k) Data: From Eligibility Effects to Complier Analysis

Does access to a workplace retirement savings plan make American households save more, or do the households that get it simply earn more? This Python tutorial uses double machine learning, which lets flexible prediction models account for income and other differences, on 1991 survey data. It comes with an interactive app that runs in your web browser.

MGWFER: Causal Spatially Varying Coefficients via Panel Fixed Effects

When we measure how a relationship changes from place to place, hidden features of each place can distort the answer. This Python tutorial follows a 2026 study by Li and Fotheringham and uses simulated data on 225 places over three periods to show how following the same places over time removes that distortion. It comes with an interactive app that runs in your web browser.

Causal Machine Learning for Policy Evaluation: From ATE to IATE to a Better Assignment Rule

If a job training program helps unemployed people find work, who gains the most, and who should be offered a place first? This Python tutorial uses causal machine learning on simulated jobseeker data with known true effects to move from the average effect to personal effects and a better way to assign training. It comes with an interactive app that runs in your web browser.