Materials for StanCon 2018 intro class
Materials for the StanCon 2018 Intro class for both R and Python users (thanks to @amaloney). See below for how to install an environment that can run the notebooks.
Other resources:
brew
)We will be using conda
to facilitate the creation of virtual environments,
and the handling of dependencies used in the introduction class. Below outlines
how to create an environment that will run notebooks for Jupyter or RStudio on
a macOS
system.
Install brew if you have not already done so. We will be
using it as our package manager for installing miniconda
. If you do not
want to install brew
on your system, then follow the instructions on
Anaconda for how to install miniconda
on your system.
Install miniconda
and update your PATH
environment variable so that you
have access to the newly installed conda
package manager. conda
is
different than brew
in that conda
can create virtual environments that
are segregated from your system environment.
brew install miniconda
export PATH=/usr/local/miniconda3/bin:$PATH
to the end of your~/.bashrc
or ~/.bash_profile
file, and then sourcing it.Clone the StanCon2018 Intro repository someplace on your machine and change directories into it.
git clone https://github.com/jgabry/stancon2018_intro
cd stancon2018_intro
Next we will install the conda virtual environment, which includes several packages: RStudio, Jupyter, a Python3 kernel for Jupyter, and an R kernel for Jupyter. Once the dependencies have been installed, we will need to activate the new virtual environment, so that we can access the newly installed packages.
conda env create --file environment.yml
source activate StanCon2018_Intro
.Start the notebook environment you are familiar with.
Jupyter
jupyter notebook
jupyter_notebooks
folderStanCon2018 Intro-Python3.ipynb
or theStanCon2018 Intro-R.ipynb
notebook. The Python3 notebook shouldRStudio
rstudio