"Actuaries can be at a loss as to where to begin. But they often have the problem statement already. What my teams have found useful are a few simple off the shelf solutions tailored to them that they can expand on. Given that, they usually pick it up an run with it. "
A cookbook to help actuaries get started with data and analytics projects in both data science and traditional fields, using Jupyter Book 2.0.
Here is the link to the Actuaries' Analytical Cookbook website: https://actuariesinstitute.github.io/cookbook/docs/index.html
Generally to add content to the book, one could:
- Create a fork
- Make sure the .ipynb file has been fully executed [1],
- Add .ipynb files to the
cookbook\docs
subfolder in your fork, - Add those files to the
cookbook\_toc.yml
in your fork, - Go to github.com/[your-name]/cookbook, 'Actions' tab and enable "Build HTML and Deploy to GH-PAGES" (on the right hand side)
- Go a random file on your forkedn Github page (e.g. _toc_yml), add an empty space and commit to
main
in the fork - Go back to Actions and see if a workflow has been enabled. Wait for it to finish and check that the website at https://[yourusername].github.io/cookbook works as intended
- Create a pull request to
main
in the https://github.com/ActuariesInstitute/cookbook repository. - Future workflows will be enabled automatically.
Reference Jupyter book documentation here.
This repository is published automatically to gh-pages
upon push
to the main
branch.
[1] Jupyter book runs notebooks automatically if there are missing outputs. A requirements.txt
file is provided to support this CI
application.
This should not be needed but if you wish to build and preview the site on the local machine, you will need to follow these instructions:
The conda environment is provided as environment.yml
. This environment is used for all testing by Github Actions and can be setup by:
conda env create -f environment.yml
conda activate main-conda-env
Run the following command in your terminal:
jb build cookbook/
If you would like to work with a clean build, you can empty the build folder by running:
jb clean cookbook/
If jupyter execution is cached, this command will not delete the cached folder.
To remove the build folder (including cached
executables), you can run:
jb clean --all cookbook/