Open alex-the-man opened 7 years ago
Hi @tc0312! I'm not sure I follow you. This extension is intended to render data of application/tableschema+json
mime type (based on this spec), so essentially tabular data. If you are interested in plotting the same data, there are many options: matplotlib, Plotly, Altair (Vega), etc. I also created a JupyterLab/Notebook extension for the rendering data of application/vnd.plotly.v1+json
mime type, which might be what you're looking for.
Hi @gnestor. Sorry for not explaining myself clearly. What do you think about extending this plugin to include basic chart plotting function? In Zeppelin, they have a display system for tables which user can visualize a table in table form or in different chart types. I think it's a very nice feature to have in JupyterLab. Asking users to call matplotlib or other libraries is less convenient than Zeppelin's display system.
Ah, I see! I like this idea and it's worth pursuing, although I'm not sure this repo is the right place for it. Nonetheless, I welcome your contributions and we can always move it into it's own repo if necessary.
Some thoughts:
If jupyterlab_vega provided UI to toggle between different visualization types (2) and its display function accepted a pandas DataFrame, then a user could do something like:
from jupyterlab_vega import Vega
import pandas
import numpy
df = pandas.DataFrame(numpy.random.randn(2, 2))
Vega(df)
and then toggle between all the different visualization types that Vega supports, in addition to toggling between other mime types included in the mime bundle (3) returned by Vega(df)
, such as the table schema mime type.
In conclusion: I think that implementing (2) at jupyterlab_vega would be the best next step 👍
Hi @gnestor, what do you think about adding basic plot support to this library? If you are open to the idea, I can contribute.