rapaio-jupyter-kernel
rapaio-jupyter-kernel copied to clipboard
Tablesaw support
Hi, I'm one of the maintainers of Tablesaw, which is a Java data frames library. We officially supported beakerx, but it's been dead now for awhile and so I was looking to update that support to something else and came across Rapaio.
My Jupyter experience is rather limited, but I'd love to collaborate if there are some minimal changes we can make on our side to better support Rapaio.
We had a beakerx package, but looking at it just now, there's nothing beakerx-specific about it. It instead appears to use a jupyter standard called jvm-repr: https://github.com/jtablesaw/tablesaw/blob/master/beakerx/src/main/java/tech/tablesaw/beakerx/TablesawDisplayer.java
Would you want to use this in some way if we renamed the package to something more generic like tech.tablesaw.jupyter?
Hi. I am sorry for the delay, I take from time to time some days off, just to come from again.
The short answer to your question is, unfortunately, no, I can't make this happen with ease. The long answer is as follows:
The ipython notebooks has the following driving ideas: the notebook has a structure of cells with outputs and it communicates with the kernel through some protocol with a kernel. The kernel executes commands and is able to create content to be displayed. The content to be displayed has a MIME type. The usual MIME types are plain text (with colored ASCII), html, markdown, media file types, etc. Usually MIME types which are gracefully handled by a browser. So, if you want to display something as an html table, what you do is to create some html content.
The beakerx package implemented all that logic in python (as far as I can see the kernel is written mostly in python). In java it exposes some interfaces which describes tabular data (like TableDisplay, you know rows, columns, etc).
In rapaio kernel this is not implemented. The main reason is that I am awful at html / javascript stuff in too many ways :).
The good news is that I have some plans. The idea is to use some lightweight javascript table and try to create the output in some way. After that I will create an additional library with some interfaces where anybody can register they adapter for tables / collections / eventual other structures for which I can build a display. Your request is a good incentive to try to build it.
I will start to experiment and I will keep this issue open in order to track the progress. Hope this helps.
Thanks so much for the response!
It seems that beakerx has made it work by installing the beakerx_tabledisplay package. I wonder if rapaio could simply reuse that package as an initial implementation?
https://github.com/twosigma/beakerx/blob/b9c301e37a8b17827f384ee4af83a1e4b4528b43/beakerx-dist/setup.py#L65
It looks like it would provide the entire JS table component:
https://github.com/twosigma/beakerx_tabledisplay/tree/master/beakerx_tabledisplay/js
Their table is quite cool as I remember because I believe it had nice features like scrolling, etc. for handling large datasets.