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.1a1.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: causalvis-0.1.1a1.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.1a1.tar.gz
Algorithm Hash digest
SHA256 8b5ffa64c5e552349e6987d9f8dd7ad7a52c77baa752ffb25eea59add095ba4a
MD5 1575f5b60a92c95fd790002f0e9c490d
BLAKE2b-256 cba3d430c5aa4499c1ea6026c26035e3201ba15cbc6d6c4b6600a27760ebfc66

See more details on using hashes here.

File details

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

File metadata

  • Download URL: causalvis-0.1.1a1-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.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 68dcd18409a32ae6c46321b2e20b1387a69df89210d5e638303f8f01586658d9
MD5 7af8915beb5d4956a4f97bc9a47e07a0
BLAKE2b-256 eaa20cad25bc88e79afb8c95beb5d969e3d53af7f85d47a347713d6d437323c9

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