Setup#
This first step to the tutorial will ensure your system is set up to handle all the subsequent sections, with all software installed and all data downloaded as needed. The index provides some links you might want to examine before you start.
Important
The instructions below are specific to this tutorial, and are designed to ensure that you install exactly the same versions for which the tutorial was written so that the output shown will exactly match what you see yourself. If you are looking to install a HoloViz package for your own use, please consult each library’s website (linked from HoloViz) for detailed guidance. Typically, installing these packages simply involves conda install
or pip install
, e.g. conda install hvplot datashader
.
Hint
If you are attending a live tutorial or workshop and have previously run through the tutorial, make sure to run these steps again shortly before the live session to ensure you have the same version of the tutorial that the presenter will use.
Getting set up#
Install conda: If you don’t have conda installed, you can follow the conda docs to download and install it. We recommend using the Miniconda installer.
Open a new terminal window
Create and activate a new conda environment: This environment is just for
anaconda-project
, a tool to help download the required packages and data for the tutorial.conda create -n project "anaconda-project>=0.11" conda activate project
Download and navigate to the tutorial project: If you’ve previously run the
anaconda-project download
command below, you may need to delete or rename the pre-existingholoviz_tutorial
directory.anaconda-project download pyviz/holoviz_tutorial cd holoviz_tutorial
Launch Jupyter: Don’t be alarmed when this command outputs many lines as it downloads packages, sets up another conda environment just for the tutorial, and then launches Jupyter.
anaconda-project run jupyter lab
Note: You can replace “lab” with “notebook” if you prefer the original Jupyter notebook interface.
Test HoloViz imports: After launching Jupyter, navigate to this notebook (
tutorial/00_Setup.ipynb
) and run the following cell. This command is a quick check that your environment is set up correctly. You should see the HoloViews, Bokeh, and Matplotlib logos along with a success message.
import datashader, panel, hvplot, param, holoviews as hv # noqa
from package_checker import check_packages
hv.extension('bokeh', 'matplotlib')
packages = ['datashader', 'holoviews', 'panel', 'hvplot', 'param']
check_packages(packages)
All specified packages are correctly installed.
Check datasets: Finally, run the following cell to make sure the dataset exists and is readable.
from data_checker import check_data
data_path = '../data/earthquakes-projected.parq'
check_data(data_path)
Data exists and is readable!
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.