Esri
Workshop
Python
Why Python?
- Popularity
- Productivity
- Interoperability
- Solves the “two-language” problem
- Scientific Python ecosystem
- Community
What is the ArcGIS API for Python
ArcGIS
Intro to the ArcGIS API for Python
- Guide
- API Reference
- Many Samples
Quick 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
ArcGIS API for Python vs ArcPy
-
ArcGIS API for Python
- Script against a portal
- ArcGIS Online or ArcGIS Enterprise
- Python 3.x
- Analysis, Portal Admin, Content Creation, Big Data Analysis
-
ArcPy
-
ArcGIS Desktop
- ArcMap - Python 2.x
- ArcGIS Pro - 3.x
-
ArcGIS Desktop
- Mostly Geoprocessing
- Some map automation
ArcGIS + Jupyter =
Four Different Personas
-
Analysts and Data Scientists
-
Power Users/Developers
-
Content Publishers
-
Org Adminstrators
Introducing the GIS Module
Your gateway to scripting a Web GIS
Install the ArcGIS API for Python
How do I get the API
- By using Conda
- What is Conda?
You can install the Python API with or without ArcGIS Pro
If you have Pro on your machine, Conda and Jupyter Notebook is already install for you
Install using ArcGIS Pro
Python Package Manager
If you don't have ArcGIS Pro
- You will need to install Anaconda
- https://www.continuum.io/downloads
Install ArcGIS Package
- Type the following into the python command prompt or command prompt
- -conda install -c esri arcgis
Upgrade from Older ArcGIS Package
- Type the following into the python command prompt or command prompt
- -conda upgrade -c esri arcgis
Install the API on a machine without internet access
- 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
- Open your terminal application and install the API
Start Jupyter Notebook
-
Type the following into the python command prompt
- jupyter notebook
Test the Install
from arcgis.gis import GIS
my_gis = GIS()
my_gis.map()
Hands-on Lab
Hands-on Lab
Connect to ArcGIS Online
Working with the Map
Features
- Feature individual point
- FeatureSet a collection of Feature objects
- FeatureLayer a published service called feature service
- FeatureLayerCollection collection of layers
Hands-on Lab
Hands-on Lab
Geocoding
arcgis.geocoding module
Geocoding
Points of Interest
- Cultural or geographic landmarks
- Businesses by name or category
- Administrative divisions
Batch Geocoding
Geocode an entire list
Reverse Geocoding
Determines address at a particular x/y location
Hands-on Lab
Network Analysis
arcgis.network.analysis module
Commercial grade, traffic aware routing and directions for multiple travel modes
Network Analysis - Service Areas
Hands-on Lab
Berlin Developer Summit Python API Workshop
By John Yaist
Berlin Developer Summit Python API Workshop
workshop
- 1,441