Social Networking and SAS: Running PROCs on Your Facebook Friends
Social networking sites such as Facebook, LinkedIn, and Twitter offer tremendous opportunity for people to share information with each other. This information is simply data, organized in a friendly form for your use on the Web. It’s also great raw material for interesting analysis in SAS – if you can get it there. This paper describes how to use SAS and SAS Enterprise Guide to extract data from social network sites using published APIs, with Facebook and Twitter as examples, and then perform basic analysis on the results.
Determining the Age of Your Friends
One of the more popular social interactions on Facebook is the "birthday message." While most Facebook users share some of their birthday information with friends, many choose to not share their birth year. The data collected by our example application includes birthday information, if available. For those friends that share their birth year, we can calculate their current ages and summarize these, as shown in the following report:
As you can tell by the "N Miss" field in the report, most of these Facebook users do not share detailed birthday information – only 99 out of 326, in this case.
However, because Facebook is often used by people who want to connect or reconnect with classmates from high school or college, many more Facebook users do share their education history. The education history includes the name of the schools that a person attended, and the graduation year. By collecting this education history, and then making an assumption about the likely age that a person would have graduated from high school or college, we can estimate the age of each friend, and summarize accordingly. The next result shows a new report that takes education history into account:
The "N Obs" field shows how many observations contained non-missing values for the calculated ages. As you can see, by inferring an estimated age by using education history, we can consider more records of data. However, it's also possible to calculate the wrong age for a person who didn't follow the typical pattern of graduating high school at age 18, or college at age 22.
Follow this link to read the entire paper:
Social Networking and SAS: Running PROCs on Your Facebook Friends.
View the pdf for Social Networking and SAS: Running PROCs on Your Facebook Friends.
Download the example Facebook application. It connects to your Facebook profile and turns your Friends into a SAS program! You can run it within SAS Enterprise Guide 4.2 or 4.3, or as a standalone program. (It's a ZIP file, about 320K; see the README.txt in the archive for instructions.)
See the Twitter SAS program example that is described in the paper.
Visit Chris Hemedinger's user page.
Visit Susan Slaughter's user page.