Python

Multiscale Geographically Weighted Regression: Spatially Varying Economic Convergence in Indonesia

Do poorer districts in Indonesia catch up with richer ones at the same pace everywhere? This Python tutorial uses a map-based regression that lets each relationship change from place to place, each at its own geographic scale, across 514 districts. It comes with an interactive app that runs in your web browser.

Synthetic Control with Prediction Intervals: Quantifying Uncertainty in Germany's Reunification Impact

Did German reunification in 1990 lower income in West Germany, and how sure can we be? This Python tutorial builds a look-alike West Germany from other wealthy countries and adds a range of likely values around the estimate, showing income per person about 11 percent below the comparison by 2003. It comes with an interactive app that runs in your web browser.

Introduction to PCA Analysis for Building Development Indicators

How can two health measures, life expectancy and infant mortality, be combined into one fair health score? Using simulated data for 50 countries, this Python tutorial builds the index step by step with principal component analysis, a method that finds the single direction capturing most of the shared information. It comes with an interactive app that runs in your web browser.

Pooled PCA for Building Development Indicators Across Time

How can we tell whether regions are developing over time when the measuring stick itself must stay the same? Using education, health and income data for 153 South American regions in 2013 and 2019, this Python tutorial builds one development index from both years together so that scores can be compared across time. It comes with an interactive app that runs in your web browser.

High-Dimensional Fixed Effects Regression: An Introduction in Python

How much of the higher pay of union workers comes from the union itself, and how much from who joins? This Python tutorial shows how fixed effects, which compare each worker only with the same worker over time, remove hidden differences and cut the apparent union pay gain from about 18 to 8 percent. It comes with an interactive app that runs in your web browser.

Introduction to Difference-in-Differences in Python

Did a new policy really change outcomes, or were things already improving? This Python tutorial introduces the difference-in-differences method, which compares changes over time between places that got the policy and places that did not, using simulated data, and checks how solid the answer is. It comes with an interactive app that runs in your web browser.

Introduction to Partial Identification: Bounding Causal Effects Under Unmeasured Confounding

Does job training help people find work when an important factor, such as past work experience, was never measured? Using simulated workers in Python, we compute a range that the true effect must lie within instead of a single number, and see why more data alone cannot narrow it. It comes with an interactive app that runs in your web browser.

Introduction to Causal Inference: The DoWhy Approach with the Lalonde Dataset

Did a job training program raise the earnings of disadvantaged workers? This Python tutorial applies a four-step approach to cause and effect (state your assumptions, decide what to compare, estimate the effect and stress-test it) to the classic LaLonde job training data. It comes with an interactive app that runs in your web browser.

Introduction to Causal Inference: Double Machine Learning

Does a cash bonus help unemployed workers find jobs faster? This Python tutorial uses double machine learning, which lets flexible prediction models strip out the influence of background characteristics, on data from a real experiment in Pennsylvania. It comes with an interactive app that runs in your web browser.

Introduction to Machine Learning: Random Forest Regression

Can satellite images tell us how well each municipality in Bolivia is developing? This beginner-friendly Python tutorial trains a random forest, a machine learning model that averages many decision trees, tests it on places it never saw, and finds that the images hold real but limited information. It comes with an interactive app that runs in your web browser.