Notebook

Feedback


Notebook is an online interactive development environment provided in SuperMap iPortal. It supports creating and running various scripts such as Python, Markdown, and Raw, which also supports performing distributed analysis and machine learning based on spatial data. The portal administrator needs to add the DataScience server on the admin page before running the created script in Notebook.

The following will introduce the composition of the Notebook page in iPortal and how to create Notebook resources.

The introduction of the Notebook page

In iPortal, Notebook without the DataScience server only allows users to create and save scripts online. After the portal administrator adds the DataScience server, the running function in Notebook can be activated. Click "Notebook" from the "Resource Center" drop-down menu in the navigation bar, then click "Create Notebook" to enter the Notebook editor. You can create and run various scripts online in Notebook, as shown in the following figure:

The creation of Notebook resources

To create Notebooks in iPortal, the user must be the "CREATOR" type and has the role with resources creation permission, such as PORTAL_USER (the division of user type and permissions in iPortal, see: Role, User Type and Permissions).

The following example implements density analysis in Python3 code, showing you how to create a Notebook resource in iPortal:

  1. Click "Notebook" from the "Resource Center" drop-down menu in the navigation bar, then click "Create Notebook" to enter the Notebook editor, and confirm that the Kernel Idle indicator is green. If the indicator is red for a long time, you need to check the running status of the DataScience server and try to reconnect;
  2. In the common toolbar, select the editor "Code" and select the Kernel as "Python3";
  3. Enter the sample code in the workspace, click the Run button in the common toolbar to run the Notebook, as shown in the following figure:

The running result is shown below the code block. The example shows "DBSCAN density clustering succeeded, the resulting dataset is taxi_up_webMercator_dbscan_1", as shown in the following figure:

  1. After running successfully, click the "Save" button, enter the name and confirm, and the creation of a Notebook resource is completed.

  2. After creating successfully, you can go to the "Resource Center" > "Notebook" page to view the notebook resources list. You can also edit and batch delete the notebook resources with permissions, and you can share resources as needed. In addition, the iPortal administrator can also manage the added notebook resources in the portal on the "Management" > "Resource Management" > "Notebook" page. For details, see Notebook Management.

Note: The number of notebooks you can save is unlimited by default. If your administrator has set a quota, the page will display your quota usage with a progress bar. When the number of created notebooks reaches the quota limit, you won't be able to create any longer. At this time, you can contact your administrator to increase the quota, or delete some notebooks to free up quota space.