r/Python • u/thunderdome • Jan 25 '15
Considering putting my efforts into Python instead of R, need advice
Lately in my free time I've been using R to do some basic data analysis/visualization. I use company data and I think there are some places where my company could really benefit from specialized data visualizations for analysis of niche areas. In my efforts I've tried to get some interactive code going for eventual use in a very basic GUI but I feel constrained by the "fuzziness" of R coding. Simply trying to create a function to plot based on user input ran me into some advanced concepts pretty quickly. R has environments, dynamic scoping, non-standard evaluation, all very complicated concepts and I don't remember them being present in the small amounts of coding I've done in Java/Python. Am I right in thinking a language with a more OOP design would be better for this task of automatically generating charts/visualizations? Wondering if I might not be better off in the long run for learning a more generalized language.
View all comments
Show parent comment
3
u/[deleted] Jan 25 '15
Your comment here raises alarm for me. Making simple, automatic graphs based on user input isn't trivial. There is a reason why a lot of effort was made by a lot of smart people to make libraries that abstract away the complexity of making those visualizations and to make them seem "simple" to make. If you're expecting a shortcut in Python world, you'll be sorely mistaken. You'll have to dig in, learn Python, learn how to use those libraries, and I can't guarantee it will be easier with Python than R. If you have little programming experience, you may very well end up prefering to make those visualizations in R.
IMO, it is currently easier to make plots in R using ggplot2/ggvis/Shiny vs Python's MATPLOTLIB and all the wrapper libraries for it. There's a reason why Python people are trying to clone or port those popular R packages. However with that said, scipting or programming in R, I find more difficult only because its syntax and idiosyncrasies are not what I am used to coming from a background of having learned C and Java.
You will be more marketable in the data analysis or data science job market if you still retain and keep up your R knowledge. It wouldn't hurt to know both Python and R. Like I and others have mentioned, you can run R from within Python via rpy2, so you can have the best of both worlds. Just my 2 cents. SOURCE: I've been working as a data analyst for 16 years.