
- #Getting started with arcgis file download how to
- #Getting started with arcgis file download install
- #Getting started with arcgis file download update
- #Getting started with arcgis file download code
- #Getting started with arcgis file download Offline
#Getting started with arcgis file download code
Notebooks are useful for visualizing data and running code step by step. Note: We will be using Jupyter notebooks to complete the remaining tasks within this workflow. Once this script has been run, check that your tree inspectors have been successfully added to your project (shown below).

#Getting started with arcgis file download Offline
If you are working with projects enabled for offline use (a v2 project), the Project ID is the item ID of the Workforce feature service. Note: If you are working with a Classic project (a v1 project), the Project ID is the item ID of the project item.
#Getting started with arcgis file download update
Make sure you update the following fields with your own information: sample_data/tree_inspectors.csv -project-id -title-field title -contact-number-field contactNumber Python import_workers.py -u -p -org -name-field name -status-field status -user-id-field userId -log-file log.txt -csv-file. In the terminal or command prompt, run the import workers script: Check out the import_workers readme for more information. Note: This script has many options allowing the user to specify the names of each column within the CSV. Open this file and edit the name and userID columns with the information of at least four workers within your organization. Their name, working status, title, contact number, and user ID will all be passed through the script. There are 5 tree inspectors that will be imported into the project. This is the CSV file that you downloaded earlier: We will use the import_workers script to import a CSV file of tree inspectors into this scenario's Workforce project. Rather than input your workers one by one in the Workforce app, you can run this single line of code instead. This script is especially useful for importing a large number of workers into a project. The import_workers Python script allows you to import workers directly from a CSV file. Once you've created and activated the environment, you are ready to use the Workforce scripts. Note: To automate Workforce projects, you must use ArcGIS API for Python 1.8.3 or later.
#Getting started with arcgis file download install
Run the following command in either a Python script or Python console to create the virtual environment with the correct dependencies and to install ArcGIS API for Python 1.8.3: conda env create -file environment.yml Once it's downloaded, navigate to the “workforce-scripts” folder in either the terminal or the command prompt. A Windows operating system is used for this example.Ĭd C: \Users\user\Desktop\workforce-scripts Download Workforce scriptsįirst, clone or download the workforce-scripts GitHub repository This contains the Python scripts for Workforce as well as the version of the Python API needed to automate Workforce projects.

You will import the company’s workers, create assignments based on a feature layer containing the trees, and assign inspections to workers based on the zone that each worker oversees. You will use ArcGIS API for Python to configure a Workforce project for the company. The city has hired a tree risk assessment company to perform these inspections. These trees are in heavily developed areas, so it’s crucial that they be professionally inspected. In this scenario, the city of Atlanta has identified 24 trees that are at risk of falling.

Note: If you don't have an ArcGIS account, you can sign up for a free trial.

#Getting started with arcgis file download how to
This first blog is a step-by-step tutorial that will teach you how to configure a Workforce project and create assignments. Whether you are setting up your first Workforce project, cleaning out a project with hundreds of old assignments, or trying to find new ways to improve your organization’s efficiency – the Python API will be a powerful addition to your geospatial arsenal. We are constantly creating new scripts that simplify app-based workflows into just a few lines of code. The Workforce module within ArcGIS API for Python makes managing Workforce projects a simple and efficient task. Welcome to the first in a series of blog posts that will teach you how to automate key workflows for Workforce for ArcGIS.
