Skip To Content

Work with content in the user workspace

In the notebook editor, you can work with content in your private ArcGIS Notebook Server workspace to add items to your notebook or download them to your machine. Click the Files button to open the Files pane.

Browse content in the workspace

The Files pane provides a browser for the files in your workspace. The default folders are home and samplesdata (the latter for the data used in the sample notebooks).

Upload content to the workspace

To work with content and resources from your machine, you must first upload your file to your notebook's workspace. Once your files are uploaded, you can reference their file path in your notebook with filepath = /arcgis/home/filename.

To upload files, complete the following steps:

  1. In the Files pane, browse to the /arcgis/home folder.

    /arcgis/home is the workspace directory and is different from the root directory home/arcgis.

  2. Click Browse and browse to the file.
  3. Select the file.
  4. Click Upload.

    The file is uploaded to the workspace.

Download content from the workspace

To save a file from the workspace to your local machine, in the Files pane, browse to the file and select it. The file is automatically downloaded to your machine.

Set up a scratch workspace environment for use with ArcPy

The scratch workspace is intended for output data you do not intend to maintain.

To create and use a scratch workspace environment, follow these steps:

  1. Use the code below to create a scratch file geodatabase under the user workspace directory, if it does not already exist, and set the scratch geodatabase as the scratch workspace environment.

    import arcpy
    if not arcpy.Exists('/arcgis/home/scratch.gdb'):
    arcpy.env.scratchWorkspace = '/arcgis/home/scratch.gdb'

  2. Use the code below to verify that the scratch workspace is set as the scratch workspace environment.