Creating notebooks

After you set up a project and configured the environment, you can create a notebook file, copy a sample notebook from the Community, or add a notebook from a catalog. You must have the Admin or Editor role in the project to create a notebook.

Watch this short video to see how to create a project for Jupyter notebooks.

Figure 1. Video iconCreate a project for Jupyter notebooks
This video shows how to create a project for Jupyter notebooks.

Create a notebook file

To create a notebook file in the project:

  1. From your project, click Add to Project > Notebook.
  2. On the New Notebook page, specify the method to use to create your notebook. You can create a blank notebook, upload a notebook file from your file system, or upload a notebook file from a URL. The notebook you select to upload must be a .ipynb file. The URL must be a public URL that is shareable and doesn’t require authentication.
    Notebook options
  3. Specify the runtime environment for the language you want to use (Python, R, or Scala). You can select a preset environment definition or an environment definition which you created and configured from the Environments page of your project.
  4. Click Create Notebook. The notebook opens in edit mode. To get familiar with the structure of a notebook, see Parts of a notebook.

Copy a sample notebook from the Community

Sample notebooks from the Community are based on real-world scenarios and contain many useful examples of computations and visualizations that you can adapt to your analysis needs.

To copy a sample notebook:

  1. In the Watson Studio menu, click Community, then filter for Notebooks to show only notebook cards.
  2. Find the card for the sample notebook you want and click the card. You can view the notebook contents to browse the steps and the code that it contains.
  3. To work with a copy of the sample notebook, click the Copy icon (the Copy icon). The New Notebook screen opens.
  4. Choose the project for the notebook.
  5. Specify the runtime environment. If you created an environment definition on the Environments page of your project, it will appear in the list of runtimes you can select from.
  6. Click Create Notebook. The notebook opens in edit mode. To get familiar with the structure of a notebook, see Parts of a notebook.

Next step

Learn more

Watch these videos to see how to run a sample notebook from the community.