News for hackers. Stuff that matters.
Re:Python Data Visualization 2018: Why So Many Libraries? by msaharia on Friday November 16, 2018 @07:11PM (#18473002)
Python visualization needs a visionary like Hadley Wickham. Once you get used to the clarity of "Grammar of Graphics", every other plotting library feels like a clumsy tool.

Also, people pointing out the diversity of needs behind the multiverse of plotting libraries in Python probably aren't aware of the large number of extensions built on top of ggplot2[1]. In python, they end up being completely new packages.

1. http://www.ggplot2-exts.org/gallery/

Re:Python Data Visualization 2018: Why So Many Libraries? by jbednar on Friday November 16, 2018 @08:32PM (#18473355)
Personally, I don't _want_ a grammar of graphics; I want a grammar of data, where the data happens to have a graphical representation. I don't want to spend ages piecing together a fancy plot; I want to spend just a little time annotating my data to declare what it means, and then no matter how I slice and dice my data it will show up in a meaningful way. That way I can explore it to really understand it, which is the point of HoloViews (http://holoviews.org). But people approach plotting in lots of different ways, and some people actually _do_ want to spend their time making plots, so they are welcome to their ggplot2!
Re:Python Data Visualization 2018: Why So Many Libraries? by gaius on Saturday November 17, 2018 @02:28AM (#18474450)
I don't _want_ a grammar of graphics; I want a grammar of data, where the data happens to have a graphical representation

The point of having a graphical representation is to communicate with other humans therefore some subjective judgement is required; there’s no “one true plot” for each type of data.

Re:Python Data Visualization 2018: Why So Many Libraries? by jbednar on Saturday November 17, 2018 @08:04AM (#18475369)
Of course! HoloViews does allow infinite customizability, to pull out more and more subtle features, show things more clearly, and just to make it look nice or to match your favorite style. But unlike ggplot2, HoloViews does that in a way that can apply to the _data_, rather than having to recapitulate the process every single time you build an individual plot. That way you and your colleagues can together build up whatever style you find most effective, then keep working with it across the full multidimensional landscape of data that you work with in a particular field. HoloViews is a completely different approach, if you really let the ideas sink in (e.g. from our paper about it at http://conference.scipy.org/proceedings/scipy2015/pdfs/jean-...), and is in no way a second-class citizen compared to ggplot2 or any other approach in R...
Re:Python Data Visualization 2018: Why So Many Libraries? by gaius on Saturday November 17, 2018 @09:25AM (#18475624)
I’ll check it out, thanks for the tip!
Re:Python Data Visualization 2018: Why So Many Libraries? by RobinL on Saturday November 17, 2018 @02:16AM (#18474424)
I think we have one in the team behind Vega Lite. Vega has a concise and well-designed grammar of graphics. It comes from the same academic centre (UW Interactive Data Lab) where Mike Bostock developed d3, and I think complements d3 nicely as a higher level tool.

Hadley Wickham's slightly abortive ggvis project was a wrapper around Vega.

Altair is the python library that wraps Vega Lite, making it even more concise to write chart specs.

One important unique feature is that Vega and Vega Lite (and Altair) provide declarative syntax for complex interactions such as cross filters.

I wrote a blog post recently with much more detail about all of this: https://medium.com/@robin.linacre/why-im-backing-vega-lite-a...

Re:Python Data Visualization 2018: Why So Many Libraries? by wodenokoto on Friday November 16, 2018 @07:32PM (#18473095)
There's a lot of good things to say about ggplot, but I feel like the best thing is RStudios ability to auto-complete column names of the input dataframe throughout your pipe of ggplot commands / functions.

I think I would enjoy Python just as much if I figured out how to auto complete column names when writing code for my plots and pandas operations.

Re:Python Data Visualization 2018: Why So Many Libraries? by laingc on Friday November 16, 2018 @08:36PM (#18473372)
Pandas dataframes can autocomplete column names using the dot syntax.
Re:Python Data Visualization 2018: Why So Many Libraries? by wodenokoto on Saturday November 17, 2018 @01:37AM (#18474317)
I know I can auto complete with

    df.mycolumn
But what about

    df.sort_values(by='mycolumn')
In that kind of cases RStudios is smart enough to know that such an argument should be populated by a column name from the dataframe that function is being applied to.
Re:Python Data Visualization 2018: Why So Many Libraries? by jononor on Saturday November 17, 2018 @05:37PM (#18477725)
Can't you use df.mycolumn in that position, and get the completion?
Re:Python Data Visualization 2018: Why So Many Libraries? by j88439h84 on Sunday November 18, 2018 @01:59AM (#18479213)
Plotnine is the good implementation of ggplot in python.
Re:Python Data Visualization 2018: Why So Many Libraries? by _Wintermute on Friday November 16, 2018 @07:42PM (#18473150)
ggplot2 is great as a high level plotting library, though as soon as you want to do something slightly different you end up in the rats nest that is grob and ggproto (because 3 OOP systems aren't enough, so let's create an entirely new one just for this library). I normally give up and tolerate matplotlib instead.