Datasets / Diabetes progression
Baseline variables ranked by correlation with progression
Absolute correlation, so a strong negative relationship is not sorted to the bottom as though it were weak.
How it decided
Diabetes progression: 442 rows, 11 columns. all ten baseline variables against progression.
442 rows in, 10 out across 2 columns. Absolute correlation, so a strong negative relationship is not sorted to the bottom as though it were weak.
hbar. A ranking across ten items: horizontal bars, strongest first.
Palette, spacing, axis titles and legend placement applied. 0 issues found.
The transformation
This is the code, not a description of it — the chart above was drawn from what it returns, and the notebook download runs the same lines against the same file.
correlations = df.corr(numeric_only=True)["progression"].drop("progression")
result = (
correlations.abs().sort_values(ascending=False)
.rename("correlation").reset_index()
.rename(columns={"index": "variable"})
)
What it charted
10 rows out of 442, 2 columns. First 8 shown.
| variable | correlation |
|---|---|
| bmi | 0.5865 |
| s5 | 0.5659 |
| bp | 0.4415 |
| s4 | 0.4305 |
| s3 | 0.3948 |
| s6 | 0.3825 |
| s1 | 0.212 |
| age | 0.1879 |