data-8 / datascience

A Python library for introductory data science
https://www.data8.org/datascience/
BSD 3-Clause "New" or "Revised" License
620 stars 293 forks source link

Use Altair/Vega-Lite for charting #233

Closed ellisonbg closed 5 years ago

ellisonbg commented 8 years ago

Hi all, this is Brian Granger and I co-lead Project Jupyter with Fernando Perez. I am also teaching data science to undergrads myself at Cal Poly. The visualization space in Python has been pretty painful in the past, especially in the area of statistical visualization.

For the last 9 months, Jake Vanderplan (@jakevdp) and myself have been working on a new visualization library based on the work coming out of Jeff Heer's group at UW (d3, vega, vega-lite).

We just released Altair, a declarative statistical visualization library for Python. It has a high-level API that exposes a consistent and powerful visualization grammar. Out of the box, Altair renders visualizations in the Jupyter Notebook using d3/vega/vega-lite JavaScript libraries, but there is interest from other Python libraries (matplotlib, Bokeh, Plotly) in supporting Altair/Vega-Lite as well.

Please have a look at let us know if you have questions!

SamLau95 commented 8 years ago

Thanks for sharing Brian! Enjoyed your talk at SciPy.

@papajohn For reference, https://github.com/ellisonbg/altair

I think this has the potential to make our plotting code much nicer (no more plt.xlabel / plt.title calls!) and is worth looking into.

papajohn commented 8 years ago

Nifty! I'll take a look in August (hopefully).

ellisonbg commented 8 years ago

Great, let @jakevdp and I know if you have any questions, etc.

adnanhemani commented 5 years ago

@papajohn any updates on this? If this is still something to look into, I can look too. If not, should we close this?

Just a question I have for this: this would be something that would replace our current charting mechanisms? This is an enhancement on current features rather than new features altogether, right?

jakevdp commented 5 years ago

@fperez and I talked about this a while ago, and agreed that Altair is probably not ready for data8 because it still chokes on larger datasets (where larger ~= 10K points), and it would be a real bummer to have that limitation in the only charting solution that's being taught.

adnanhemani commented 5 years ago

@jakevdp thanks for the info! As per your info, I'm going to close this issue - if the originators of this issue would like to bring this up again, please feel free to re-open the issue and comment back!