Extra widgets for Jupyter Lab
Project description
labext
Overview
This library provides pre-built widgets and integrates some additional JS libraries to provide an even better experience to work with data in Jupyter Lab.
Features:
- Better display for pandas data frame.
- Pop-over content, allowing to show additional content when hovering over a DOM element.
- Widgets for interactive labeling/annotating data in Jupyter Lab.
Usage
See the Demo notebook for how to use the library. Demo:
-
Converting DataFrame to DataTable
-
Pop-over (Tippy)
-
Slider
-
Annotator
Installation
Docker
I provide a Dockerfile that create a base environment to run this library. To run the demo notebook in docker, you can use docker-compose to start a jupyter lab:
docker-compose up
Manual
To use this with JupyterLab, you need to have requirejs
enable in Jupyter by installing either:
- https://github.com/DraTeots/jupyterlab_requirejs (jupyterlab version <= 1.*)
- https://github.com/binh-vu/jupyterlab_requirejs (jupyterlab version >= 2.*)
Beside requirejs
, you also need to have ipywidgets
, ipyevents
, ipycallback
pip install ipywidgets ipyevents ipycallback
jupyter nbextension enable --py widgetsnbextension
jupyter nbextension enable --py --sys-prefix ipyevents
jupyter labextension install @jupyter-widgets/jupyterlab-manager ipyevents ipycallback
Finally, install this package directly from pypi
:
pip install -U labext
Development
To compile the typescript files you need to install:
npm install @types/jquery
Then compiles all .ts
files, remove--watch
if you don't want to monitor for changes.
tsc --target es2017 --watch **/*.ts
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.