Friday, July 27, 2012

Facebook Friends (in a graph)

I saw this post on FlowingData and thought, "Hey, I can do that, let's give this Gephi thing a go."

I don't have that many Facebook friends, as I try to keep my network well maintained, and I'm also not a heavy user of the service. Also I've always kind of wondered - if you are one of those people who has 2000 Facebook friends, are they really all your 'friends'? If I put you (you silly teenage girl) in a room with those 2000 people, would you be able to call all of them by name? Remember where you met them? What their favorite color is? I digress.

The steps to producing the graph are simple:
1. Install the netvizz Facebook application
2. Run it
3. Import gdf file into Gephi
4. Wow! A graph!

As I said, I don't have that many Facebook friends but I still found the results pretty interesting:



Red is immediate family, green my Mom's side and blue my Dad's. The orange are university friends, and purple High School. Yellow are randoms and friends of friends. Teal is friends of my Mom's relatives, and pink friends of one of the immediate family. Light blue is a group of friends made while travelling.

The nodes are sized by degree.

Interesting point to note:
High school friend (purple, outlying from others) and friend of immediate family (pink, bottom right node) are both connected to friend of Mom's family (teal node, bottom) through events totally unrelated to the rest of the network. Small world.

This is that case when you add a new friend on Facebook and it says you already have a mutual friend, and you stop and think, 'Wait, we do? Sarah knows Thomas? But how did.... through who... when did.....? Huh.'

Wednesday, July 18, 2012

50 Shades of Grey Wordcloud

Sometimes you just want to see what all the fuss is about. File this under the 'because I can' category: I proudly (?) present - a wordcloud produced from the text of E. L. James' "50 Shades of Grey".

For a book which is getting all this press about being full of explicit sexuality, the data are not what you expect. Obviously the main characters' names feature prominently, but if you ask me this visualization shows that this is another romance novel much like any other.

Sure, you probably wouldn't expect to see the words 'dominant' (left, next to grey) and 'submissive' (right, next to don't) in some other books of this type. But look at some of the other words which are largest besides the names of the main characters - eyes, head, hands, hair, voice, smile. Obviously, it's not just about the sex.

Produced in R using the excellent tm and wordcloud packages.