## 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 provided some links you might want to examine before you start.

## Getting set up¶

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 and have opened a command prompt in a Conda environment:

conda create -n project "anaconda-project>=0.11"
conda activate project
cd holoviz_tutorial # You may need to delete this directory if you've run the command above before
anaconda-project run jupyter notebook

If you prefer JupyterLab to the default (classic) notebook interface, you can replace "notebook" with "lab".

Once your chosen environment is running, navigate to tutorial/00_Setup.ipynb (i.e. this notebook) and 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:

In [ ]:
import datashader as ds, bokeh, holoviews as hv  # noqa
from packaging.version import Version

min_versions = dict(ds='0.14.0', bokeh='2.4.3', hv='1.15.0')

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


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

In [ ]:
hv.extension('bokeh', 'matplotlib')


Lastly, let's make sure the datasets needed are available. First, check that the large earthquake dataset was downloaded correctly during the anaconda-project run command:

In [ ]:
import pathlib
from pyct import cmd

if not pathlib.Path('../data/earthquakes-projected.parq').is_file():
cmd.fetch_data(name='holoviz', path='..') # Alternative way to fetch the data


Make sure that you have the SNAPPY dependency required to read these data:

In [ ]:
try:
import pandas as pd
columns = ['depth', 'id', 'latitude', 'longitude', 'mag', 'place', 'time', 'type']
path = pathlib.Path('../data/earthquakes-projected.parq')