Clinical Data Visualization in R and Python

Workshop Slides: Powerpoint    PDF
Sample Dataset: final_with_deceased.csv

Python

Python Notebook
HTML Export
Python Script

Environment Setup

Python 3 is required to run this notebook. We recommend using venv to create a virtual environment for the notebook and its dependencies.

This notebook uses a small number of direct dependencies - most notably, Jupyter and Seaborn. The Seaborn library is built on top of matplotlib and provides a simpler interface and more visually appealing default themes. The library will install pandas, numpy, matplotlib, and other dependencies.


python3 -m venv venv
source venv/bin/activate
pip install jupyter seaborn
For the Sankey diagram at the bottom of the notebook, we use Plotly.
pip install plotly
To run the notebook, start Jupyter from the command line:
jupyter notebook

R

R Markdown File
HTML Export

Environment Setup

This notebook requires R and RStudio.

You will need to install the necessary R packages to run the notebook.

install.packages(c("ggplot2", "dplyr", "tidyr", "plotly"))

 

Support Home