Hacker News new | past | comments | ask | show | jobs | submit login
Visualizing Facebook Friends: Eye Candy in R (paulbutler.org)
47 points by sonabinu on Feb 12, 2013 | hide | past | favorite | 9 comments



This picture is one of the biggest inspirations for learning R. For some interesting resource to get started, take a look at http://datagrad.blogspot.com/2013/02/some-learning-resources...


Here's his full-size, zoomable visualization: http://fbmap.bitaesthetics.com/


Nice little aside, that he doesn't mention in the article: he was an intern when he made this. Great work.


Data visualization experts: is R a good language to learn for doing visualizations or would something like Processing or javascript and D3 be a better choice?

The article makes it clear that you can do nice visualizations in R, but not if it's the best option for someone getting started.


It depends.

For statistical graphics, it is hard to beat R simply because it has all of the statistical functionality built right in. Want an ACF plot for your ARMA model? No problem. To do this in D3 requires a lot more code. R also has the great package ggplot2, which is simply brilliant for constructing plots.

Where D3 shines is the ability to add interactivity and animation to its plots. R simply has no concept of this as it is only really capable of static graphics.

If you know neither system, I would probably suggest D3 because you're going to have to learn a graphics system anyway. With D3 at least you have the ability to construct more than just static graphics. Also, it's all JS so most people are going to find it easier to learn than R.


I would really recommend Mathematica if you can afford it ($300 for the home edition).

I think the cost is the only reason Mathematica isn't the most commonly used data analysis software.

http://www.wolfram.com/mathematica/features/graphics-and-vis...


Did he ever release the commands he used to generate the plot?


I wasn't able to release the original code as it belonged to Facebook, but Nathan Yao wrote a great blog post covering how to do make a similar map (including code): http://flowingdata.com/2011/05/11/how-to-map-connections-wit...

To be honest, 80% of the code was getting the data into the right shape and the other 20% was a slow implementation of the great circle calculations (I didn't know about the geosphere package so I rolled my own). Nathan's code is better.


Tufte would be proud, beautiful work!




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: