Skip to content

nasa/oceandata-notebooks

Repository files navigation

Oceandata Notebooks

Welcome to the repository of tutorials for users of the Ocean Biology Distributed Active Archive Center (OB.DAAC).

For Data Users

Head over to our Help Hub to access the published tutorials.

For Notebook Authors and Reviewers

Please take a minute to familiarize yourself with the following information about our tutorials, which are stored as MyST Markdown rather than as Jupyter Notebooks.

Edit Notebooks & Commit Markdown

Important

  • Edit notebooks in JupyterLab so Jupytext can do its magic.
  • When you first clone this repository, the notebooks folder will not exist!

Keeping Jupyter Notebooks (.ipynb) in a code repository is tough for collaboration because Jupyter Notebooks contain large, binary outputs and metadata that frequently changes. By means of the Jupytext extension to JupyterLab, MyST Markdown (.md) files can be opened like notebooks without saving content troublesome for collaboration. Going one step further, Jupytext can pair an actual Jupyter Notebook file with a MyST Markdown file. That lets us enjoy the benefits of Jupyter Notebooks (e.g. saved outputs and metadata) while only storing MyST Markdown in the repository.

What does this mean for authors and reviewers? You can use the Jupyter Notebooks in the notebooks folder normally, but you must commit the synchronous changes to the paired MyST Markdown files within the book/notebooks folder. To create the notebooks folder after cloning the repository, or when a new MyST Markdown file is pulled, run the following Terminal command. The Terminal command will synchronize, creating if necessary, the paired Jupyter Notebook files with all MyST Markdown files tracked by git.

jupytext --sync $(git ls-files book/notebooks)

Create a New Notebook

Note

Create new notebooks by copying COPYME.ipynb into a suitable location within the notebooks folder.

When you save your new notebook, watch for a new markdown file to appear in the book/notebooks folder and add that file to a commit.

Acknowledgements

This repository has greatly benefited from works of multiple open-science projects, notably Learn OLCI and the NASA Earthdata Cloud Cookbook.