views:

369

answers:

2
+1  Q: 

SAS and Web Data

I have been taking a few graduate classes with a professor I like alot and she raves about SAS all of the time. I "grew up" learning stats using SPSS, and with their recent decisions to integrate their stats engine with R and Python, I find it difficult to muster up the desire to learn anything else. I am not that strong in Python, but I can get by with most tasks that I want to accomplish.

Admittedly, I do see the upside to SAS, but I have learned to do some pretty cool things combining SPSS and Python, like grabbing data from the web and analyzing it real-time. Plus, I really like that I can use the GUI to generate the base for my code before I add my final modifications. In SAS, it looks like I would have to program everything by hand (ignoring Enterprise Guide).

My question is this. Can you grab data from the web and parse it into SAS datasets? This is a deal-breaker for me. What about interfacing with API's like Google Analytics, Twitter, etc? Are there external IDE's that you can use to write and execute SAS programs?

Any help will be greatly appreciated.

Brock

+4  A: 

yes. sas 9.2 can interact with soap and restful apis. i haven't had much success with twitter. i have had some success with google spreadsheets (in sas 9.1.3) and i've seen code to pull google analytics (in sas 9.2).

as with python and r, you can write the code in any text editor, but you'll need to have sas to actually execute it. lately, i've been bouncing between eclipse, pspad, and sas's enhanced editor for writing code, but i always have to submit in sas.

rkoopmann
proc soap and proc http are the two SAS proc (short for procedures) that you use to interact with SOAP and restful api's, respectively. 9.2 M2 has improvements to the proc http engine which allow it to work with twitter more easily.
Zach
Many editors allow you to submit to SAS directly so you never have to leave the editor if you don't want.
cmjohns
I have been using Eclipse to interface with Python and SPSS, so that is great news that I can use it for SAS as well. Are PROC SOAP and HTTP part of Base SAS? Thanks for the help!
Btibert3
proc soap and proc http are part of base SAS as of SAS 9.2, but I would highly recommend you get 9.2 m2 if you plan to use proc http.
Zach
I am limited to what my school has, but what is m2? Thanks again.
Btibert3
@Btibert3 - you can read more about the maintenance releases for 9.2 here: http://support.sas.com/software/maintenance/index.html
cmjohns
+4  A: 

Incidentally, SAS is now offering integration with R. http://support.sas.com/rnd/app/studio/Rinterface2.html

There are all sorts of ways to get data off the web. One example is to use the url access methods on filename statements to pull in xml data off the web. For example:

filename cmap "yldmap.map"; /* an xml map I created to parse the data */
filename curyld
      url "http://www.ustreas.gov/offices/domestic-finance/debt-management/interest-rate/yield.xml";

libname curyld xml xmlmap=cmap;
cmjohns
@cmjohns- wow, I had no idea about the integration with R-- thank you!
Louisa Grey