Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting...

30
Python For ArcGIS Enterprise James Sill, Solution Engineer Boulder, Co

Transcript of Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting...

Page 1: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Python For ArcGIS EnterpriseJames Sill, Solution Engineer

Boulder, Co

Page 2: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Agenda

• What is the ArcGIS API for Python?

• Getting Started- Installation & Jupyter Notebooks

- Help & API Reference

• The GIS connection object:- Demo: Connecting to your AGOL and Enterprise org’s via the ArcGIS Python API

• Demo Jupyter Notebook Workflows- Running Raster Analytics via the Jupyter Interface

- Predictive Analysis (Leveraging ArcPy, Python API to produce Machine learning outputs from ArcGIS Pro)

- Administrative workflows for ArcGIS Online and ArcGIS Enterprise

Development Roadmap for ArcGIS Python API

Questions

Page 3: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

gis

features

geoanalytics

geocoding

geometry

schematicsnetwork

realtimewidgets

mappingenv

geoprocessing

geoenrichment

raster

API Overview

Page 4: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Why Python?

• Popularity

• Productivity

• Interoperability

• Solves the “two language” problem

• Scientific Python ecosystem

• Community

Page 5: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

What is the ArcGIS API for Python?

REST

Organization

Page 6: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Overview of the ArcGIS API for Python

• A Pythonic GIS API

• Corresponds to best practices

• Uses standard Python constructs

• Data structures with clean, readable idioms

• Easy for a Python programmer to use ArcGIS

• Easy for an ArcGIS user to script and automate their GIS

geometry

geoprocessing

network

schematics

featuresraster

realtime

widgets

mapping

geoanalytics

gisgeocoding

geoenrichment

Page 7: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

ArcGIS API for Python vs ArcPy

• ArcGIS API for Python- Script against your Web GIS

- ArcGIS Online or ArcGIS Enterprise

- Python 3.x- Analysis, Portal Admin, Content

Creation, Big Data Analysis, Leverages Elastic Cloud Computing Capacity

• ArcPy- ArcGIS Desktop

- ArcMap – Python 2.x- ArcGIS Pro – 3.x

- Mostly geoprocessing- Some map automation

Page 8: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Spatial Analysis & Geoprocessing

Big Data GeoAnalytics

Interactive Exploration

GIS Analysis

ContentPublishing

Desktop Apps

Org administration

Developers

Whom is it for?

Page 9: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Automate Web GIS management

• Populate portal with users, groups

• Clone portals

• Re assign user content

• Perform comprehensive content search

• Determine item relationship

• Create reports of users, their items

Automate content creation

• Automate content publishing during off peak hours

• Update tiles and features from a known database

• Replicate development environment content to production

• Inspect and update items with broken service links

Reproducible research

• Access big data tools programmatically

• Utilize rich 3rd party Python packages for data analysis

• Create rich charts, graphs, embed 2D and 3D maps in Jupyter Notebook environment

• Share your research with data and notes with peers

Page 10: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

How do I get it?

Page 11: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Installation via ArcGIS Pro

• ArcGIS Pro 2.1? - arcgis package comes deployed and ready to use.

• Install Anaconda with Python 3.5 or later- conda install –c esri arcgis

- Conda will install all dependencies

• Test it out

Page 12: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

How do you get this continued….

• Distributed via Conda- Simplifies installs & updates

- Installs dependencies

- Avoids conflicts

• Install steps:- Download Anaconda

- conda install –c esri arcgis

Via the Command Line:

Page 13: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Install as a Docker Image

• The ArcGIS Python API is shipped as a Docker Image

• Download and power up whenever you want to use the API

• These images, when spun up into containers, run in an isolated environment without making any changes to your local file system

Follow these steps on the link below to get Docker on your machine and Run the API:

• https://developers.arcgis.com/python/guide/install-and-set-up/#Install-as-a-Docker-image

Page 14: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Install - Offline

Install the API on a machine without internet access or on a disconnected network with the following steps:

• Install the latest version of full Anaconda for Python 3x for your OS

• Download the latest version of the ArcGIS API for Python appropriate for your OS from Esri's channel on anaconda.org

• For instance, if you are installing on Linux 64-bit, download linux-64/arcgis-1.0.1-py36_1.tar.bz2 package

• Open your terminal application and install the API

• “conda install /path_to_package_download_folder/linux-64/arcgis-1.0.1-py36_1.tar.bz2”

Page 15: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Disconnected Considerations

• Can you use the Python API in disconnected environments?- Yes!!

• ArcGIS Pro 2.1+

• Download Anaconda, move to disconnected network, and install

• Download arcgis package from Conda, move to disconnected nework, and install

• Will need a local JSAPI for Map Widget Notebook integration- Modify custom.css and mapview.js

Page 16: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Different Authentication Schemes

• Anonymous users

• Built-in users

• Users using LDAP, via- Basic authentication

- Portal tier authentication

• SAML Support

• Users using Integrated Windows Authentication (IWA) through NTLM or Kerberos

• Smart card users / PKI authentication using certificate and key files

• Users connected to an ArcGIS Enterprise instance using ArcGIS Pro

Page 17: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection
Page 18: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Demo

Page 19: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Common Questions

Page 20: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Do I need to use Jupyter Notebooks for the ArcGIS API for Python for automating tasks?

NO!

Can I use my favorite Python IDE (e.g. vim) to write scripts as usual?

YES!

Page 21: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Many users choose IDE’s that support both the Jupyter interfaceas well as the traditional IDE interface

Page 22: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Can I use the Windows Task Scheduler or Crontab as you normally would?

Yes!Just make sure you have all the necessary dependencies installed for the capabilities in the Python API installed on the execution system.

Page 23: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

If I write scripts and run them on the command line, does that mean I can't take advantage of the spatial Pandas Dataframe or the Analysis capabilities of the ArcGIS API for Python since it won't run in a Jupyter Notebook?

NO!You just won't be able to visual the results instantly as in Jupyter…

Page 24: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Development Roadmap

Page 25: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Continuous Online Improvements

Raster Analysis

Big Data GeoAnalytics

10.5(b)v0.3

Incremental Software Release

v1.0

v1.2

Realtime GIS

10.5

Mid 2016

2017

Road Map

Smart Mapping

Scientific Modeling

2016

v1.1 10.5.1

Mid 2017

Live samples

micro services

Notebooks as items

Scheduling notebooks

SDK Docker image

Workflow integrationsmachine

learning

3DServer GIS

Spatial dataframes

Page 26: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

• Notebook files as items in your GIS

• Jupyter Notebook server will be included as part of the base ArcGIS Enterprise Deployment

ArcGIS Python API development Road Map Highlights:

• More Server Side Functionality exposed through API

• Leveraging custom python raster functions

• Imagery Ortho rectification tools as python functions

• Greater Integration with data science and predictive analysis tools in ArcGIS Pro and Enterprise

• Better 3D rendering and analysis tools

• Ability to schedule notebooks as tasks within ArcGIS Enterprise

• Expanded scientific modeling tools and functions

Page 27: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

Help Documentation, API, and Samples

• https://developers.arcgis.com/python/

Page 28: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

github.com/Esri/arcgis-python-api

developers.arcgis.com/python

Resources

Page 29: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection

hub.docker.com/r/esridocker

Notebooks.esri.com

Resources

Page 30: Python For ArcGIS Enterprise - Esri · Agenda • What is the ArcGIS API for Python? • Getting Started-Installation &Jupyter Notebooks-Help & API Reference• The GIS connection