The Santa Cruz County COVID-19 model is written in Stan. It comes with a Jupyter notebook written in Python that performs some data processing and visualization. The instructions below provide basic guidance for installing Python, Jupyter notebooks, and pystan (the Python interface to Stan).
NOTE: The Stan code for the model can also be run in R (using RStan) but we do not provide a Jupyter notebook written in R.
We recommend to install Anaconda via the instructions here. The Anaconda installation will provide Jupyter notebooks along with Python, including the numpy
and scipy
packages.
Once Anaconda is installed, run the follwing shell command to install pystan (see here for more information):
conda install pystan
If it is not already installed, install Python 3 and pip. In Ubuntu, use the shell command:
sudo apt install python3 python3-pip
This article describes the installation of pip for a variety of Linux distributions. If a Python 3 installation from source is required (typically it is not), instructions can be found here
Now, the required python packages can be installed using pip, the Python package installer. In Ubuntu, pip3
is the Python 3 version of pip.
After installing, run the following shell command to install jupyter notebooks (you may need to use pip
instead of pip3
depending on your Linux distribution):
pip3 install notebook
To install pystan
, run the follwing shell command:
pip3 install pystan
We recommend to install Anaconda via the instructions here. The Anaconda installation will provide Jupyter notebooks along with Python, including the numpy
and scipy
packages.
Once Anaconda is installed, open the Anaconda Prompt and type (see here for more information):
conda install pystan