PCA explorer

Dataviz logo representing a ScatterPlot chart.

Principal Component Analysis squeezes a table with many numeric columns into a couple of dimensions you can actually look at. In the R world, the reference tool for this is Factoshiny, the Shiny interface of the FactoMineR package.

This post is an attempt to rebuild that experience with React and d3.js only. Pick a dataset, toggle variables, and read the 2 factor maps. No R session, no server, everything runs in your browser.

Useful links
Dataset
50 individuals · 4 active variables
Active variables
Display
Axes
Individuals factor map
Individuals close to each other are alike
-2020Dim 1 (62.0%)Dim 2 (24.7%)
Variables factor map
Arrows close together are correlated variables
MurderAssaultUrbanPopRapeDim 1 (62.0%)Dim 2 (24.7%)
Scree plot
How much information each dimension carries
62.0124.728.934.34% of variancecumulated %Dimension (click a bar to plot it)
Eigenvalues
Dimeigenvalue% varcumul. %
12.48062.062.0
20.99024.786.8
30.3578.995.7
40.1734.3100.0
Variable contributions (%)
UrbanPop
Murder
Assault
Rape
■ Dim 1 ■ Dim 2

Correlation

Contact

👋 Hey, I'm Yan and I'm currently working on this project!

Feedback is welcome ❤️. You can fill an issue on Github, drop me a message on LinkedIn, or even send me an email pasting yan.holtz.data with gmail.com. You can also subscribe to the newsletter to know when I publish more content!