-
-
Notifications
You must be signed in to change notification settings - Fork 776
Description
I just watched a demo video for the JupyterLab Chart Editor which wraps the plotly chart editor app in a JupyterLab panel and lets you open a plotly chart JSON file in that editor. Essentially, it pops an HTML app into a panel in JupyterLab, and I think registers the app as a file viewer for a particular file type. (I'm not completely taken by it, tbh, because it means you can do irreproducible things to the chart definition file, but that's another issue).
JupyterLab extensions can also open files from a dialogue as the iframe/html previewer shows: https://github.com/timkpaine/jupyterlab_iframe.
This made me wonder about what datasette
integration with JupyterLab might do.
For example, by right-clicking on a CSV file (for which there is already a CSV table view) in the file browser, offer a View / Run as datasette file viewer option that will:
- run the CSV file through
csvs-to-sqlite
; - launch the
datasette
server and display thedatasette
view in a JupyterLab panel.
(? Create a new SQLite db for each CSV file and launch each datasette view on a new port? Or have a JupyterLab (session?) SQLite db that stores all datasette
viewed CSVs and runs on a single port?)
As a freebie, the datasette
API would allow you to run efficient SQL queries against the file eg using using pandas.read_sql()
queries in a notebook in the same space.
Related: