Regional Inequality from Outer Space — Interactive Lab

A pedagogical companion to Regional Inequality from Outer Space: Predicting GDP from Nighttime Lights and Building Inequality Indices in Python ↗ Back to the post

Lights → GDP: the calibration slope

Lessmann and Seidel (2017) predict a region's income from how brightly it glows at night. The model regresses log regional GDP per capita on log nighttime light, and the slope — the light-to-GDP elasticity β — is the single most important number in the prediction step. Slide it and watch the prediction line pivot through the data cloud.

Preferred random-effects estimate (col 7) = 0.102. The clean within-region FE estimate (col 2) = 0.190 is marked in teal.
region-years (calibration sample) your prediction line (slope β) FE col 2 reference (β = 0.190)
Predicted log-GDP = const + β · log-light. The line pivots through the cloud's centre as you move β.
Your slope β
0.102
a 10% brighter region ⇒ 1.0% richer
Prediction quality
r = 0.925
predicted vs observed log income (5,258 region-years)
National-income elasticity
0.889
regional income tracks national almost 1-for-1; light adds the detail
Inequality payoff
0.49 vs 0.21
Gini correlation: predicted income vs raw light

What to look for

  • Move β toward 0.190. That is the clean within-region elasticity (col 2): a steeper slope, before national income and geography are absorbed.
  • Move β toward 0.102. The preferred random-effects slope. Smaller, because national income already does most of the conversion — light fine-tunes the regional detail.
  • The fit is good either way. Predicted and observed log income correlate r = 0.925 across four orders of magnitude of income — what licenses applying the model to regions with no statistics.
Tab 2

Build an inequality index

Turn six regional incomes into a single number. Drag incomes and populations and watch the weighted Gini, Theil, and CV update — next to the equal-weight Gini.

Tab 3

Kuznets explorer

Fit a linear, quadratic, or cubic curve to inequality vs log income and watch the N-shape emerge as terms are added.

Tab 4

Spatial errors

Widen the Conley radius and watch the confidence interval on β = 0.190 grow — while the estimate stays far from zero.

Glossary (open a card if a term is unfamiliar)

Nighttime lights as an income proxy
The brightness a satellite records over a place, used as a stand-in for its economic output. Imperfect — predict income from light rather than equate the two.
Light-to-GDP elasticity (β)
The % change in predicted regional GDP for a 1% change in light per pixel. β = 0.102 in the preferred model; 0.190 in the clean within-region column.
Population-weighted index
An inequality summary where each region counts in proportion to its population. Ties the index to where people actually live.
The role of population weights
Whether each region counts once or by its population changes the number. Weighted and unweighted Gini correlate only 0.75.
Spatial Kuznets curve
The hypothesis that regional inequality rises then falls as countries develop. Here an N-shape: rise, fall, faint upturn.
Conley (spatial-HAC) standard errors
Standard errors that let nearby regions' errors correlate. Wider, and more honest, than treating regions as independent.
Random vs fixed effects
RE keeps the between-region variation FE discards. RE col 7 = 0.102; FE col 7 = 0.049; they agree (0.190) only in col 2.
Theil index / GE(α)
Generalized-entropy measures that weight gaps at the top (α large) or bottom (α small). GE(1) = Theil; GE(0) = mean log deviation.

Build an inequality index from six regions

The post compresses each country's many regional incomes into one number, weighting each region by its population. Drag the income and population of six regions and watch the population-weighted Gini, Theil and CV update live — alongside the equal-weight Gini, so you can see exactly what the weights do.

Six regions — drag income (k$) and population (millions)

Weighted Gini
double-sum |yᵢ−yⱼ|·wᵢwⱼ / (2·(Σw)²·μ)
Equal-weight Gini
every region counts once
Theil GE(1)
Σ pᵢ rᵢ ln rᵢ
CV (weighted)
√(Σ pᵢ rᵢ² − 1)
MLD GE(0)
Σ pᵢ ln(1/rᵢ)
Population-weighted income profile: bar height = region income, bar width ∝ population. The dashed orange line is the population-weighted mean.

What to look for

  • Weighted ≠ equal-weight. Push the smallest region to an extreme income: the equal-weight Gini jumps, but the weighted Gini barely moves — population weighting discounts tiny extreme regions. In the post the two correlate only 0.75.
  • "Make all regions equal" drives every index to 0 — perfect equality.
  • "One rich capital" concentrates income in one populous region: the indices rise together because all five measures agree on the same story (they correlate above 0.9 in the data).
  • Weighting usually lowers inequality (by ~0.003 on average in the post) — so always report whether you counted regions or people.

Kuznets explorer: how the curve bends as terms are added

Does regional inequality first rise, then fall, as countries grow richer? The post fits a cubic in log income with country and period fixed effects: const −0.799, lg 0.293, lg² −0.032, lg³ 0.00112 — a positive, negative, positive sign pattern that traces an N-shape. Toggle the curve order and watch the bends appear.

Fitted curve order

Linear can only go up or down; quadratic bends once (the classic Kuznets hump); the cubic adds a faint second upturn — the N.
country-period observations fitted curve turning points / N-shape markers
Regional Gini vs log GDP per capita. With the cubic, the curve rises, falls, and turns faintly up again — the N-shape.
lg (linear)
post: 0.293
lg² (quadratic)
post: −0.032
lg³ (cubic)
post: 0.00112
Shape
from the active terms

What to look for

  • Linear → Quadratic. The straight line becomes a hump — inequality rises then falls. That is the original Kuznets prediction.
  • Quadratic → Cubic. A faint upturn appears at the very top: the N-shape. The cubic term (0.00112) is tiny but flips the high-income tail back up.
  • The cloud is wide. Development explains the shape, not the scatter — country-specific factors (named in Tab 1's glossary and the post's determinants) account for the rest. Ethnic inequality is the strongest, at 0.071.

Spatial errors: how far do shocks travel?

Regions are not independent — a boom in one province spills into its neighbours, so their regression errors are correlated. The Conley spatial-HAC correction widens the standard error on the clean light elasticity (β = 0.190) by letting regions within a chosen radius correlate. Slide the radius and watch the confidence interval widen — while the point estimate stays fixed.

Errors of regions within this great-circle distance are allowed to be correlated. Wider radius ⇒ fewer "independent" observations ⇒ larger SE.
point estimate β = 0.190 (fixed) Conley 95% CI (widens with radius) naive iid 95% CI (SE 0.013)
The point estimate holds fixed; only the confidence interval grows as spatial correlation is allowed over a wider radius.
Point estimate β
0.190
FE col 2 (held fixed)
Conley SE
0.026
at the chosen radius
Naive iid SE
0.013
treats regions as independent
t-statistic (Conley)
β / Conley SE

What to look for

  • The interval widens, the dot does not move. Conley SEs (0.026 → 0.037 across 1,000–5,000 km) are two to three times the naive 0.013, because neighbouring regions are not independent observations.
  • Still far from zero. Even at the widest radius the t-statistic stays above 5, so the lights-predict-income relationship is not a mirage created by ignoring geography.
  • Counting independent witnesses. If ten "witnesses" all heard the same rumour you have one fact, not ten — Conley errors discount correlated neighbours.