Skip to main content

UpSet.js is a re-implementation of UpSetR to create interactive set visualizations for more than three sets

Project description

UpSet.js Jupyter Widget

NPM Package Github Actions Open in NBViewer Open in Binder Open API Docs Open Example

A Jupyter Widget Library around UpSet.js.

This package is part of the UpSet.js ecosystem located at the main Github Monorepo.

Installation

You can install using pip:

jupyter-lab 1.2.x:

pip install ipywidgets==7.5.1 upsetjs_jupyter_widget
# for notebooks
jupyter nbextension enable --sys-prefix --py upsetjs_jupyter_widget
# for lab
jupyter labextension install @jupyter-widgets/jupyterlab-manager @upsetjs_jupyter_widget

jupyter-lab 2.1.x:

# some ipywidget 8.x.x alpha vesion
pip install ipywidgets upsetjs_jupyter_widget
# for notebooks
jupyter nbextension enable --sys-prefix --py upsetjs_jupyter_widget
# for lab
jupyter labextension install @jupyter-widgets/jupyterlab-manager@3.0.0-alpha.0 @upsetjs_jupyter_widget

Usage

from ipywidgets import interact
from upsetjs_jupyter_widget import UpSetWidget
import pandas as pd
w = UpSetWidget[str]()
w.from_dict(dict(one = ['a', 'b', 'c', 'e', 'g', 'h', 'k', 'l', 'm'], two = ['a', 'b', 'd', 'e', 'j'], three = ['a', 'e', 'f', 'g', 'h', 'i', 'j', 'l', 'm']))
w

upset_from_dict

df = pd.DataFrame(dict(
    one=[1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1],
    two=[1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0],
    three=[1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1]
), index=['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm'])
w.from_dataframe(df)
w

upset_from_dataframe

it support the ipywidget interact method to get notified about the user input

def selection_changed(s):
    return s.name if s else None
interact(selection_changed, s=w)

see also introduction.ipynb

see also Open in NBViewer]nbviewer-url Open in Binder][binder-url]

Dev Environment

npm i -g yarn
yarn set version berry
yarn
yarn pnpify --sdk
pipenv
pipenv shell
pip install -e .
jupyter nbextension install --sys-prefix --overwrite --py upsetjs_jupyter_widget
jupyter nbextension enable --sys-prefix --py upsetjs_jupyter_widget
jupyter labextension install @jupyter-widgets/jupyterlab-manager@3.0.0-alpha.0
pipenv run jupyter labextension install .

Commands

Testing

yarn test

Linting

yarn lint

Building

yarn install
yarn build

Release

based on release-it

within the pipenv

yarn release:major
yarn release:minor
yarn release:patch

Privacy Policy

UpSet.js is a client only library. The library or any of its integrations doesn't track you or transfers your data to any server. The uploaded data in the app are stored in your browser only using IndexedDB. The Tableau extension can run in a sandbox environment prohibiting any server requests. However, as soon as you export your session within the app to an external service (e.g., Codepen.io) your data will be transferred.

License / Terms of Service

Commercial license

If you want to use Upset.js for a commercial application the commercial license is the appropriate license. Contact @sgratzl for details.

Open-source license

This library is released under the GNU AGPLv3 version to be used for private and academic purposes. In case of a commercial use, please get in touch regarding a commercial license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

upsetjs_jupyter_widget-1.0.0.tar.gz (512.9 kB view details)

Uploaded Source

Built Distribution

upsetjs_jupyter_widget-1.0.0-py2.py3-none-any.whl (292.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file upsetjs_jupyter_widget-1.0.0.tar.gz.

File metadata

  • Download URL: upsetjs_jupyter_widget-1.0.0.tar.gz
  • Upload date:
  • Size: 512.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.1

File hashes

Hashes for upsetjs_jupyter_widget-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a85b77b9c1cc6114fb2af30b4b80a39125914b4e3b2860eb0e87eec3576ab7ba
MD5 e7d9873596f37134eca0e25684b6a5eb
BLAKE2b-256 0154fc6ab900308806f9e87ab0c51e777e567824201cc97d953e32eac07f4707

See more details on using hashes here.

File details

Details for the file upsetjs_jupyter_widget-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: upsetjs_jupyter_widget-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 292.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.1

File hashes

Hashes for upsetjs_jupyter_widget-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3f08e065777ea807c4c86608d5de77aecfb03345ca712f34d1274ec208fd514d
MD5 d79826debb9b73d755c89a6f2f157ae2
BLAKE2b-256 3866955d3371bcad8d0f8e71f62f15b17924b6d7272bb59b6e6c30f347be5c30

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page