This release is a pre-release and may not be stable for production use.
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!
Metadata
Release files for causalvis 0.1.1a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| causalvis-0.1.1a2.tar.gz | 1.0 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| causalvis-0.1.1a2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.3 MB
Release files / causalvis-0.1.1a2.tar.gz
| Download URL | causalvis-0.1.1a2.tar.gz |
|---|---|
| Size | 1.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d92003f04a7388bdbeec4e59d523bf04156c3d5a4e920e7e1ec83413343e15be
|
|
BLAKE2b-256 checksum How to use checksums |
f87c1a05f2191f8b96824639483707f1bae8acdef058e8b3e296622aa500fdfc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.2
|
Release files / causalvis-0.1.1a2-py3-none-any.whl
| Download URL | causalvis-0.1.1a2-py3-none-any.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fcf043712cc6b1525d39217dcb43358ab7e81113b41c710a8a3f501370e71773
|
|
BLAKE2b-256 checksum How to use checksums |
097cbee763e6029ce41ed448a194a3545280e369ab70b86500e6a19d5aef0072
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.2
|