How to Use this Book#
This online resource contains many notebook files with executable code cells as well as descriptive Markdown cells. It is designed to be an active exploration of NWB data, but can be used in a few different ways.
Option 1: As a casual observer#
There’s a lot of descriptive text in this book, as well as the code. If you’re interested in seeing the overall flow of ideas without digging into the data yourself, feel free to peruse via the primary website: nwb4edu.github.io.
Option 2: Using cloud computing#
This, dear reader, is our preferred mode of interaction so that you really engage with the materials! And even here, you have two options:
DANDI Jupyter Hub#
DANDI, a platform for publishing, sharing, and processing neurophysiology data funded by the BRAIN Initiative, has a JupyterHub which is pre-configured for working with their dataset. This JupyterHub (nicknamed the Dandihub) allows you to run code on servers that they are supporting.
To launch the code here on the Dandihub, follow these directions:
If you do not have already, set up a GitHub account. It’s free, and it’s a great way to start tracking your code!
Register for a DANDI account at https://dandiarchive.org/ by clicking “LOG IN” and then “LOG IN WITH GITHUB”. Membership is usually granted automatically to GitHub accounts with a .edu or similar academic email address. For new GitHub accounts or non-.edu email addresses, approval may take up to 24 hours or longer.
Once your account is approved, navigate to the page you’d like to interact with in this book and click the rocket icon at the top of the screen. In the dropdown menu, choose JupyterHub. This will bring you to the Dandihub at https://hub.dandiarchive.org/.
Log in using your GitHub account (you should already be logged in if you just registered).
Choose the Standard server option with the DANDI Image.
Click the Start button and dive into the notebook that opens!
Note: Regardless of whether or not you’re running the code on the Dandihub, we’ll primarily be using the dandi package to interact with NWB datasets.
Colab#
If you have a strong preference for Colab, there is also an option in the rocket launch menu to open the notebooks here in Colab. Note that when you try to run your first cell in Colab, it will tell you that your notebook was not authored by Google – that’s okay! Click “Run Anyway.” Saving notebooks in Colab is possible if you log into a Google account.
Option 3: Using your local Python environment#
As you would with other code bases, you can clone our source code from Github and go wild with your local Python install.
If you’d rather not clone the whole repository, you can use the good ol’ copy and paste technique. Take caution, though: some, but not all, of the code snippets in this book will work on their own. Copy and paste into your own coding environment at your own risk.
Additional tips#
If you’re running the notebooks one after the other, keep in mind that each notebook functions separately. Any packages that are imported, variables that are created, etc. will need to be regenerated in each notebook.
Occasionally, a cell might produce a red warning message saying something is “deprecated.” Don’t fret! This is just a warning that something deep in the code may not work soon. It usually does not mean it won’t work for you now.