Notebooks and scripts
You can create, edit and execute Python and R code using Jupyter notebooks and scripts in code editors, for example the notebook editor or an integrated development environment (IDE), like RStudio.
- Notebooks
- A Jupyter notebook is a web-based environment for interactive computing. You can use notebooks to run small pieces of code that process your data, and you can immediately view the results of your computation. Notebooks include all of the building blocks that you need to work with data, namely the data, the code computations that process the data, the visualizations of the results, and text and rich media to enhance understanding.
- Scripts
- A script is a file that contains a set of commands and comments. The script can be saved and used later to re-execute the saved commands. Unlike in a notebook, the commands in a script can only be executed in a linear fashion.
Notebooks
- Required service
- watsonx.ai Studio
- Required permissions
- Editor or Admin role in a project
- Tools
- Notebook editor
- Programming languages
- Python and R
- Data format
- All types
- Code support is available for loading and accessing data from project assets for:
- Data assets, such as CSV, JSON and .xlsx and .xls files
- Database connections and connected data assets
See Data load support. for the supported file and database types.
- Data size
- 5 GB. If your files are larger, you must load the data in multiple parts.
Scripts
- Required service
- watsonx.ai Studio
- Required permissions
- Editor or Admin role in a project
- Tools
- RStudio
- Programming languages
- R
- Data format
- All types
- Code support is available for loading and accessing data from project assets for:
- Data assets, such as CSV, JSON and .xlsx and .xls files
- Database connections and connected data assets
See Data load support. for the supported file and database types.
- Data size
- 5 GB. If your files are larger, you must load the data in multiple parts.
Working in the notebook editor
The notebook editor is largely used for interactive, exploratory data analysis programming and data visualization. Only one person can edit a notebook at a time. All other users can access opened notebooks in view mode only, while they are locked.
You can use these types of libraries:
- Preinstalled open source libraries that come with the notebook runtime environments
- IBM libraries provided at no extra cost that come with the notebook runtime environments
- Your own libraries
When your notebooks are ready, you can create jobs to run the notebooks directly from the notebook editor. Your job configurations can use environment variables that are passed to the notebooks with different values when the notebooks run.
Working in RStudio
RStudio is an integrated development environment for working with R scripts or Shiny apps. Although the RStudio IDE cannot be started in a Spark with R environment runtime, you can use Spark in your R scripts and Shiny apps by accessing Spark kernels programmatically.
R scripts and Shiny apps can only be created and used in the RStudio IDE. You can't create jobs for R scripts or R Shiny deployments.
Learn more
Parent topic: Analyzing data and building models