BookmarkSubscribeRSS Feed
ldenney
Obsidian | Level 7

I'm trying out the Twitter analytics in SAS VA 7.3 and it appears when I access the twitter account, it only allows about a week's worth of data to be extracted. I don't see a place to put in a date range....any suggestions?

2 REPLIES 2
JuanS_OCS
Amethyst | Level 16

Hi @ldenney, good question,

 

According to the SAS VA User Guide (http://support.sas.com/documentation/cdl/en/vaug/68648/HTML/default/viewer.htm#n1w05z0ghdc44fn1f0swt...) SAS VA application has the restrictions that the Twitter API has.

 

Note: Rate limits apply to the Twitter service. Such limits are beyond the control of SAS Visual Analytics. You are required to follow all applicable terms of use that Twitter and others might promulgate for Twitter data.

Therefore, even if you do this by code you might find similar results.

 

On a try to help you, I found this great information and discussion, provided by @FalkoSchulzhttp://blogs.sas.com/content/sascom/2013/12/12/how-to-import-twitter-tweets-in-sas-data-step-using-o...

This provides the way to import the Twitter data by code.

 

In the discussion below, I could find the following, textually:

 

Hi Sander,

The maximum number of tweets forhttps://api.twitter.com/1.1/search/tweets.json is 100 (API details are here). This blog entry was just a basic example to explain the general concept behind the authentication required as well as dealing with JSON results in SAS.

In order to get more than hundred tweets you would need to understand working with timelines (there is a guide with details). As a short summary you would introduce either a max_id parameter which specifies the max tweet ID you want to recieve - in other words you will get tweets older than this ID (there is also a since_id parameter which would return tweets younger than the one specified). In the past I was simply calling this macro x number of times in order to get multiple pages (each hundred tweets). On each call I'm appending the newly recieved tweets to a common tweet data set. I believe Twitter keeps about a one week history - so there is a natural limit how far back you can go. Initially you may have to run it a number of times - but in dialy or hourly batch job you may just have to deal with a few hundred dependent on your search term.

Hope this helps. Cheers, Falko

 

I hope to be able to help you a bit there.

Best regards,

Juan

ldenney
Obsidian | Level 7
Hi Juan -

Thanks for your response. I will look into these suggestions.


Thanks for your help!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1502 views
  • 0 likes
  • 2 in conversation