3D Scatterplot in R

2 Comments

Today, I was doing some analysis of a sub-group of our constituents and was trying to get an idea of how connected these folks felt to our school.

I thought I’d do that by running a summary of their lifetime giving, event attendance and number of development officer contacts:

That shows me the 5-number breakdown for each column. Obviously, I’ve got some serious outliers in there, somebody’s who’s attended over 200 events!

But I can’t tell if the person w/ 200+ events is the same person who’s given a ton of money or not, so I tried running some scatterplots comparing the numbers:

lifetime giving vs event attendance

That’s not awful, but I have to run a bunch of these to compare all three variables–if I could run a legitimately 3D scatterplot in R, I’d be able to see all three variables at once.

Turns out, it’s REALLY easy.

3D scatterplot

click to zoom, rotate and pan
(embedding a live htmlwidget in WordPress made me crazy)

That gives you a really cool, pannable 3D scatterplot so you can see how each person compares on all three variables at once.

To tell the truth, it’s a bit gimmicky (and what do you do when you’ve got more than three variables? you’re back in the same boat). Still, it’s just so cool and fun that I had to share!