twoHelixestwoHelixes Start free

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.

Question which variable correlates most with progression?
Correlation with disease progression00.20.40.6bmis5bps4s3s6s1ages2sexCorrelation
Diabetes progression — 10 rows charted from 442, drawn as a hbar
How it decided
Finding the data87 ms

Diabetes progression: 442 rows, 11 columns. all ten baseline variables against progression.

Shaping the data4 ms

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.

Choosing the chart4 ms

hbar. A ranking across ten items: horizontal bars, strongest first.

Applying defaults1 ms

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.

variablecorrelation
bmi0.5865
s50.5659
bp0.4415
s40.4305
s30.3948
s60.3825
s10.212
age0.1879