Exploratory Data Analysis (EDA) on bird strikes in aviation.
- Make a conda env with nbdev installed in it.
- Activate that env and run
nbdev_new <project_name>
. This will create a git-initialized repo with$PWD/<project_name>
. - Run
nbdev_install_git_hooks
. - Run
nbdev_build_lib
. This will create a Makefile on its first run. - Modify
settings.ini
to reflect your github setup. You also specify your project's dependencies here for the github CI pipeline. make docs_serve
– This will most likely fail on your first run, as it tries to use Jekyll locally similarily on how it will later look using github pages.- Goto docs directory inside
<project_name>
. bundle install --path ~/.local/<project_name>-docs
– This is only needed to serve the documentation locally! It pulls in a lot of ruby stuff.- Save your notebooks and run
make all
before eachgit {add, commit}
– this might feel strange but the artifacts created bymake
are part of your project's git repository. This is intentional! - Push to github to check that CI runs successfully! Fix any build failures in this early stage before adding new stuff. Simulating github CI locally is possible but requires docker and an ungodly amount of npm stuff (read: security nightmare).
- After your first push to github configure the github settings for your repository to enable github pages; point them to
branch: master, directory: docs/
. It can take up to 15min to build your github pages initially. - Goto
https://<github_username>.github.io/<project_name>/
. If you installed/configured everything correctly this should show your project'sindex.ipynb
as landing page.
Each notebook is transpiled to one web page. Code cells that are marked with #export
become part of your project's library (or module). This enables you to A) reuse code in other notebooks, B) run your analysis from CLI, without Jupyter.
The first markdown cell of each notebook is treated special by nbdev; it contains the (only) first level headline followed by a brief section describing the notebooks contents like so:
# Awesome Notebook Does Amazing Things Only Ever Done A Million Times Before
> This is an exec summary of your notebook. Keep it brief and to the point.
If you care about a proper project website, you'll need to do this for each of your project's notebooks! The first level headline of each notebook is used to create the sidebar menu. Proper headline structuring and nesting is recommended once the headlines pile up, as the make docs
functionality will automagically create a TOC for your notebook.