Live data from Hacker News

Lets-plot: An interactive Python plotting library using ggplot's API

github.com

41–50 of 62 posts

Re: Lets-plot: An interactive Python plotting library using ggplot's API

#41
post #27

I've been using R professionally for 4 years. I've been a Python programmer for 6 years. I've shipped large scale applications built on both languages to production. Findings: I honestly don't get the hype around R's plotting capabilities. ggplot2 is nice, but far too magical to be easily understood by beginners. Python offers more intuitive memory management than R (which is really more a statement on how bad R is a…

Same and I have to disagree with basically everything you’ve said, save the DSL bit and the R package bit. In particular, I don’t see how the tidyverse is at all ‘magical’ - take the two most popular tidy libs, dplyr and ggplot2. The api for dplyr is very explicit, intuitive, and based on long-standing precedence (sql). The api for ggplot2 is admittedly less intuitive, but is itself an implementation of widely known…

The dplyr team is genuinely working hard to make the tabular data manipulation tool. IIRC versions 0.5, 0.7, and 1.0 all brought major enhancements. The basic structure has remained consistent but the advanced API keeps getting refactored, usually for the better I think.

(I know some people swear by data.table, but I find it gets ugly fast if you want to do anything more than simple joins or split-apply-combine)

Re: Lets-plot: An interactive Python plotting library using ggplot's API

#43
post #30

I've been using R professionally for 4 years. I've been a Python programmer for 6 years. I've shipped large scale applications built on both languages to production. Findings: I honestly don't get the hype around R's plotting capabilities. ggplot2 is nice, but far too magical to be easily understood by beginners. Python offers more intuitive memory management than R (which is really more a statement on how bad R is a…

> Needing to download a million random packages from grad students of the internet is a recipe for disaster. This is baloney. You don't need to rely on a million R packages. You really only need a good plotting library (the built-in one is fine, or use ggplot), a good data frame library (dplyr, data.table, or use build-in one), and a few extras to handle some weird rough edges (lubridate, forcats). This takes you to…

Indeed. `library(tidyverse)` and I’m set for like 70-80% of use cases for data manipulation, exploratory data analysis, and statistics.

Though to be complete, any ML project means python and scikit learn.

Re: Lets-plot: An interactive Python plotting library using ggplot's API

#44

Earlier quoted context omitted.

> Tidyverse in general, I believe, has saved R from irrelevance. It’s interesting that you say this. I’ve been using R daily for almost 3 years now, and I was originally taught the Tidyverse. However, I also tutored in biostats and have collaborated with many different faculty and students. On one hand the Tidyverse created an opening for R learners especially, but it has lead to some controversy as well. Trust me wh…

Tidyverse is much, much harder to write functions for, which is pretty bad for beginners. The API is lovely, but the non-standard evaluation causes real problems for people. True story: writing tidyverse functions is so hard that I once worked for a company with business critical code running in incredibly long R-scripts with almost no functions, and 100 line pipes. While that may be an extreme example, base-R is muc…

As a huge fan of tidyverse, I have to agree. Tidy eval is anything but.

However, once they get that right, then tidyverse is close to perfection

I think the newish “interpolation” syntax with double braces {{ }} is getting there.

Re: Lets-plot: An interactive Python plotting library using ggplot's API

#46
post #30

I've been using R professionally for 4 years. I've been a Python programmer for 6 years. I've shipped large scale applications built on both languages to production. Findings: I honestly don't get the hype around R's plotting capabilities. ggplot2 is nice, but far too magical to be easily understood by beginners. Python offers more intuitive memory management than R (which is really more a statement on how bad R is a…

> Needing to download a million random packages from grad students of the internet is a recipe for disaster. This is baloney. You don't need to rely on a million R packages. You really only need a good plotting library (the built-in one is fine, or use ggplot), a good data frame library (dplyr, data.table, or use build-in one), and a few extras to handle some weird rough edges (lubridate, forcats). This takes you to…

I also believe this is now being addressed by the pharmar[1] group with their riskmetric[2] package.

[1] https://www.pharmar.org/

[2] https://github.com/pharmaR/riskmetric

Re: Lets-plot: An interactive Python plotting library using ggplot's API

#47

I've been using R professionally for 4 years. I've been a Python programmer for 6 years. I've shipped large scale applications built on both languages to production. Findings: I honestly don't get the hype around R's plotting capabilities. ggplot2 is nice, but far too magical to be easily understood by beginners. Python offers more intuitive memory management than R (which is really more a statement on how bad R is a…

But I want ggplot to do magic. Rendering things is extremely tedious and boring. I don't want to spend hours on stackoverflow searching for the special obscure incantations that will shift the legend and margins this way because matplotlib did an ugly job while constantly adapting boilerplate back and forth between the declarative and object-oriented API, I want it to just do what I mean ! Is there any coincidence th…

Base R plot() can also be pretty powerful[1] and look great.[2] As an alternative to ggplot2 I would also propose that Vega Lite[3] could be a contender, with an excellent cross language ecosystem.

[1] http://karolis.koncevicius.lt/posts/r_base_plotting_without_...

[2] https://github.com/KKPMW/basetheme

[3] https://vegawidget.github.io/vlbuildr/

Re: Lets-plot: An interactive Python plotting library using ggplot's API

#48
post #27

I've been using R professionally for 4 years. I've been a Python programmer for 6 years. I've shipped large scale applications built on both languages to production. Findings: I honestly don't get the hype around R's plotting capabilities. ggplot2 is nice, but far too magical to be easily understood by beginners. Python offers more intuitive memory management than R (which is really more a statement on how bad R is a…

Same and I have to disagree with basically everything you’ve said, save the DSL bit and the R package bit. In particular, I don’t see how the tidyverse is at all ‘magical’ - take the two most popular tidy libs, dplyr and ggplot2. The api for dplyr is very explicit, intuitive, and based on long-standing precedence (sql). The api for ggplot2 is admittedly less intuitive, but is itself an implementation of widely known…

>The tidyverse does get iffy sometimes when you need to dig into the rlang/tidy eval area, but that’s all well-documented.

Non-standard evaluation, in my opinion, does fine in the top layer (analysis scripts, DSLs). But it's a pain to build on top of magic without a more concrete layer between. Base R uses character vectors and name attributes to hide the magic. The Tidyverse uses symbols. I find character vectors much easier to understand and manipulate.

Formulas are the only scenarios in base R where symbol and expression manipulation is sometimes necessary. And I don't do that thinking, "Boy, I wish this was how I did 95% of my work."

Personally, I use data.table. It's been great even for packages. If it's an internal package dataset, I don't need to manipulate symbols. And if it's a user-supplied argument, there's usually a simple and fast way to do it with a character vector. Or I define an S3 class, give a helper function that produces a dataset with known names, and just write functions around that. The user can handle combining data however they want.

>Base R is a total mess and largely inconsistent

I wouldn't go so far as to say "total mess." Not even an annoyingly big mess. The few functions that make up most of analysis or package code are dead simple. Inconsistent argument names is hardly a problem with an IDE.

Re: Lets-plot: An interactive Python plotting library using ggplot's API

#49

Earlier quoted context omitted.

Tidyverse is much, much harder to write functions for, which is pretty bad for beginners. The API is lovely, but the non-standard evaluation causes real problems for people. True story: writing tidyverse functions is so hard that I once worked for a company with business critical code running in incredibly long R-scripts with almost no functions, and 100 line pipes. While that may be an extreme example, base-R is muc…

As a huge fan of tidyverse, I have to agree. Tidy eval is anything but. However, once they get that right, then tidyverse is close to perfection I think the newish “interpolation” syntax with double braces {{ }} is getting there.

The biggest difficulty of NSE is not the syntax, but the requirement to hold parallel mental models while writing the code: symbolic expressions and value manipulation. Juggling will always be difficult.

Re: Lets-plot: An interactive Python plotting library using ggplot's API

#50

I've been using R professionally for 4 years. I've been a Python programmer for 6 years. I've shipped large scale applications built on both languages to production. Findings: I honestly don't get the hype around R's plotting capabilities. ggplot2 is nice, but far too magical to be easily understood by beginners. Python offers more intuitive memory management than R (which is really more a statement on how bad R is a…

> R blows Python out of the water when it comes to expressing concise and readable linear algebra/stats computation. Done right, base R looks like mathematical pseudo-code.

Are you including Numpy as part of Python in this statement? I've found Numpy to be as mathematically expressive as R, although I'm not a R power-user.

Post reply on HN