Introducing Arcade and the ArcGIS Python API

by | Jan 23, 2017

ArcGIS 10.5 introduced a new scripting language for the whole ArcGIS platform, as well as a Python API. Both are covered below.

The Arcade scripting language

Dynamic labeling and visualization has become a lot easier with the release of Arcade, a lightweight scripting language that lets users write, share and execute expressions. These expressions can be created through simple scripts with a scripting interface inside of an application or IDE. What makes Arcade unique is that the expressions are portable, so that they can be used through the whole ArcGIS Platform and not just one or two applications, such as ArcPy.

Arcade’s syntax looks similar to JavaScript and JavaScript developers will directly be at ease with it. In a similar fashion as JavaScript, Arcade enables you to declare variables, perform logical operations, take advantage of built-in functions, and write custom functions. Data is referred to through globals (short for global variables). These start with a dollar sign and represent features from a service or layer, and contain a geometry and set of attributes. Global variables enable you to perform simple calculations using field values at runtime, whereas until now you had to create new fields in an attribute table and use the Field Calculator, write an expression and populate the field values.

As this is the first release of Arcade, you can use it only with ArcGIS Pro, ArcGIS Online and through apps that use the JavaScript and Runtime SDKs. It will become available in more places in later releases. Esri explicitly stated that Arcade is not meant to replace Python now or in the future.

Like what you’re reading? Subscribe now and receive the full version of our newsletter delivered to your inbox each week.

A New Python API

As promised, Esri released the first version of their ArcGIS Python API together with ArcGIS 10.5 late December 2016. This is a ‘pythonic’ API, which means it contains modules, classes, functions, and types for managing and working with the elements of a GIS information model. Every API provides an interface between computer systems, in this case the GIS user (the client) and a platform, being ArcGIS Portal or ArcGIS Online. In terms of software architecture, this API is implemented on top of the REST APIs of the Web GIS platform, but you use Python to connect and interact with the platform.

This API enables users to work with data from ArcGIS Online through different Python libraries such as Pandas, Numpy and the SciPy stack, in combination with the API´s own GIS capabilities. These far exceed the capabilities of Esri´s ArcPy package: the API has no less than thirteen different modules, grouped into different categories, covering everything from accessing datasets, data visualization, analysis as well as additional functionality for geospatial workflows.

The API is distributed using Conda, a modern package and environment management system for Python. Both Conda and the API use Python version 3. To get started with the API, you first need to install Conda and then the ArcGIS package that contains all the modules of the API, before you can access the ArcGIS Python API in a Python IDE of choice, or from a Jupyter Notebook environment. You do this by making a connection to ArcGIS Online or Portal with a URL and login credentials, using the GIS module and a public or organizational account.

More info on Arcade: https://developers.arcgis.com/arcade/

More info on the ArcGIS Python API: https://developers.arcgis.com/python/

Categories

Recent Posts

Eric van Rees
Eric van Rees is a freelance writer and editor. His specialty is GIS technology. He has more than eight years of proven expertise in editing, writing and interviewing as editor and editor-in-chief for the international geospatial publication GeoInformatics, as well as GIS Magazine and CAD Magazine, both published in Dutch. Currently, he writes about geospatial technology for various clients, publications and blogs.

Sign up for our weekly newsletter
to receive content like this in your email box.