Live data from Hacker News

A book to learn R and Python in parallel for Data Science

github.com

31–40 of 90 posts

Re: A book to learn R and Python in parallel for Data Science

#32
R has a nice web development framework called Shiny. While it is not comparable to say Django or Flask, Shiny does make it incredibly easy to share data analysis. If one wants to share statistical analysis or create a data oriented dashboard, then there is definitely a reason to consider R and Shiny. Note that Python has Dash, which is comparable to Shiny, but it is less mature as far as I know.

While previously Shiny was primarily deployed through RStudio's solutions, there are now open source initiatives such as ShinyProxy, introducing Kubernetes as an option for deploying Shiny applications. The latest iterations of Shiny related libraries are facilitating automated testing and deployment. These developments allow companies to use Shiny in production, but it has to be said that the R ecosystem is not as developed as Python's from a traditional software development perspective.

Re: A book to learn R and Python in parallel for Data Science

#33

Earlier quoted context omitted.

I don't think there's any reason to learn R for anyone who is already proficient at programming. Despite being proficient with R, the only times I used it in the last two years were for ggplot. And even for data vis, I'm increasingly using Python and JS. There's a bunch of comments below which can be summed up with 'use R because doesn't have a direct python equivalent' but they're all missing the point that the Pyth…

> There's a bunch of comments below which can be summed up with 'use R because doesn't have a direct python equivalent' but they're all missing the point that the Python data science ecosystem is evolving at a much faster pace than R and will completely supersede it in a few years. The point is R is a very good language for statistic because of the packages not data science. Data science can do their own thing it's o…

Everything you said sums up with 'R is a very good language for statistic because of the packages' which is pretty much in agreement with the GP comment.

R has nothing going for it except a rapidly dwindling number of packages that don't yet have a direct python equivalent. It doesn't make sense to invest time into R if one already knows python unless one specifically focusing on academia pure stats type stuff.

Even then, the incoming generation of undergrads are increasingly proficient with programming and are shying away from R the same way that they shied away from Matlab after scipy matched it for 95% of their tasks.

Re: A book to learn R and Python in parallel for Data Science

#34
post #23

Earlier quoted context omitted.

I use both Python and R. tidyverse/ggplot2 alone are enough reason to use R, and are substantially faster for tasks that utilize those packages than the equivalent in Python (in my opinion). Although I haven't had as much reason to use base R. For more ML-related tasks I do go back to Python.

This. I’ve contributed code to popular libraries in both languages, and while I (overall) have a preference for python (mostly due to it being general purpose), I find R code unparalleled when it comes to raw data manipulation/analysis. The overall api of tidyverse packages is such a joy, and recent improvements in purrr/tidyr allow me to construct nested data analysis workflows I couldn’t even dream of in python.

One random example I found recently is a tidyverse package called forcats that has lots of nice functions for categorical data. For example, it has a single function that merges all categories with a frequency of less than a certain threshold in the table into a new category like "other" or whatever. This is a task I often need to do, but as far as I can see it's a bit of a hack in python or pandas. It's just lots of little things like this, especially wrangling data tables.

https://forcats.tidyverse.org/reference/fct_lump.html

There's also the data.table package for this kind of data work, which is maybe less used but seems to have better performance.

Re: A book to learn R and Python in parallel for Data Science

#35
post #32

R has a nice web development framework called Shiny. While it is not comparable to say Django or Flask, Shiny does make it incredibly easy to share data analysis. If one wants to share statistical analysis or create a data oriented dashboard, then there is definitely a reason to consider R and Shiny. Note that Python has Dash, which is comparable to Shiny, but it is less mature as far as I know. While previously Shin…

I learned some R just so I could try out Shiny earlier -- Shiny is pretty awesome!

By Dash for Python, you mean the one from Plotly? https://plot.ly/products/dash/

Thank you for sharing ShinyProxy!

Re: A book to learn R and Python in parallel for Data Science

#36

I sometimes wonder is there any reason to learn R at all, since python eco system has absorbed most of its advanced statistical functionality, coupled with the factor that python environment is much more general, with capabilities to fetch, decode/encoded data,work with binary data databases, web frameworks for presenting etc.

Not really in my experience. Really, the only place where I'd say Python has gotten more support so far than R is in deep learning. If you want any just-published statistical method, the associated implementation will almost inevitably be in R. But that's today -- I'm old enough to remember when the standard language in "The Journal of Statistical Software" was XLISP-STAT (much of the 1990s).

Re: A book to learn R and Python in parallel for Data Science

#37
post #35
post #32

R has a nice web development framework called Shiny. While it is not comparable to say Django or Flask, Shiny does make it incredibly easy to share data analysis. If one wants to share statistical analysis or create a data oriented dashboard, then there is definitely a reason to consider R and Shiny. Note that Python has Dash, which is comparable to Shiny, but it is less mature as far as I know. While previously Shin…

I learned some R just so I could try out Shiny earlier -- Shiny is pretty awesome! By Dash for Python, you mean the one from Plotly? https://plot.ly/products/dash/ Thank you for sharing ShinyProxy !

Indeed, the one from Plotly! I gave Dash a quick shot about a year ago, it worked quite well to generate interactive reports.

ShinyProxy is amazing. It is pretty easy to setup, but does require quite some specialized knowledge compared to the RStudio solutions.

Re: A book to learn R and Python in parallel for Data Science

#38
post #26

I sometimes wonder is there any reason to learn R at all, since python eco system has absorbed most of its advanced statistical functionality, coupled with the factor that python environment is much more general, with capabilities to fetch, decode/encoded data,work with binary data databases, web frameworks for presenting etc.

I use both python and R almost every day. Although I like R and often use R to quickly order tabulated data, there are a few things to take into account that in recent times are building a strong case for me not to use R habitually. Development in R is frustrating. If you don't need to do dev, then on this point you are home free. Testing things that you deploy in R is not simple. Scripting in R can be frustrating. I…

Interesting, why do you advise people to stay away from Shiny?

Re: A book to learn R and Python in parallel for Data Science

#39
post #35
post #32

R has a nice web development framework called Shiny. While it is not comparable to say Django or Flask, Shiny does make it incredibly easy to share data analysis. If one wants to share statistical analysis or create a data oriented dashboard, then there is definitely a reason to consider R and Shiny. Note that Python has Dash, which is comparable to Shiny, but it is less mature as far as I know. While previously Shin…

I learned some R just so I could try out Shiny earlier -- Shiny is pretty awesome! By Dash for Python, you mean the one from Plotly? https://plot.ly/products/dash/ Thank you for sharing ShinyProxy !

This is one of the most fun comments I have read in a while: learn a bit of a language to check out the web dev framework behind it.

Awesome!

Re: A book to learn R and Python in parallel for Data Science

#40
post #29
post #5

Earlier quoted context omitted.

Also interesting to learn two languages, in parallel, where neither is particularly good at parallelism :)

What makes you think R or Python are bad at parallelism? My experience is that both are very decent.

Both have packages that can manage subprocesses. Both have inherently single threaded interpreters.
Post reply on HN