Jupyter/Jupyter Book#
The Databook primarily functions as a repository comprised of Jupyter notebooks that each demonstrate a concept (or series of related concepts) within Neuroscience Analysis. The notebooks are written integrated with informative markdown cells that serve to explain the purpose and meaning of the code in the code cells of the notebook. Each notebook produces plots which are meant to assist in the demonstration of the analytical concepts used as well as yield meaningful scientific information about the data which was analyzed.
In its deployed form, the Databook is a website powered by Jupyter Book. Jupyter Book handles the web-based functionality of the Databook and manages a neat and simple UI. All Jupyter book files exist within the /docs directory of the Databook. Jupyter Book is configurable with a set of yaml files, namely _config.yml and _toc.yml. To build the repository into the Jupyter Book, the command jupyter-book build ./docs
is used within the root directory. The build generates a _build
directory which contains all the HTML and Javascript files for a functional website, which is used automatically when the Databook is deployed.
Within the Table of Contents, we specified the Introductory page, various chapters of the Databook, and their respective notebook/markdown files. Within the config file, the project Title, logo, and links to the GitHub repository and GitHub issues were specified. Also through the config we specified the available launch buttons and their links as Dandihub (Jupyterhub), Binder, and Google Colab. We also included the option to allow for Thebe functionality.
Additionally, Jupyter Book has integrated citation and bibliography functionality, such that when a references.bib file is included and specified in the config, and citations appear in the markdown of the Databook’s pages in the form {cite}citation_name_here
, a bibliography page is generated which we put in the final chapter of the Table of Contents. As new works are cited in notebooks, they can be manually added to the references.bib file after which they will show up automatically in the bibliography when the Jupyter Book is built.