Clusters of municipal water profiles

Clusters group municipality x zone x year rows (2016-2023) by profile features only (IRCA, coverage, rurality, altitude, rainfall, poverty, fiscal and performance indices). IRCA is utility-supplied (“prestadores”) IRCA from INS open data. Outcomes were not used.

Line chart of k-means inertia against the number of clusters k from 2 to 8, falling steeply at first and flattening after four clusters.
Figure 1: Elbow plot: k-means inertia for k = 2 to 8. The curve flattens after k = 4.
Line chart of the mean silhouette score against k from 2 to 8; k = 2 is highest and the other values lie close together between 0.17 and 0.20.
Figure 2: Mean silhouette score by k. Higher means better-separated clusters; all values are modest (below 0.25).
Scatter plot of pc1 against pc2 for all rows, coloured by cluster number, showing four overlapping but distinguishable groups.
Figure 3: First two principal components of the standardised profile features, coloured by cluster. Descriptive grouping only.

What sets each cluster apart?

Cells are each cluster’s mean z-score (standardised within year) per profile feature. Blue is below the yearly average and red above. Descriptive only.

Heatmap with the nine profile features as rows and the four named clusters as columns; colours run from blue (below the yearly average) to red (above).
Figure 4: Cluster mean z-scores (within year) of the nine profile features; blue below average, red above.

Outcomes by cluster (descriptive, not used for clustering)

Median per cluster and year; gaps are years the source does not cover (not joined). Infant mortality changes method in 2017 and Saber 11 has no 2018 or 2021 data.

Three line charts, one per outcome, with a line per cluster over 2016 to 2023; lines have gaps in years with missing data.
Figure 5: Median infant mortality, Saber 11 mean score and school dropout by cluster and year. Lines break in years without data. Association only; no causal claim.

Worse water, more infant deaths? A within-cluster check

Median infant mortality (deaths per 1,000 live births) by IRCA band (utility-supplied, INS open data) within each cluster, with Spearman rho between IRCA and infant mortality and the number of rows n behind it. Only rows with an infant-mortality value count.

Median infant mortality by IRCA band:
Rows (n) behind each cell:
Table 1: Spearman rho (IRCA vs infant mortality) and n by cluster, and median infant mortality by IRCA band.
spearman_rho n municipalities
cluster
Cities and large towns, no-risk water -0.04 1035 270
Highland towns, no-risk water 0.10 1355 475
Lowland towns, low-risk water 0.05 1482 425
Rural, low-coverage, high-risk water 0.01 1290 570
Cities and large towns, no-risk water Highland towns, no-risk water Lowland towns, low-risk water Rural, low-coverage, high-risk water
irca_band
No risk 9.3 15.0 12.4 13.1
Low 8.8 16.0 13.1 13.7
Medium 9.4 17.2 13.2 12.0
High 8.3 15.9 12.9 13.6
Unfit NaN 16.1 15.5 13.2
Cities and large towns, no-risk water Highland towns, no-risk water Lowland towns, low-risk water Rural, low-coverage, high-risk water
irca_band
No risk 708.0 801.0 589.0 254.0
Low 205.0 314.0 269.0 156.0
Medium 106.0 190.0 330.0 197.0
High 16.0 45.0 256.0 530.0
Unfit NaN 5.0 38.0 153.0

This is descriptive and does not establish a causal effect of water safety on infant mortality. Within clusters the correlations are weak, and confounders (poverty, health services, altitude, rurality, the 2017 change in how infant mortality is measured) are not controlled for.