30
Scripting Your Web GIS - Introduction to the ArcGIS API for Python Ben Ramseth [email protected] @esriMapNinja

Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Scripting Your Web GIS -

Introduction to the ArcGIS

API for Python Ben Ramseth

[email protected]

@esriMapNinja

Page 2: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

E M E R A L D

S A P P H I R E

T H A N K Y O U T O

OUR SPONSORS

Page 3: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Topics Covered

• What is the ArcGIS API for Python?

• User Groups

• Overview of Modules

• Functionality

• GIS Module

• Scripting workflows for

• Org Administrators

• Content Publishers

• GIS Analysts and Data Scientists

• Power Users and Developers

Page 4: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

ArcGIS API for Python vs ArcPy

ArcGIS API for Python

• Script against a portal• ArcGIS Online or ArcGIS Enterprise

• Python 3.5

• Analysis, Portal Admin, Content Creation, Big Data Analysis

ArcPy

• ArcGIS Desktop• ArcMap – Python 2.7

• ArcGIS Pro – 3.5

• Mostly geoprocessing

• Some map automation

Page 5: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Four different groups

working with the ArcGIS API

for Python

• Org Administrators

• Content Publishers

• GIS Analysts and Data Scientists

• Power Users/Developers

Page 6: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

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

Page 7: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Modules

• arcgis.gis

• arcgis.env

• arcgis.features

• arcgis.raster

• arcgis.network

• arcgis.schematics

• arcgis.geoanalytics

• arcgis.geocoding

• arcgis.geometry

• arcgis.geoprocessing

• arcgis.realtime

• arcgis.mapping

Page 8: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Online Help Resources

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

Page 9: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Samples

• https://github.com/Esri/arcgis-python-api

Page 10: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Installing the API

• You will install the API using Conda• Popular package and environment manager application

• First need to get Conda• ArcGIS Pro - YES

• Conda is already on your computer

• ArcGIS Pro – NO• Install the latest version of Anaconda for Python

• Install arcgis package• In a command prompt: conda install -c esri arcgis

• Start jupyter notebook• Test the install

Page 11: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

What is Conda?

• https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=What+is+conda?

Page 12: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

What is juypter notebook?

• http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/what_is_jupyter.html

Page 13: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Overview of Functionality

• GIS module

• Finding places with geocoding

• Mapping and visualization

• Feature data and analysis

• Image and raster analysis

• Using geoprocessing tools

• Working with big data

Page 14: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Getting started with the GIS module

• https://developers.arcgis.com/python/guide/using-the-GIS/

Page 15: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Finding places with geocoding

• https://developers.arcgis.com/python/guide/using-the-geocode-function/

Page 16: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Mapping and visualization

• Map Widget• https://developers.arcgis.com/python/guide/using-the-map-widget/

• Smart mapping• https://developers.arcgis.com/python/guide/smart-mapping/

• Working with web maps and web scenes• https://developers.arcgis.com/python/guide/working-with-web-maps-and-

web-scenes/

Page 17: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Feature data and analysis

• https://developers.arcgis.com/python/guide/working-with-feature-layers-and-features/

Page 18: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Image and raster analysis

• Imagery Layers• https://developers.arcgis.com/python/guide/using-imagery-layers/

• Raster Analysis• https://developers.arcgis.com/python/guide/using-imagery-layers/

Page 19: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Using geoprocessing tools

• https://developers.arcgis.com/python/guide/an-introduction-to-geoprocessing/

Page 20: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Working with big data

• https://developers.arcgis.com/python/guide/working-with-big-data/

Page 21: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

UserWorkflows:

Org Administrators

Page 22: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Possible Workflows

Cycle through user content and delete out dated

content

Check credit usage

Delete users that have not logged in

Set permission level

Add users to a group

inviting users, changing user roles

automating making groups user

migrate content from dev to stg to dev

Page 23: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

User Workflows:

Content Publishers

Page 24: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Possible Workflows

Add Shapefile

Add CSV

Delete item

Publish to Feature LayerSet editing on Feature Layer

Add GP as an item

Page 25: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

User Workflows:

GIS Analysts and Data Scientists

Page 26: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Possible Workflows

Forest fire models

Raster analytics

Flood modeling

Analyzing hurricane tracks

Page 27: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

User Workflows

Power Users/Developers

Page 28: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Possible Workflows

Edit geometries

Buffer then select by location

Raster Management

Spatial Analysis

Geoprocessing Directions

Address locating

Page 29: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction

Conclusion and Questions

Ben [email protected]

@esriMapNinja

Scripting Your Web GIS - Introduction to the ArcGIS API for Python

Page 30: Scripting Your Web GIS- Introduction to the ArcGIS API for ... · •Popular package and environment manager application •First need to get Conda ... Scripting Your Web GIS- Introduction