Skip to main content

A Custom Jupyter Widget Library

Project description

Causalvis: Visualizations for Causal Inference

This repository contains supplemental materials for the ACM CHI 2023 paper titled:

Causalvis: Visualizations for Causal Inference

Causalvis is a python library of interactive visualizations for causal inference, designed to work with the JupyterLab computational environment.

Citation

@inproceedings{Guo_Causalvis_2023,
    address = {Hamburg, Germany},
    title = {{Causalvis}: Visualizations for Causal Inference},
    booktitle = {Proceedings of the 2023 CHI Conference on Human Factors in Computing Systems},
    publisher = {Association for Computing Machinery},
    author = {Guo, Grace and Karavani, Ehud and Endert, Alex and Kwon, Bum Chul},
    year = {2023}
}

Getting Started with Causalvis

The quickest way to ensure that causalvis is installed correctly is to start with a clean conda environment with the exact versions of the following packages:

 conda create -n newenv python=3.8 jupyterlab=3.4 ipywidgets=7.6 ipykernel=5.3 scipy pandas

 conda activate newenv

Install pip for this new environment:

conda install pip

Then install causalvis:

pip install causalvis

The package should show up when you run:

jupyter labextension list

Running Causalvis

Causalvis is meant to be used in the JupyterLab computational environment. After installation, JupyterLab can be opened from terminal with the following:

jupyter lab

For notebook examples, please refer to the github repo here.

The notebook folder has a number of examples that demonstrate the various Causalvis modules. We recommend starting with Example_All.ipynb, which has all necessary data sets included and does not require any external packages. Other demo notebooks will require that certain packages are installed such as causallib, causalnex, pandas, scikit-learn, and others. Note that if you created a new conda environment as recommended above, it is recommended that you install these packages using conda, conda-forge, or pip.

To use the causalvis modules in your own projects, you can create a new notebook in python3 and instantiate the widget with the relevant props.

from causalvis import DAG
DAG(attributes=["A", "B"])

Troubleshooting

If you encounter errors when importing causalvis in JupyterLab, first ensure that the package is successfully installed and appears in the Jupyter labextension list.

jupyter labextension list

If this has been verified, check that the python version used by JupyterLab is identical to the version in which causalvis is installed. In cases where there are multiple virtual environments in the same machine, the causalvis package may be installed in a different location.

Documentation

We are working on releasing a comprehensive wiki for causalvis. The link will be updated here as soon as it is ready - check back soon!

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

causalvis-0.1.1a2.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

causalvis-0.1.1a2-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

Details for the file causalvis-0.1.1a2.tar.gz.

File metadata

  • Download URL: causalvis-0.1.1a2.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for causalvis-0.1.1a2.tar.gz
Algorithm Hash digest
SHA256 d92003f04a7388bdbeec4e59d523bf04156c3d5a4e920e7e1ec83413343e15be
MD5 fbc8b961e16fb9bcaa0b3394e30440a2
BLAKE2b-256 f87c1a05f2191f8b96824639483707f1bae8acdef058e8b3e296622aa500fdfc

See more details on using hashes here.

File details

Details for the file causalvis-0.1.1a2-py3-none-any.whl.

File metadata

  • Download URL: causalvis-0.1.1a2-py3-none-any.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for causalvis-0.1.1a2-py3-none-any.whl
Algorithm Hash digest
SHA256 fcf043712cc6b1525d39217dcb43358ab7e81113b41c710a8a3f501370e71773
MD5 39f367d025b3c65e81569b16ec636ec3
BLAKE2b-256 097cbee763e6029ce41ed448a194a3545280e369ab70b86500e6a19d5aef0072

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