Documentation and samples for ArcGIS API for Python

ArcGIS API for Python

ArcGIS API for Python is a Python library for working with maps and geospatial data, powered by web GIS. It provides simple and efficient tools for deep learning, sophisticated vector and raster analysis, geocoding, map making, routing and directions, as well as for organizing and managing a GIS with users, groups and information items. In addition to working with your own data, the library enables access to ready to use maps and curated geographic data from Esri and other authoritative sources. It also integrates well with the scientific Python ecosystem and includes rich support for Pandas, Scikit-Learn, Fast.ai, etc. and Jupyter notebook.

To learn more about the API, visit the product page here. You can get in touch with the developers of the API and other users like you at the community page here.

What's included

This SDK repository contains the following items:

  • API Reference Documentation. A hosted version of this can be found here.
  • Samples as Jupyter Notebooks.
  • Guides chapters as Jupyter Notebooks.

You have multiple ways of executing these notebooks as listed below:

  • Execute locally on your computer by installing anaconda and the API. See help here
  • Execute with ArcGIS Pro. See help here
  • Execute with ArcGIS Hosted Notebooks. See here
  • Execute on a hosted sandbox environment. Go to notebooks.esri.com
  • Execute in a Dockerised environment. See help here
  • Execute with Binder. See help here

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue. Thank you!

Contributing

Anyone and everyone is welcome to contribute. Please see our contribution guideline here.

Licensing

Copyright 2018-2019 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's license.txt file.

Comments
  • solar sample

    solar sample

    solar energy prediction


    Checklist

    Please go through each entry in the below checklist and mark an 'X' if that condition has been met. Every entry should be marked with an 'X' to be get the Pull Request approved.

    • [ ] All imports are in the first cell? First block of imports are standard libraries, second block are 3rd party libraries, third block are all arcgis imports? Note that in some cases, for samples, it is a good idea to keep the imports next to where they are used, particularly for uncommonly used features that we want to highlight.
    • [ ] All GIS object instantiations are one of the following?
      • gis = GIS()
      • gis = GIS('https://www.arcgis.com', 'arcgis_python', '[email protected]')
      • gis = GIS(profile="your_online_profile")
      • gis = GIS('https://pythonapi.playground.esri.com/portal', 'arcgis_python', 'amazing_arcgis_123')
      • gis = GIS(profile="your_enterprise_portal")
    • [ ] If this notebook requires setup or teardown, did you add the appropriate code to ./misc/setup.py and/or ./misc/teardown.py?
    • [ ] If this notebook references any portal items that need to be staged on AGOL/Python API playground, did you coordinate with a Python API team member to stage the item the correct way with the api_data_owner user?
    • [ ] Code refactored & split out across multiple cells, useful comments?
    • [ ] Consistent voice/tense/narrative style? Thoroughly checked for typos?
    • [ ] All images used like <img src="base64str_here"> instead of <img src="https://some.url">? All map widgets contain a static image preview? (Call mapview_inst.take_screenshot() to do so)
    • [ ] All file paths are constructed in an OS-agnostic fashion with os.path.join()? (Instead of r"\foo\bar", os.path.join(os.path.sep, "foo", "bar"), etc.)
    • [ ] IF YOU WANT THIS SAMPLE TO BE DISPLAYED ON THE DEVELOPERS.ARCGIS.COM WEBSITE, ping @ DavidJVitale so he can add it to the list for the next deploy
  • Estimation of river turbidity using sentinel-2 satellite data

    Estimation of river turbidity using sentinel-2 satellite data

    This notebook shows how river turbidity can be estimated using satellite data without any field measurement.


    Checklist

    Please go through each entry in the below checklist and mark an 'X' if that condition has been met. Every entry should be marked with an 'X' to be get the Pull Request approved.

    • [x] All imports are in the first cell? First block of imports are standard libraries, second block are 3rd party libraries, third block are all arcgis imports? Note that in some cases, for samples, it is a good idea to keep the imports next to where they are used, particularly for uncommonly used features that we want to highlight.
    • [x] All GIS object instantiations are one of the following?
      • gis = GIS()
      • gis = GIS('https://www.arcgis.com', 'arcgis_python', '[email protected]')
      • gis = GIS(profile="your_online_profile")
      • gis = GIS('https://pythonapi.playground.esri.com/portal', 'arcgis_python', 'amazing_arcgis_123')
      • gis = GIS(profile="your_enterprise_portal")
    • [ ] If this notebook requires setup or teardown, did you add the appropriate code to ./misc/setup.py and/or ./misc/teardown.py?
    • [x] If this notebook references any portal items that need to be staged on AGOL/Python API playground, did you coordinate with a Python API team member to stage the item the correct way with the api_data_owner user?
    • [x] Code refactored & split out across multiple cells, useful comments?
    • [x] Consistent voice/tense/narrative style? Thoroughly checked for typos?
    • [x] All images used like <img src="base64str_here"> instead of <img src="https://some.url">? All map widgets contain a static image preview? (Call mapview_inst.take_screenshot() to do so)
    • [ ] All file paths are constructed in an OS-agnostic fashion with os.path.join()? (Instead of r"\foo\bar", os.path.join(os.path.sep, "foo", "bar"), etc.)
    • [x] IF YOU WANT THIS SAMPLE TO BE DISPLAYED ON THE DEVELOPERS.ARCGIS.COM WEBSITE, ping @ DavidJVitale so he can add it to the list for the next deploy
  • detecting settlements notebook added

    detecting settlements notebook added

    This fixes the issue no: 2868

    In this notebook, we detect settlements using the traditional supervised classification (SVM) approach and DL (Unet) approach. We compare their results against each other.

  • add the geometry guides in 3 parts

    add the geometry guides in 3 parts

    as referenced in https://github.com/ArcGIS/geosaurus/issues/3217

    part 1 - introduction part 2 - spatial operations part 3 - spatial filtering

    @AtmaMani Though the as_arcpy() is not showing correctly in the preview, it did show the expected shape in the nbviewer.jupyter.org/github/Esri/arcgis-python-api/blob/xxx link. I am not sure if the shape preview is to be present when the PR gets merged.

  • Geocoding guides (7 parts)

    Geocoding guides (7 parts)

    Final review, if all boxes are checked, we can merge

    • [x] Part 1 - What is geocoding
    • [x] Part 2 - Locating addresses
    • [x] Part 3 - Finding points of interest
    • [x] Part 4 - Batch geocode
    • [x] Part 5 - Reverse geocode
    • [x] Part 6 - Custom geocoders
    • [x] Part 7 - Utility functions for geocode

    To fulfill the requirements of the 7 topics in issue https://github.com/ArcGIS/geosaurus/issues/4798

    The attached CSV file is to be used in Part 4.

    Resolves https://github.com/ArcGIS/geosaurus/issues/4798

  • New guide series for `arcgis.widgets` module

    New guide series for `arcgis.widgets` module

    All chapters required by https://github.com/ArcGIS/geosaurus/issues/6846 except for Part 6 are listed here. Part 6 (JupyterLab) does not render maps as expected and hence not to be come with this release.

    Notebooks are placed inside 10-mapping-and-visualization-alt folder. Please feel free to specify a better name if needed. @AtmaMani

    @BP-Ent Can you please do us a big favor by reviewing this guide series? Many thanks!!

  • Add GeoEnrichment Guides - 6 parts

    Add GeoEnrichment Guides - 6 parts

    Add GeoEnrichment Guides in 6 parts per Issue https://github.com/ArcGIS/geosaurus/issues/4006

    1. Introduction to GeoEnrichment
    2. Enriching Study Areas
    3. Exploring Named Statistical Areas
    4. Enriching Data Collections and Spatially Enabled Dataframe
    5. Generating Reports
    6. Standard Geography Queries
  • Electric utility dl sample

    Electric utility dl sample

    <Sample notebook for detection of electric utility features using deep learning>


    Checklist

    Please go through each entry in the below checklist and mark an 'X' if that condition has been met. Every entry should be marked with an 'X' to be get the Pull Request approved.

    • [x] All imports are in the first cell? First block of imports are standard libraries, second block are 3rd party libraries, third block are all arcgis imports? Note that in some cases, for samples, it is a good idea to keep the imports next to where they are used, particularly for uncommonly used features that we want to highlight.
    • [x] All GIS object instantiations are one of the following?
      • gis = GIS()
      • gis = GIS('https://www.arcgis.com', 'arcgis_python', '[email protected]')
      • gis = GIS(profile="your_online_profile")
      • gis = GIS('https://pythonapi.playground.esri.com/portal', 'arcgis_python', 'amazing_arcgis_123')
      • gis = GIS(profile="your_enterprise_portal")
    • [x] If this notebook requires setup or teardown, did you add the appropriate code to ./misc/setup.py and/or ./misc/teardown.py?
    • [x] If this notebook references any portal items that need to be staged on AGOL/Python API playground, did you coordinate with a Python API team member to stage the item the correct way with the api_data_owner user?
    • [x] Code refactored & split out across multiple cells, useful comments?
    • [x] Consistent voice/tense/narrative style? Thoroughly checked for typos?
    • [x] All images used like <img src="base64str_here"> instead of <img src="https://some.url">? All map widgets contain a static image preview? (Call mapview_inst.take_screenshot() to do so)
    • [x] All file paths are constructed in an OS-agnostic fashion with os.path.join()? (Instead of r"\foo\bar", os.path.join(os.path.sep, "foo", "bar"), etc.)
    • [ ] IF YOU WANT THIS SAMPLE TO BE DISPLAYED ON THE DEVELOPERS.ARCGIS.COM WEBSITE, ping @ DavidJVitale so he can add it to the list for the next deploy
  • Image scene classification sample notebook

    Image scene classification sample notebook

    Added Image Scene Classification Sample Notebook for issue https://github.com/ArcGIS/geosaurus/issues/7337.

    Fixed somethings in coastline_classification_using_feature_classifier

  • Added Cloning Content Guide

    Added Cloning Content Guide

    • draft to address cloning content guide 2230
    • please review to see if introduction makes sense - I attempted to put in a caveat about how cloning may not produce a one-to-one transfer (even though in the case of this notebook it did in my testing)
    • I used the pythonapi playground and the geosaurus org. Both sets of items exist in the portals right now. If you want to run the notebook to test the results, perhaps you could create an admin account in geosaurus and run the notebook - to verify and test if the explanations are ok
    • I did not include any real information about related_items()

    Checklist

    Please go through each entry in the below checklist and mark an 'X' if that condition has been met. Every entry should be marked with an 'X' to be get the Pull Request approved.

    • [ ] All imports are in the first cell? First block of imports are standard libraries, second block are 3rd party libraries, third block are all arcgis imports? Note that in some cases, for samples, it is a good idea to keep the imports next to where they are used, particularly for uncommonly used features that we want to highlight.
    • [ ] All GIS object instantiations are one of the following?
      • gis = GIS()
      • gis = GIS('https://www.arcgis.com', 'arcgis_python', '[email protected]')
      • gis = GIS(profile="your_online_profile")
      • gis = GIS('https://pythonapi.playground.esri.com/portal', 'arcgis_python', 'amazing_arcgis_123')
      • gis = GIS(profile="your_enterprise_portal")
    • [ ] If this notebook requires setup or teardown, did you add the appropriate code to ./misc/setup.py and/or ./misc/teardown.py?
    • [ ] If this notebook references any portal items that need to be staged on AGOL/Python API playground, did you coordinate with a Python API team member to stage the item the correct way with the api_data_owner user?
    • [ ] Code refactored & split out across multiple cells, useful comments?
    • [ ] Consistent voice/tense/narrative style? Thoroughly checked for typos?
    • [ ] All images used like <img src="base64str_here"> instead of <img src="https://some.url">? All map widgets contain a static image preview? (Call mapview_inst.take_screenshot() to do so)
    • [ ] All file paths are constructed in an OS-agnostic fashion with os.path.join()? (Instead of r"\foo\bar", os.path.join(os.path.sep, "foo", "bar"), etc.)
    • [ ] IF YOU WANT THIS SAMPLE TO BE DISPLAYED ON THE DEVELOPERS.ARCGIS.COM WEBSITE, ping @ DavidJVitale so he can add it to the list for the next deploy
  •  spatial and temporal distribution of service calls using big data tools

    spatial and temporal distribution of service calls using big data tools

    <insert pull request description here>


    Checklist

    Please go through each entry in the below checklist and mark an 'X' if that condition has been met. Every entry should be marked with an 'X' to be get the Pull Request approved.

    • [x] All imports are in the first cell? First block of imports are standard libraries, second block are 3rd party libraries, third block are all arcgis imports?
    • [x] All GIS object instantiations are one of the following?
      • gis = GIS('https://www.arcgis.com', 'arcgis_python', '[email protected]')
      • gis = GIS(profile="your_online_profile")
      • gis = GIS('https://pythonapi.playground.esri.com/portal', 'arcgis_python', 'amazing_arcgis_123')
      • gis = GIS(profile="your_enterprise_portal")
    • [x] If this notebook requires setup or teardown, did you add the appropriate code to ./misc/setup.py and/or ./misc/teardown.py?
    • [] If this notebook references any portal items that need to be staged on AGOL/Python API playground, did you coordinate with a Python API team member to stage the item the correct way with the api_data_owner user?
    • [x] Code refactored & split out across multiple cells, useful comments?
    • [x] Consistent voice/tense/narrative style? Thoroughly checked for typos?
    • [x] All images used like <img src="base64str_here"> instead of <img src="https://some.url">? All map widgets contain a static image preview? (Call mapview_inst.take_screenshot() to do so)
    • [x] All file paths are constructed in an OS-agnostic fashion with os.path.join()? (Instead of r"\foo\bar", os.path.join(os.path.sep, "foo", "bar"), etc.)
    • [] IF YOU WANT THIS SAMPLE TO BE DISPLAYED ON THE DEVELOPERS.ARCGIS.COM WEBSITE, ping @ DavidJVitale so he can add it to the list for the next deploy
Automatización de procesos geográficos con Python sobre Esri ArcGIS y QGIS.

Algoritmos y Programación GIS con Python by [email protected] Introducción Python es un potente lenguaje de programación interpretado con licencia

Apr 18, 2022
Tool to suck data from ArcGIS Server and spit it into PostgreSQL

chupaESRI About ChupaESRI is a Python module/command line tool to extract features from ArcGIS Server map services. Name? Think "chupacabra" or "Chupa

Mar 27, 2021
Zora is a python program that searches for GeoLocation info for given CIDR networks , with options to search with API or without API
Zora is a python program that searches for GeoLocation info for given CIDR networks , with options to search with API or without API

Zora Zora is a python program that searches for GeoLocation info for given CIDR networks , with options to search with API or without API Installing a

Oct 26, 2021
A simple python script that, given a location and a date, uses the Nasa Earth API to show a photo taken by the Landsat 8 satellite. The script must be executed on the command-line.
A simple python script that, given a location and a date, uses the Nasa Earth API to show a photo taken by the Landsat 8 satellite. The script must be executed on the command-line.

What does it do? Given a location and a date, it uses the Nasa Earth API to show a photo taken by the Landsat 8 satellite. The script must be executed

Apr 28, 2022
An API built to format given addresses using Python and Flask.
 An API built to format given addresses using Python and Flask.

An API built to format given addresses using Python and Flask. About The API returns properly formatted data, i.e. removing duplicate fields, distingu

Feb 27, 2022
Program that shows all the details of the given IP address. Build with Python and ipinfo.io API
Program that shows all the details of the given IP address. Build with Python and ipinfo.io API

ip-details This is a program that shows all the details of the given IP address. Build with Python and ipinfo.io API Usage To use this program, run th

Mar 1, 2022
GeoIP Legacy Python API

MaxMind GeoIP Legacy Python Extension API Requirements Python 2.5+ or 3.3+ GeoIP Legacy C Library 1.4.7 or greater Installation With pip: $ pip instal

Feb 7, 2022
Python module to access the OpenCage geocoding API
Python module to access the OpenCage geocoding API

OpenCage Geocoding Module for Python A Python module to access the OpenCage Geocoder. Build Status / Code Quality / etc Usage Supports Python 3.6 or n

Mar 24, 2022
Tile Map Service and OGC Tiles API for QGIS Server

Tiles API Add tiles API to QGIS Server Tiles Map Service API OGC Tiles API Tile Map Service API - TMS The TMS API provides these URLs: /tms/? to get i

Dec 1, 2021
Mmdb-server - An open source fast API server to lookup IP addresses for their geographic location

mmdb-server mmdb-server is an open source fast API server to lookup IP addresses

Mar 21, 2022
This is a simple python code to get IP address and its location using python

IP address & Location finder @DEV/ED : Pavan Ananth Sharma Dependencies: ip2geotools Note: use pip install ip2geotools to install this in your termin

Nov 7, 2021
OSMnx: Python for street networks. Retrieve, model, analyze, and visualize street networks and other spatial data from OpenStreetMap.

OSMnx OSMnx is a Python package that lets you download geospatial data from OpenStreetMap and model, project, visualize, and analyze real-world street

May 14, 2022
Python bindings and utilities for GeoJSON

geojson This Python library contains: Functions for encoding and decoding GeoJSON formatted data Classes for all GeoJSON Objects An implementation of

May 15, 2022
Python interface to PROJ (cartographic projections and coordinate transformations library)
Python interface to PROJ (cartographic projections and coordinate transformations library)

pyproj Python interface to PROJ (cartographic projections and coordinate transformations library). Documentation Stable: http://pyproj4.github.io/pypr

May 18, 2022
Python bindings and utilities for GeoJSON

geojson This Python library contains: Functions for encoding and decoding GeoJSON formatted data Classes for all GeoJSON Objects An implementation of

May 15, 2022
python toolbox for visualizing geographical data and making maps

geoplotlib is a python toolbox for visualizing geographical data and making maps data = read_csv('data/bus.csv') geoplotlib.dot(data) geoplotlib.show(

May 11, 2022
geemap - A Python package for interactive mapping with Google Earth Engine, ipyleaflet, and ipywidgets.
 geemap - A Python package for interactive mapping with Google Earth Engine, ipyleaflet, and ipywidgets.

A Python package for interactive mapping with Google Earth Engine, ipyleaflet, and folium

May 16, 2022
Python interface to PROJ (cartographic projections and coordinate transformations library)
Python interface to PROJ (cartographic projections and coordinate transformations library)

pyproj Python interface to PROJ (cartographic projections and coordinate transformations library). Documentation Stable: http://pyproj4.github.io/pypr

May 18, 2022
Pure Python NetCDF file reader and writer

Pyncf Pure Python NetCDF file reading and writing. Introduction Inspired by the pyshp library, which provides simple pythonic and dependency free data

May 4, 2019