%Gettweet: A New SAS Macro to Fetch and Summarize Tweets
The role of Twitter as a source of valuable information for spotting trends has been much talked about in the popular press. The open API in Twitter makes it one of the most sought after platforms for textual data analysis. While SAS® Text Miner provides a robust method for analyzing textual data, the challenge remains to fetch customized Tweets and clean textual data before any text mining. This paper develops and discusses a new SAS® macro that can be used easily to fetch the Tweets a researcher wants from Twitter. The macro uses the search API in Twitter and the HTTP procedure in SAS to create a data set of Tweets that are customized using parameters such as combination of keywords, exact phrases, omission of specific words, and so on. The macro also purges terms such as http tags and URLs that might create problems in text mining. This paper also shows a visual analysis of “retweets” to identify influencers via network visualization graphs that are available in SAS/GRAPH® software.
View the pdf for.
After SAS Global Forum 2011, I used the macro to collect tweets for the hash word #SASGF11 between 04-07 Apr. SAS Datasets of Tweets and the summary reports generated by the %gettweet macro on a daily basis can be accessed from File:SASGF11 Tweets.zip You can use the tweets in your analysis or use the macro to fetch tweets on any other topic using custom search terms.
You can also access the presentation used for this paper from File:324-2011.ppt
- Generation SAS blog: %GetTweet: A macro to collect and summarize tweets (1 Dec 2011).
- %GetTweet : A New SAS Macro to Fetch and Summarize Tweets - (Presentation - SAS Analytics Day) - Spears School of Business, Oklahoma State University.
Visit Satish Garla's user page.