Case study: the Sustainable Development Index, ~2012 to ~2024

One complete analysis with geo4bolivia: how the Sustainable Development Index of Bolivia’s 343 municipalities changed between two periods, which goals moved, whether municipalities converged, and where.

✨ Run this page yourself: nothing to install on your computer.

▶ Open in Colab

This article is a short report written with the package from the first line to the last. It asks six questions about one indicator, and each is answered by one or two functions:

  1. How much did the index change, and where?
  2. Which goals moved most?
  3. Did municipalities converge?
  4. Is development clustered in space, and did the clusters move?
  5. Who moved in the ranking?
  6. What goes with a higher index?

The other articles explain each method. This one shows how they fit together, and ends with what the analysis found and what it does not show.

!pip install -q geo4bolivia
import pandas as pd
import plotly.express as px
import geo4bolivia as geo

ids = geo.load("sdg", variables=["index_sdg", "urbanization"],
               groups=["department"])

The data

The Atlas de los ODS en Bolivia 2026 (Andersen & Argandoña, SDSN Bolivia) measures 81 indicators of 15 Sustainable Development Goals in Bolivia’s 343 municipalities and indigenous autonomies, near the 2012 census and near the 2024 census. Each indicator is rescaled between a worst and a best value, a goal index is the mean of its rescaled indicators, and the Sustainable Development Index (index_sdg, 0 to 100) is the mean of the 15 goal indices. The Atlas has no index for goals 12 and 14.

print(geo.cite("sdg"))
geo.reference_years("sdg")
GeoDevelopment Observatory of Bolivia (2026). Sustainable Development Index (IDS), from the Atlas de los ODS en Bolivia 2026 (343 municipalities, ~2012 and ~2024). https://github.com/quarcs-lab/gdo4bolivia/blob/main/docs/datasets/sdg.md

Please also credit the original sources:
- Please cite the Atlas and its data as: Andersen, L.E. & Argandoña, F. (2026). Atlas de los ODS en Bolivia 2026: Brechas y tendencias del desarrollo sostenible en las Entidades Territoriales Autónomas, 2012–2024. La Paz: Universidad Privada Boliviana, SDSN Bolivia.
- SDSN Bolivia (2025). Límites Municipales Bolivia 2025 [Archivo shapefile]. https://sdsnbolivia.org/datos-espaciales/
variable label year reference
0 index_sdg Sustainable Development Index, IDS (0-100) 2012 ~2012
1 index_sdg Sustainable Development Index, IDS (0-100) 2024 ~2024
2 rank_sdg IDS national ranking (1 = best) 2012 ~2012
3 rank_sdg IDS national ranking (1 = best) 2024 ~2024
4 population Population (census) 2012 2012
5 population Population (census) 2024 2024
6 urbanization Urbanization rate (% of population) 2024 2024

The two periods are stored at the nominal years 2012 and 2024. The ~ in the table says that the index mixes indicators of different actual years: census indicators refer to 2012 and 2024, while others come from surveys or records of nearby years (geo.reference_years("sdg03") lists, for instance, mortality rates of 2008 and 2023 and three-year averages). “2012” and “2024” mean “around” those years throughout this article. The Atlas states no open license; the observatory uses and shares it with the permission of SDSN Bolivia.

1. How much did the index change, and where?

country = geo.aggregate(ids, to="country", dataset="sdg")
print("weighted by population:", country["index_sdg"].round(1).tolist())
geo.describe(ids, variables="index_sdg")
weighted by population: [57.8, 66.8]
variable label unit year count mean std min p25 median p75 max
0 index_sdg Sustainable Development Index, IDS (0-100) index (0-100) 2012 343 50.123032 5.819148 37.2 45.95 49.6 53.35 70.5
1 index_sdg Sustainable Development Index, IDS (0-100) index (0-100) 2024 343 60.081341 5.263740 47.3 56.40 59.8 63.70 77.3

The mean across municipalities rose from 50.1 to 60.1, about ten points, and the whole distribution moved up: the lowest value of 2024 (47.3) is close to the median of 2012 (49.6). The spread narrowed a little, with a standard deviation of 5.8 in 2012 and 5.3 in 2024. These figures count every municipality equally. Weighting each by its census population, which geo.aggregate() does with the rule the dataset declares, gives 57.8 and 66.8: the more populous municipalities tend to have a higher index.

geo.change() puts both periods and their difference on one row per municipality:

chg = geo.change(ids, "index_sdg")
print((chg["index_sdg_change"] > 0).sum(), "of", len(chg), "municipalities rose")
ordered = chg.sort_values("index_sdg_change", ascending=False)[
    ["name", "department", "index_sdg_2012", "index_sdg_2024", "index_sdg_change"]]
pd.concat([ordered.head(4), ordered.tail(4)])
342 of 343 municipalities rose
name department index_sdg_2012 index_sdg_2024 index_sdg_change
194 Cruz de Machacamarca Oruro 42.9 63.4 20.5
199 Carangas Oruro 43.4 62.8 19.4
42 Sicaya Cochabamba 42.8 60.4 17.6
67 Villa Gualberto Villarroel Cochabamba 43.4 60.3 16.9
267 Atocha Potosí 61.0 63.5 2.5
298 Puerto Suárez Santa Cruz 56.5 58.8 2.3
283 Roboré Santa Cruz 58.3 59.5 1.2
284 San José de Chiquitos Santa Cruz 57.8 55.1 -2.7

The index rose in 342 of the 343 municipalities. The largest gains, of 17 to 20 points, are in municipalities of Oruro and Cochabamba that started near 43. San José de Chiquitos (Santa Cruz) is the only one that fell, by 2.7 points, and the two smallest gains are in Santa Cruz as well.

geo.map(ids, "index_sdg", change=True, scheme="fisher_jenks")

The map classes the change by natural breaks. Gains of different sizes are not scattered at random: municipalities with large gains tend to be next to each other, and so do those with small gains. Section 4 measures that.

geo.trend(ids, "index_sdg", by="department")

Between 2012 and 2024, the mean of Sustainable Development Index, IDS (0-100) across 343 units rose from 50.1 to 60.1 (a change of +9.96).

99.7% of the units with data in both years ended higher than they started: the summary line describes the typical unit, not every unit.

By Department: Pando grew most (+11.5, from 48.5 to 60) and Santa Cruz grew least (+7.79). The gap between the highest and the lowest group narrowed from 11.9 to 10.5.

The band is one standard error on each side of the mean: how precisely the average is known, not how much units differ.

These are associations, not causal effects. A causal reading needs a research design.

Every department rose. The averages of municipalities went up most in Pando (+11.5) and least in Santa Cruz (+7.8). Tarija has the highest average in both periods (59.6 and 67.7) and Potosí the lowest (47.7 and 57.3). With two periods, each “trend” is a line between two points.

2. Which goals moved most?

The 15 goal indices live in 15 datasets, sdg01 to sdg17. geo.combine() puts them on one table, and geo.describe() gives their means with their labels:

numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 16, 17]    # no goal 12 or 14
goals = geo.combine({f"sdg{n:02d}": [f"index_sdg{n}"] for n in numbers},
                    scale="municipality")
means = geo.describe(goals).pivot(index="label", columns="year", values="mean")
means["change"] = means[2024] - means[2012]
means = means.sort_values("change").round(1).reset_index()
px.bar(means, x="change", y="label", hover_data=[2012, 2024],
       labels={"change": "Change of the mean across municipalities (points)",
               "label": ""},
       title="Goal indices: change between ~2012 and ~2024")

The ten points of the overall index are an average of very different movements:

  • Twelve of the 15 goal indices rose. The largest gains are in industry, innovation and infrastructure (goal 9: 21.9 to 52.3, +30.4), quality education (goal 4, +21.5), decent work and economic growth (goal 8, +18.8) and no poverty (goal 1, +17.8).
  • Climate action fell (goal 13: 79.6 to 71.8, −7.8).
  • Zero hunger and life on land stood still (goals 2 and 15, −0.3 each).

A goal index moves with its indicators and with the bounds used to rescale them, so the size of a change is comparable within a goal across municipalities more safely than across goals. geo.dictionary("sdg13") lists the indicators behind a goal.

3. Did municipalities converge?

Two questions: did the municipalities that started lower grow faster (β-convergence), and did the differences between municipalities shrink?

beta = geo.beta_convergence(ids, "index_sdg")
beta

Across 343 units, the growth of Sustainable Development Index, IDS (0-100) over a 12-year window is associated with its initial log level with a total slope of -0.0287 (SE 0.00171), statistically significant at the 1% level. The slope is negative — the β-convergence pattern: units that started lower tended to grow faster, narrowing initial gaps. That slope implies a convergence speed of λ = 0.0351 per year and a half-life of about 19.7 years — the time for half of an initial gap to close at this pace.

These are associations, not causal effects. A causal reading needs a research design.

The slope is −0.029: the lower the index around 2012, the faster it grew. Read as a speed, half of a gap between two municipalities would close in about 20 years at this pace. The starting level accounts for 44% of the differences in growth.

Dispersion fell too, on every measure:

ineq = geo.inequality(ids, "index_sdg", measures=("gini", "cv"))
theil = geo.theil_decomposition(ids, "index_sdg", by="department")
ineq.df.merge(theil.df, on="year").round(4)
year n_units gini cv theil between within between_share
0 2012 343 0.0650 0.1161 0.0066 0.0014 0.0053 0.2043
1 2024 343 0.0493 0.0876 0.0038 0.0006 0.0032 0.1475

The Gini index went from 0.065 to 0.049 and the coefficient of variation from 0.116 to 0.088. (Both are small because an index that is an average of 15 bounded indices varies little between units; compare the two periods, not the level with other variables.) Theil’s index splits into inequality between the nine departments and inequality within them. The part between departments was 20% of the total in 2012 and 15% in 2024: most of the differences are between municipalities of the same department, and more so at the end.

So municipalities ended closer together, and departments did as well. The convergence article shows that the slope holds within departments and in spatial models, and why two periods call for caution: a unit measured unusually low in the first period looks like fast growth afterwards.

4. Is development clustered, and did the clusters move?

Global Moran’s I measures whether neighbouring municipalities have similar values (positive), or whether values are placed as if at random (near zero).

of_change = geo.moran(chg, "index_sdg_change")
print("Moran's I of the change:", round(of_change.moran_i, 3), "p:", of_change.p_sim)
geo.moran(ids, "index_sdg", year="all").df
Moran's I of the change: 0.223 p: 0.001
year moran_i z_sim p_sim n_obs
0 2012 0.432470 12.748494 0.001 343
1 2024 0.467933 13.782523 0.001 343

The index is clearly clustered in both periods, and slightly more in the second: Moran’s I is 0.43 and 0.47, each far from what random placement gives (pseudo p-value 0.001). The change is clustered as well, less strongly (0.22). Convergence in values did not go with a weaker spatial pattern.

Local statistics (LISA) say where the clusters are, on the Moran scatterplot and on the map:

geo.lisa(ids, "index_sdg", year=2024).fig

In 2024, 60 municipalities are in High-High clusters (a high index among high neighbours) and 45 in Low-Low clusters. geo.lisa_transitions() compares the types of the two periods:

lt = geo.lisa_transitions(ids, "index_sdg")
print(lt.n_stayed, "of", lt.n_units, "kept their type")
lt.fig
275 of 343 kept their type
where = lt.df.merge(ids[["geo_id", "department"]].drop_duplicates())
pd.concat({year: pd.crosstab(where["department"],
                             where[f"cluster_{year}"].rename("type"))[
               ["High-High", "Low-Low"]] for year in (2012, 2024)}, axis=1)
2012 2024
type High-High Low-Low High-High Low-Low
department
Beni 0 1 0 2
Chuquisaca 0 3 3 1
Cochabamba 10 7 14 4
La Paz 2 10 12 13
Oruro 0 8 0 8
Pando 0 3 1 0
Potosí 1 12 3 13
Santa Cruz 23 0 17 4
Tarija 10 0 10 0
  • The map of clusters is mostly the same: 275 of 343 municipalities (80%) have the same type in both periods, and none went from High-High to Low-Low or back.
  • High-High clusters grew from 46 to 60 municipalities, and 39 of the 46 stayed. Around 2012 they were in Santa Cruz (23), Cochabamba (10) and Tarija (10). Around 2024 La Paz has 12 where it had 2 and Cochabamba 14, while Santa Cruz has 17. Ten of Tarija’s 11 municipalities are High-High in both periods.
  • Low-Low clusters kept their size: 44 and 45 municipalities, 30 of them the same. In both periods most are in Potosí, La Paz and Oruro (30 of 44, then 34 of 45). Santa Cruz had none around 2012 and has 4 around 2024; Pando had 3 and has none.

Most changes of type are to or from “Not significant”, a category that depends on a p-value threshold. They are worth a look on the map (lt.fig_map) before being read as change.

5. Who moved?

The index rose almost everywhere, so the ranking is the place to see who gained more than the rest.

rm = geo.rank_mobility(ids, "index_sdg")
print("Spearman:", round(rm.spearman, 2),
      " same quintile:", round(rm.share_same_group, 2))
movers = pd.concat([rm.climbers.head(5), rm.fallers.head(5)])
movers.merge(ids[["geo_id", "department"]].drop_duplicates())[
    ["name", "department", "index_sdg_2012", "index_sdg_2024", "rank_2012",
     "rank_2024"]]
Spearman: 0.84  same quintile: 0.56
name department index_sdg_2012 index_sdg_2024 rank_2012 rank_2024
0 Cruz de Machacamarca Oruro 42.9 63.4 315 90
1 Carangas Oruro 43.4 62.8 304 100
2 Sicaya Cochabamba 42.8 60.4 318 153
3 Todos Santos Oruro 44.4 61.2 290 135
4 Villa Gualberto Villarroel Cochabamba 43.4 60.3 304 156
5 San José de Chiquitos Santa Cruz 57.8 55.1 42 283
6 San Antonio de Esmoruco Potosí 49.7 53.2 168 316
7 San Miguel de Velasco Santa Cruz 50.4 54.9 149 286
8 Puerto Suárez Santa Cruz 56.5 58.8 52 188
9 Roboré Santa Cruz 58.3 59.5 41 175

The order was broadly kept: the rank correlation between the two periods is 0.84 and 56% of the municipalities are in the same fifth of the ranking. Inside that, some moves are long. Cruz de Machacamarca (Oruro) went from position 315 to 90, and the five largest climbs are in Oruro and Cochabamba, all from the bottom fifth. San José de Chiquitos went from 42 to 283, and four of the five largest falls are in Santa Cruz. Except for San José de Chiquitos, the municipalities that fell in the ranking raised their index; the others raised theirs more.

6. What goes with a higher index?

One model, as an example of the step from description to association. The dataset has the urbanization rate of 2024 (the share of the population living in urban areas), so the model is of the level in 2024. An ordinary regression assumes that its errors are independent; with a variable this clustered, that needs checking first. geo.spatial_diagnostics() fits the regression and tests what is left in its residuals:

diag = geo.spatial_diagnostics(ids, "index_sdg", "urbanization", year=2024)
print("recommended model:", diag.recommendation)
diag.gt
recommended model: error
Spatial dependence diagnostics for Sustainable Development Index, IDS (0-100)
OLS residual tests | W: queen contiguity (1 island(s) attached to nearest neighbor), row-standardized, n=343
Statistic df p-value
Moran's I (residuals) 0.4700 -- 0.0000
LM lag 168.5305 1 0.0000
LM error 187.1010 1 0.0000
Robust LM lag 4.5047 1 0.0338
Robust LM error 23.0751 1 0.0000
LM SARMA 191.6057 2 0.0000
Anselin-Florax recommendation: error

The residuals of the ordinary regression are as clustered as the index itself (Moran’s I 0.47): urbanization does not account for the spatial pattern. Both robust tests reject, the one for spatially correlated errors by far the more strongly (23.1 against 4.5), so the tests point to the spatial error model, which keeps the regression and lets neighbouring errors be correlated.

model = geo.spatial_model(ids, "index_sdg", "urbanization", year=2024,
                          model="error")
model.gt
Spatial error (sem) model of Sustainable Development Index, IDS (0-100)
ML estimates | n = 343 | R² = 0.313 | AIC = 1849.4
Estimate Std. Error z p
CONSTANT 57.9036*** (0.5841) 99.14 0.0000
Urbanization rate (% of population) 0.0815*** (0.0066) 12.26 0.0000
lambda 0.6749*** (0.0488) 13.82 0.0000
*** p<0.01, ** p<0.05, * p<0.10 (z-based)
W: queen contiguity (1 island(s) attached to nearest neighbor), row-standardized, n=343

One more percentage point of urban population goes with an index 0.08 points higher (standard error 0.007): a municipality that is 50 points more urban than another has, on average, an index about 4 points higher. The spatial parameter λ is 0.67: what the model leaves unexplained is strongly shared between neighbours.

This is an association in one cross-section. Urbanization was measured in the same year as the index, several of the indicators behind the index measure access to services, which can differ between urban and rural places for many reasons, and nothing here says what would happen to a municipality if it urbanized. Urbanization is not available for 2012, so the same model cannot be estimated for the change.

What we found

All of these are associations between measured quantities.

  • The index rose almost everywhere: from 50.1 to 60.1 on average across municipalities (57.8 to 66.8 weighted by population), in 342 of 343 municipalities and in every department.
  • The goals moved very differently: twelve of 15 goal indices rose, most of all industry, innovation and infrastructure (+30.4), education (+21.5), decent work (+18.8) and poverty (+17.8); climate action fell (−7.8), and zero hunger and life on land did not move (−0.3).
  • Municipalities ended closer together: the lower the start, the faster the growth (β = −0.029, a half-life of about 20 years); the Gini index fell from 0.065 to 0.049; the share of inequality that lies between departments fell from 20% to 15%.
  • The geography persisted: Moran’s I is 0.43 and 0.47; 80% of the municipalities kept their LISA type; High-High clusters grew from 46 to 60 municipalities, and Low-Low clusters stayed at 44 and 45.
  • The ranking was broadly kept (Spearman 0.84), with long moves up in Oruro and Cochabamba and down in Santa Cruz.
  • More urban municipalities have a higher index in 2024 (0.08 points per percentage point), and the part of the index that urbanization does not account for is strongly clustered (λ = 0.67).

What this does not show

  • Two periods. Every statement about change rests on two observations per municipality. There is no trend to test, a low first value followed by a faster rise can be regression to the mean, and transitions between two dates describe one step.
  • Nominal years. “2012” and “2024” stand for indicators of different actual years. Yearly rates and the half-life use twelve years as a convention.
  • An index of rescaled indicators. Each indicator is rescaled between fixed bounds and the goals are averaged with equal weights. A different choice of bounds or weights gives a different index, and a unit near a bound has little room to move. The index says nothing about which of its 81 indicators moved in a given municipality: go to the goal datasets for that.
  • Units. Four of the 343 units were created after the 2012 census; the Atlas gives them values in both periods. Means across municipalities count a municipality of 900 people like one of 1.6 million.
  • No causes. Nothing here identifies why a municipality gained or lost. Convergence, clusters and the urbanization coefficient describe patterns in the data.

In short

  • One indicator, six questions, and one or two functions for each: describe, change, map and trend for the change; combine for the goals; beta_convergence, inequality and theil_decomposition for convergence; moran, lisa and lisa_transitions for space; rank_mobility for the ranking; spatial_diagnostics and spatial_model for a model.
  • Every function took the same table, ids, and returned its figure, its table and its numbers.
  • The findings are descriptions of two periods. The limits are part of the result.

Where next