Scripting in Insights

Insights in ArcGIS Enterprise
Insights desktop
Note:

The Insights scripting environment is available in Insights in ArcGIS Enterprise and Insights desktop. The primary connection can be to either Insights in ArcGIS Enterprise or Insights in ArcGIS Online.

Jupyter Kernel Gateway connections can be disabled for an Insights in ArcGIS Enterprise organization during the installation process. Contact your administrator if the Jupyter Kernel Gateway connections are not available. For more information, see Install Insights in ArcGIS Enterprise.

Scripting is a method of extending and customizing existing software to fit the needs of your organization. In ArcGIS Insights, scripting can be done using Python or R as the programming language. Both programming languages allow users to expand the available spatial and statistical analysis capabilities in an Insights workbook.

Scripting in Insights is enabled using a connection to a Jupyter Kernel Gateway. The kernel gateway provides access to the required kernels, or programming languages, that run the code written in the scripting environment. The gateway allows access to both Python and R kernels.

Use the following general steps to enable scripting in Insights:

  1. Set up a Jupyter Kernel Gateway that contains a Python kernel, an R kernel, or both.
  2. Create a connection to the Jupyter Kernel Gateway in Insights.
  3. Open the scripting environment.
  4. Create and run scripts in Python or R.

Python scripting capabilities

Python scripting can be used to do the following:

  • Manipulate and prepare data.
  • Create custom charts and graphs.
  • Integrate machine learning analysis into Insights.
  • Automate data updates and analysis.
  • Convert a dataset to a Pandas, GeoPandas, Koalas, or Spark DataFrame.
  • Convert a Pandas, GeoPandas, Koalas, or Spark DataFrame to a dataset and add it to the data pane.
  • Connect to databases that are not supported in Insights.
  • Perform data analysis.

R scripting capabilities

R scripting can be used to do the following:

  • Manipulate and prepare data.
  • Create custom charts and graphs.
  • Perform advanced statistical analysis.
  • Convert a dataset to an R data frame.
  • Convert an R data frame to a dataset and add it to the data pane.
  • Connect to databases that are not supported in Insights.
  • Perform data analysis.

Additional resources

Use the following resources to learn more about scripting in Insights: