PCA: interactive
PLS 206 — Applied Multivariate Modeling
This explorer runs in your browser with no R and no download, so it works on a phone too. The data are 40 sites from cassava.csv, with both variables standardized (mean 0, SD 1), as prcomp(..., scale. = TRUE) does.
Spin the axis
Each dot is a site. The orange line is a candidate axis, and each dot drops a shadow onto it (the orange points). PCA picks the line where the shadows spread out the most: that line is PC1. PC2 sits at 90° to it and picks up the rest, so PC1% + PC2% = 100%. “Rotate the axes” turns the whole cloud until PC1 is flat, which is the scores plot: the dots move together, so the distances between them do not change.
Or drag the line in the plot.
% of the total variance captured by the line, for every angle. The peak is PC1.