# 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](https://jupyterlab.readthedocs.io/en/stable/getting_started/overview.html) 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:
```bash
conda install pip
```
Then install causalvis:
```bash
pip install causalvis
```
The package should show up when you run:
``` bash
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:
```bash
jupyter lab
```
For notebook examples, please refer to the [github repo here](https://github.com/causalvis/causalvis/tree/master/notebook).
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](https://github.com/BiomedSciAI/causallib), [causalnex](https://causalnex.readthedocs.io/en/latest/), [pandas](https://pandas.pydata.org/docs/getting_started/install.html), [scikit-learn](https://scikit-learn.org/stable/install.html), 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.
```py
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.
```bash
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!
Raw data
{
"_id": null,
"home_page": "https://github.com//causalvis",
"name": "causalvis",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "ipython, widgets, Jupyter, JupyterLab, JupyterLab3",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/f8/7c/1a05f2191f8b96824639483707f1bae8acdef058e8b3e296622aa500fdfc/causalvis-0.1.1a2.tar.gz",
"platform": null,
"description": "# Causalvis: Visualizations for Causal Inference\n\nThis repository contains supplemental materials for the ACM CHI 2023 paper titled: \n\n`Causalvis: Visualizations for Causal Inference`\n\nCausalvis is a python library of interactive visualizations for causal inference, designed to work with the [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/getting_started/overview.html) computational environment.\n\n## Citation\n\n```\n@inproceedings{Guo_Causalvis_2023,\n address = {Hamburg, Germany},\n title = {{Causalvis}: Visualizations for Causal Inference},\n booktitle = {Proceedings of the 2023 CHI Conference on Human Factors in Computing Systems},\n publisher = {Association for Computing Machinery},\n author = {Guo, Grace and Karavani, Ehud and Endert, Alex and Kwon, Bum Chul},\n year = {2023}\n}\n```\n\n## Getting Started with Causalvis\n\nThe 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:\n\n```\n conda create -n newenv python=3.8 jupyterlab=3.4 ipywidgets=7.6 ipykernel=5.3 scipy pandas\n\n conda activate newenv\n```\n\nInstall pip for this new environment:\n\n```bash\nconda install pip\n```\n\nThen install causalvis:\n\n```bash\npip install causalvis\n```\n\nThe package should show up when you run:\n\n``` bash\njupyter labextension list\n```\n\n### Running Causalvis\n\nCausalvis is meant to be used in the JupyterLab computational environment. After installation, JupyterLab can be opened from terminal with the following:\n\n```bash\njupyter lab\n```\n\nFor notebook examples, please refer to the [github repo here](https://github.com/causalvis/causalvis/tree/master/notebook).\n\nThe `notebook` folder has a number of examples that demonstrate the various Causalvis modules.\nWe recommend starting with `Example_All.ipynb`, which has all necessary data sets included and does not require any external packages.\nOther demo notebooks will require that certain packages are installed such as [causallib](https://github.com/BiomedSciAI/causallib), [causalnex](https://causalnex.readthedocs.io/en/latest/), [pandas](https://pandas.pydata.org/docs/getting_started/install.html), [scikit-learn](https://scikit-learn.org/stable/install.html), and others.\nNote 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`. \n\nTo use the causalvis modules in your own projects, you can create a new notebook in python3 and instantiate the widget with the relevant props.\n\n```py\nfrom causalvis import DAG\nDAG(attributes=[\"A\", \"B\"])\n```\n\n### Troubleshooting\n\nIf you encounter errors when importing causalvis in JupyterLab, first ensure that the package is successfully installed and appears in the Jupyter labextension list.\n\n```bash\njupyter labextension list\n```\n\nIf 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.\n\n## Documentation\n\nWe are working on releasing a comprehensive wiki for causalvis. The link will be updated here as soon as it is ready - check back soon!\n",
"bugtrack_url": null,
"license": "BSD 3-Clause License",
"summary": "A Custom Jupyter Widget Library",
"version": "0.1.1a2",
"project_urls": {
"Homepage": "https://github.com//causalvis"
},
"split_keywords": [
"ipython",
" widgets",
" jupyter",
" jupyterlab",
" jupyterlab3"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "097cbee763e6029ce41ed448a194a3545280e369ab70b86500e6a19d5aef0072",
"md5": "39f367d025b3c65e81569b16ec636ec3",
"sha256": "fcf043712cc6b1525d39217dcb43358ab7e81113b41c710a8a3f501370e71773"
},
"downloads": -1,
"filename": "causalvis-0.1.1a2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "39f367d025b3c65e81569b16ec636ec3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 1222509,
"upload_time": "2024-09-10T02:57:33",
"upload_time_iso_8601": "2024-09-10T02:57:33.015200Z",
"url": "https://files.pythonhosted.org/packages/09/7c/bee763e6029ce41ed448a194a3545280e369ab70b86500e6a19d5aef0072/causalvis-0.1.1a2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f87c1a05f2191f8b96824639483707f1bae8acdef058e8b3e296622aa500fdfc",
"md5": "fbc8b961e16fb9bcaa0b3394e30440a2",
"sha256": "d92003f04a7388bdbeec4e59d523bf04156c3d5a4e920e7e1ec83413343e15be"
},
"downloads": -1,
"filename": "causalvis-0.1.1a2.tar.gz",
"has_sig": false,
"md5_digest": "fbc8b961e16fb9bcaa0b3394e30440a2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 1027818,
"upload_time": "2024-09-10T02:57:40",
"upload_time_iso_8601": "2024-09-10T02:57:40.208787Z",
"url": "https://files.pythonhosted.org/packages/f8/7c/1a05f2191f8b96824639483707f1bae8acdef058e8b3e296622aa500fdfc/causalvis-0.1.1a2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-10 02:57:40",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "causalvis"
}