Question: What do you get when you cross your Facebook friends with SAS analytics?
Answer: Insight, probably more about yourself than anything else. You can tell a lot about yourself by looking at your friends. And I'll bet that so can Facebook and those who advertise on it.
Data from social media sites is ripe for analysis, and Facebook data is more structured than most. I've developed an application that turns your Facebook friends data into a SAS program so that you can run reports and analytics on them. Some reports are easy to understand, such as the above chart that buckets my friends into "life stages" based on graduation years. Or you can leverage the heavy duty analytics, such as this correspondence analysis from PROC CORRESP (hover your mouse over the image for a more technical explanation).
I developed the application as an example task for SAS Enterprise Guide 4.2 for a book that I'm working on. I'm a ways away from being done with the book, but we are so keen on Twitter, Facebook, and social media in general right now that I decided to share it early.
If you aren't using SAS Enterprise Guide 4.2, you're not completely out of luck. You can also run the application on its own to create the program, and then run the program in SAS 9.2 however you want. The program produces:
- A SAS data set with your Facebook friends data, one record for each friend
- PROC REPORT output with the current status information from your friends
- The plots shown above, for years since graduation and correspondence analysis
- More data sets containing your friends favorite books and movies, produced with brute force DATA step scraping.
You can download the task/program from here. Instructions for deployment and use are in the README.txt file in the ZIP archive. Note: you'll need Microsoft .NET 3.5, a Facebook account (of course), and you'll need to allow my registered application ("ImportToSAS") to access your account information. Don't worry; none of your Facebook information is gathered/stored anywhere except for in the resulting program file.
Manifest of technologies includes: Facebook Toolkit for .NET (to connect to Facebook and gather data), XML Libname engine along with XML Mapper (to get the "friends" data into data sets), the SGPLOT procedure (to produce bar charts), ODS tagsets.htmlpanel (to control report layout for side-by-side charts), ODS Graphics in SAS/STAT (for correspondence plot), and custom task APIs for running within SAS Enterprise Guide.