A notebook to explain the power and interpretability of linear models. Hopefully this will make complex modelling packages like prophet
seem less like magic.
This notebook is heavily inspired by this fantastic talk, along with this notebook investigating cycling patterns in Seattle
The best way to install this notebook is with miniconda (conda's little cousin).
- Download, and unzip, the folder from github (drop down from the "code" button)
- Download and install miniconda
- Open the anaconda prompt (or terminal if you know how) in the project folder
- create a new environment with the following command
conda env create -f environment.yaml
Activate your newly created environment with the following:
conda activate linear_models
These steps should install all the necessary packages. If you get an error that says package not installed then run the following
python -m pip install [package-name]
I use VSCode as my code editor since it is free and open-source. You can also use things like PyCharm (which I think is included at Trainline). The benefit of these editors is that you can open and view Jupyter notebooks without launching a full jupyter server. This makes it easier to edit and move files, you can change jupyter kernels easier and all round better coding experience.
You just need to install the Jupyter extension on VSCode and you should be able to the notebooks included here.
To create the web app, run
shinylive export three_models_app site
and then run locally with
python -m http.server --directory site 8008