Note: I have only tested this code on Python 3 on my mac. Python 2 and/or windows users may need to make edits.
- Git clone the repo
- Use terminal commands to change directory to the folder "nyt-linear-and-logistic-regression"
- Activate any virtual environment if you are using one
- Install all Python dependencies ... numpy, pandas, scikit-learn, etc. (if you have anaconda, you should have all libraries already. Otherwise,
pip install -r requirements.txt
orpip3 install -r requirements.txt
should work) - From the "nyt-linear-and-logistic-regression" folder location, run
jupyter notebook
- When the jupyter notebook instance loads in your web browser, click on the
Code-Blocks-for-Lesson.ipynb
file - Click
Cell > Run All
or run each cell in sequence