4 ms·
Has anybody switched from R (tidyverse and ggplot2) to python and found they can be equally or more productive in tabular data wrangling, data exploration and v
by j7ake 4y ago
Has anybody switched from R (tidyverse and ggplot2) to python and found they can be equally or more productive in tabular data wrangling, data exploration and visualisations?
Still using R because I find python cannot do exploratory data analysis of visualisation as well as R.
- disgruntledphd2 4y agoFor data manipulation, R/dplyr is still much, much superior. However, there's a ggplot clone called plotnine in Python which seems to be reasonably comprehensive.
- epgui 4y agoWhat R has going for it is ggplot2, which is heavily inspired by a formally validated "Grammar of Graphics" (see the L Wilkinson book). One of the main reasons why the tidyverse works so well is because it tends to follow the organizing principle of "tidy data" (see the H Wickham paper) with some combinator interoperability between packages. R itself is pretty insane ("bad") in terms of language design, even though it has some neat tricks and features. Python is a much saner language than R (I am not talking of packages here), but it's still super clunky by design (less so than R). It can most certainly do all the things that R does, although its plotting libraries are either lacking in their design (matplotlib) or maturity (the other GoG-inspired libraries). When you continue on your journey to learn more languages, at some point you realize that when you have a well-designed, simple and consistent language, you really don't need very many packages to get the job done fast. I had this a-ha moment with Clojure (although I find working with the JVM annoying).
- otabdeveloper4 4y ago> Python is a much saner language than R That's like saying that cat turds smell much better than dog turds. Maybe it's technically true, but let's not split hairs here.
- epgui 4y agoHaha I wouldn’t say it like that, but I’m pretty sure we feel the same way deep down. Regardless of how true your comment might be, this can seem a bit hostile or condescending to people who don’t have a “cleaner” reference point for language design. Or, in the “fog of war” of competing alternatives, it may even appear unreasonable to experienced programmers: we’re so used to thinking that everything is a tradeoff that over time we can forget that some things really can be “just better” than other things. Most of the time when we hear such claims, it comes from a place of subjective preference or over-generalization, so our brains pattern match strongly against that. And at the end of the day, as a practical matter, the best camera is the one you carry with you, and the best tool is the one you can use.
- bart_spoon 4y agoNo, I’m in the same boat. If I’m only interested in data wrangling, visualization, or analysis, R blows Python out of the water. With all the time and effort that have gone into Python data libraries, it is basically on par with base R. With close to a decade of tidyverse development, it really isn’t even close. But the second I’m doing anything outside of those specific tasks above, Python outclasses R to an equal degree.
- dongobread 4y agoI have used much more Python than R in my career and I still find I'm able to do most analytics work about 2x faster in dplyr/tidyverse + data.table than in the pandas ecosystem. Polars is better but still not comparable to dplyr.