Tutorial 0. Setup

This first step to the tutorial will make sure your system is set up to do all the remaining sections, with all software installed and all data downloaded as needed. The index covered background you might want before you start.

Getting set up#

NOTE: If you are running in ohw.pilot.2i2c.cloud you can skip this notebook.

Please consult holoviz.org for the full instructions on installing the software used in these tutorials. Here is the condensed version of those instructions, assuming you have already downloaded and installed Anaconda or Miniconda:

conda create -n holoviz-tutorial python=3.7
conda activate holoviz-tutorial
conda install -c pyviz holoviz
holoviz examples
cd holoviz-examples
jupyter notebook

See the full instructions at holoviz.org if you don’t yet have conda, if you have an old version of conda, or if you are using JupyterLab.

Once everything is installed, run the following cell to test the key imports needed for this tutorial. If it completes without errors your environment should be ready to go:

import datashader as ds, bokeh, holoviews as hv  # noqa
from distutils.version import LooseVersion

min_versions = dict(ds="0.11.0", bokeh="2.0.1", hv="1.13.2")

for lib, ver in min_versions.items():
    v = globals()[lib].__version__
    if LooseVersion(v) < LooseVersion(ver):
        print("Error: expected {}={}, got {}".format(lib, ver, v))

And you should see the HoloViews, Bokeh, and Matplotlib logos after running the following cell:

hv.extension("bokeh", "matplotlib")

Accessing sample data#

Lastly, let’s make sure the datasets needed are available. First, check the dataset was downloaded correctly during installation:

from load_data import *

df = load_data()
df.head()

If you don’t see any error messages above, you should be good to go! Now that you are set up, you can continue with the rest of the tutorial sections. You can also skip ahead to sections that speak to your interests more directly, such as Building Panels, Working with Large Data, or the various real-world examples of using a variety of tools to solve a visualization problem.