Google Colab is a Google-hosted Jupyter notebook service that allows a user to access their notebooks from anywhere by storing them in Google Drive. It requires no setup beyond creating a Google account, and provides free computing resources, including cloud-based GPUs. To learn more, refer to the FAQ or tutorial. Colab is a very convenient platform for ArcGIS administration and management, as it allows a user to run scripts from wherever they have access to a Google account.
Google Colab runs in a cloud virtual machine that uses Ubuntu, meaning that it can process bash commands in addition to Python logic. Any command with a !
in front of it will be treated as if it were entered on the command line. This means that the ArcGIS API for Python can be installed with pip
.
Follow the steps below to install:
- If you have not already done so, register an account with Google and open a new Colab notebook.
- Add a cell and run
!pip install arcgis
.
- You can confirm the installation by running
!pip list
. The list should include arcgis along with all of the proper dependencies found in a normal arcgis install. - Run
import arcgis
to confirm that it works properly.
Currently, Google Colab is not readily compatible with the ArcGIS mapping widget, but may work with some functions that return iFrames, such as the Web
method. To enable these widgets (or any 3rd-party widget) in Colab, run from google.colab import output
followed by output.enable
.