Ask Slashdot: Switching From SAS To Python Or R For Data Analysis and Modeling?
An anonymous reader writes "I work for a huge company. We use SAS all the time for everything, which is great if you have a bunch of non-programmer employees and you want them to do data analysis and build models... but it ends up stifling any real innovation, and I worry we will get left behind. Python and R both seem to be emerging stars in the data science game, so I would like to steer us towards one of them. What compelling arguments can you give that would help an old company change its standard if that company is pretty set in its ways?"
Python and R are sort-of converging via Pandas. I'm partial to Python, but Pandas really starts to blur the lines conceptually.
W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
It's unlikely that SAS is the root cause of a lack of innovation, so it's unlikely that introducing a new tools by itself will make a difference. The fact that you work for a 'huge company' is more likely the problem. Does senior management agree that innovation is a priority? Are they willing to make the changes to encourage it (which usually means breaking down fiefdoms, giving up power, and lots of things that senior managers hate doing)? The choice of language is kinda irrelevant absent the right environment.
The cost of training them to use R will be signifantly cheaper than what you are spending on the SAS licenses, which (last I knew) was a yearly purchase for each user.
And yes, while I have not used R myself, I would certainly recommend it over Python for this use case as it is very dedicated to doing the kinds of things that SAS is good at in a very efficient, friendly manner. I've seen a number of people use it to do some very neat statistical analysis, and their stuff was a lot simpler than the SAS scripts that I use to write years back.
Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
Is it your feeling that SAS is "stifling any real innovation" or do you have examples of projects that are impossible with SAS but possible with Python or R?
Do those example projects actually help the bottom line of the company or are they just "cooler"?
If you can think of examples that have clear financial benefits to the company, you have a solid business case already.
If there are no such examples or other factors negate the benefits, then the company has nothing to gain by switching and should not switch.
Short answer; if you're asking on Slashdot for reasons to switch from product X to product Y, you probably have no real reason to switch.
Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
Emerging? They were emerging a decade ago. They have emerged. Look, if the company is, as you say, "set in its ways", that is a cultural problem. Unless you are an executive that gets to set goals and compensation, you have very little influence over it. If that is not you, either stay and live with what you have, or leave for greener pastures. The basic question you have to ask yourself is "how will staying here using these outdated tools affect my lifetime earnings potential?" Put another way: "are they paying me enough to put up with this shit?" That is my prime criteria for deciding whether to stay at any job. Your job is to make recommendations. I assume you have already done that and been shot down. Decision time: should I stay or should I go.
the growth in cynicism and rebellion has not been without cause
SAS is not a language; it's a full multi-tiered solution for the aggregation, normalization, and analysis of data. There's a language as well, but that's just one part of the whole solution. Python and R, while absolutely fantastic languages, are not a full solution.
So, first step...if you're going to offer an alternative, actually have an alternative. I don't know your SAS buildout nor do I know the data sources it consumes, so I can't really point to what else you need to add or how you need to construct it to produce a more flexible replacement to your existing and current SAS infrastructure.
Second step...a roadmap for migration. It's one thing to sign a lease for a new apartment or to buy a new house, and another to shift your life from the old place to the new. If you don't have a plan, at least in broad strokes, then you're going to be doomed when you look for executive sponsorship. You need to make sure that you get all the stakeholders' input as well, lest you leave something out in your roadmap...and then end up with someone who sees you as a problem. That person will most likely be in a position to scuttle the whole thing, as well.
Third step...figure out how to define the benefits in terms of the stakeholders' needs. You're going to replace a system they use; why should they want you to do so? And you have to define it from their perspective, with regard to things they care about. Beware of getting geeky on this...it's very likely that at least one of the people whose support you will need will not be a geek and will be concerned with the output more than the technical means used to produce it. Don't hard-sell, either...pushing too hard will get the door slammed in your face, and even potentially polarize people against you. (See above, under "in a position to scuttle the whole thing.")
There will be steps after that, but those will be largely determined by how the first three steps go. It may involve bringing in outside vendors, doing requirements analysis...a lot of it depends on details of your company as well and how they normally do things. But above all else, remember this: don't buck the system too hard, and don't knock the company you work for. Trying to get a lot of people to support and cooperate with you while telling them that their way of doing things sucks is suicide.
For your security, this post has been encrypted with ROT-13, twice.
Personally at least.
I used to work in one of the largest banks in the world, and everything we did was SAS/MSSQL.
I had some personal stuff in R, but most of the other analysts didn't seem too interested except using what I made for them except for one phd in the German department. I never pushed it though since there was so much legacy code, including code I had written my self.
Now I have switched to a start-up bank, and I am the only analyst.
I've used R/RStudio/Shiny with PostgreSQL in the back very successfully, with all code in git. Now I can bring good analysis forth much faster than I used to in SAS that can be viewed on any device with the option of downloading the source data in excel and csv.
The management loves this.
If you show them a few good ones they will want more, but I wouldn't start to rewrite all the legacy code. SAS isn't bad when you have it set up properly.
But another good thing about R is that you get access to innovation in the statistics fields faster, and you don't have to pay huge sums of money for extra features.
RStudio and Shiny is a bit expensive for the pro versions, but nothing compared to SAS, and the open source versions are free.
R is definitely still ahead for data modeling, but Python has some advantages too. With a bigger set of modules (libraries) to choose from and high popularity in the financial sector, there are big improvements all the time. For the purposes of this discussion, the most important Python modules are:
IPython: powerful interactive shell
numpy and scipy: numerical, matrix, and scientific functions (matlab-ish)
pandas: R-like data structures and data analysis tools (analysis mostly limited to regression)
statsmodels: statistical analysis, complements pandas
sk-learn: machine learning
So can Python do everything that R can? No. Or, at least, not as easily. But it is improving in that direction quite quickly, and if Python's data analysis capability meets your needs, then you can likely do everything in one language instead of calling R routines from another.
W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
Granted, I don't have much experience with R, but Python has some notable benefits - it is very well established and you can find tools to do just about anything. It is fast and easy to develop, and very easy to learn thanks to the readability and plentiful resources online. I imagine you'll have an easy time finding people with python experience, as well.
I haven't used it for any "big data" tasks, but for a number of small, interactive data analysis utilities it has been really enjoyable to work with. One standout tool for me has been pyqtgraph, which is lightning fast and creates some really impressive interactive visualizations. It's also got some pretty incredible features out of the box - arbitrary user-definable ROIs, instantly change any plot to a log-log, or even do a Fast Fourier transform with just a right click. If I sound like a fanboi, I kind of am - after trying to deal with the agony of 3D data manipulation in matplotlib (python's matlab package), it's a whole different world.
R has more single function high level commands devoted to stats, these are done right internally and are self consistent with other functions for further processing. But its not as general a programming language as python. if you want something different than the canned functions in R then you will need to write them yourself at which point you might as well be using python. however if you like SAS then chances are R will seem more like what you are hoping for.
Some drink at the fountain of knowledge. Others just gargle.
So can Python do everything that R can?
No, but Rpy can.
I've used R, and it really has a lot of strong points, but I prefer to access it these days via Rpy, which gives me all the power of R along with everything else I get from Python (other libraries, better application development frameworks, etc.)
Both R and Python are real programming languages that are going to be completely useless to non-programmers, so neither of them is a SAS replacement, but of the two, I'd choose Python+Rpy over R for flexibility, power and ease of use (the latter is of course a strongly personal preference... if you really think like a traditional stats geek R will likely seem nicer, as it is clearly created for and by such people.)
Blasphemy is a human right. Blasphemophobia kills.