A set of Python scripts and notebooks to help administer and configure Workforce projects.

Overview

Workforce Scripts

A set of Python scripts and notebooks to help administer and configure Workforce projects.

Notebooks

Several example Jupyter notebooks are provided to demonstrate some more advanced workflows that are possible via the ArcGIS API for Python and Workforce:

Notebooks used for previous demos are also available:

In addition, we have uploaded our AGOL-compatible notebooks into a publicly accessible group of Hosted Notebooks in ArcGIS Online

Scripts

Supports:

  • Python 3.6+
  • Python API for ArcGIS 1.8.3+

The Workforce team released a new version of the app supporting offline-enabled Projects in July 2020. To work with those projects in Python and deploy the corresponding scripts in this repo, users will need to update their version of the Python API to 1.8.3. This can be downloaded in Conda prior to 1.8.3's official release via:

conda install -c esri/label/prerelease -c esri arcgis

A set of Python scripts using the ArcGIS API for Python v1.8.3+. These scripts support Workforce in both ArcGIS Online and ArcGIS Enterprise.

Note that some may scripts may work with a Python API for ArcGIS version that is less than 1.8.3 but this cannot be guaranteed.

Features

Functionality Script
Create Assignment Types create_assignment_types.py
Import Workers import_workers.py
Import Dispatchers import_dispatchers.py
Create Assignments From CSV create_assignments_from_csv.py
Copy Assignments To Feature Service copy_assignments_to_fs.py
Export Assignments to CSV export_assignments_from_csv.py
Check Assignment Completion Location check_completion_location.py
Delete Assignments delete_assignments.py
Delete Assignment Types create_assignment_types.py
Assignment Monitor (Slack Integration) assignment_monitor.py
Migrate to Version 2 Project migrate_to_v2.py
Reset Stale Workers reset_stale_workers.py
Report Incomplete Assignments with Work Orders report_incomplete_assignments_with_work_orders.py
Report Complete Assignments without Work Orders report_complete_assignments_without_work_orders.py
Create Default Ops Dashboard create_ops_dashboard.py
Create Joined View create_joined_view

Instructions

  1. Install ArcGIS API for Python package via Conda as described here.
  2. Clone or download this repository
  3. In terminal/cmd navigate to the scripts folder
  4. Create Conda environment
    1. Install Anaconda
    2. Run conda env create --file environment.yml to create the virtual environment with the correct dependencies
    3. Run conda activate workforce-scripts to activate the environment
  5. (Optional - dev only) Configure pre-commit to run flake8 linting on pushes
    • pre-commit install --hook-type pre-push

To run in ArcGIS Notebooks:

  1. Visit our AGOL Hosted Notebooks group
  2. Click on "Content"
  3. Choose a notebook you'd like
  4. Click on the thumbnail for "Open Notebook" to open in ArcGIS Notebooks

Resources

Issues

Although we do our best to ensure these scripts and notebooks work as expected, they are provided as is and there is no official support.

If you find a bug, please let us know by submitting an issue.

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Licensing

Copyright 2020 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 file.

Owner
Esri
Esri
A slightly opinionated template for iPython configuration for interactive development

A slightly opinionated template for iPython configuration for interactive development. Auto-reload and no imports for packages and modules in the project.

Seva Zhidkov 24 Feb 16, 2022
Configuration Extractor for EXE4J PE files

EXE4J Configuration Extractor This script helps reverse engineering Portable Executable files created with EXE4J by extracting their configuration dat

Karsten Hahn 6 Jun 29, 2022
Dag-bakery - Dag Bakery enables the capability to define Airflow DAGs via YAML.

DAG Bakery - WIP 🔧 dag-bakery aims to simplify our DAG development by removing all the boilerplate and duplicated code when defining multiple DAG cro

Typeform 2 Jan 08, 2022
Yamale (ya·ma·lē) - A schema and validator for YAML.

Yamale (ya·ma·lē) ⚠️ Ensure that your schema definitions come from internal or trusted sources. Yamale does not protect against intentionally maliciou

23andMe 534 Dec 21, 2022
An application pulls configuration information from JSON files generated

AP Provisioning Automation An application pulls configuration information from JSON files generated by Ekahau and then uses Netmiko to configure the l

Cisco GVE DevNet Team 1 Dec 17, 2021
Python YAML Environment (ymlenv) by Problem Fighter Library

In the name of God, the Most Gracious, the Most Merciful. PF-PY-YMLEnv Documentation Install and update using pip: pip install -U PF-PY-YMLEnv Please

Problem Fighter 2 Jan 20, 2022
Simple dataclasses configuration management for Python with hocon/json/yaml/properties/env-vars/dict support.

Simple dataclasses configuration management for Python with hocon/json/yaml/properties/env-vars/dict support, based on awesome and lightweight pyhocon parsing library.

Teo Stocco 62 Dec 23, 2022
Event Coding for the HV Protocol MEG datasets

Scripts for QA and trigger preprocessing of NIMH HV Protocol Install pip install git+https://github.com/nih-megcore/hv_proc Usage hv_process.py will

2 Nov 14, 2022
Secsie is a configuration language made for speed, beauty, and ease of use.

secsie-conf pip3 install secsie-conf Secsie is a configuration language parser for Python, made for speed and beauty. Instead of writing config files

Noah Broyles 3 Feb 19, 2022
Python Marlin Configurator to make valid configuration files to be used to compile Marlin with.

marlin-configurator Concept originally imagined by The-EG using PowerShell Build Script for Marlin Configurations The purpose of this project is to pa

DevPeeps 2 Oct 09, 2021
Pyleri is an easy-to-use parser created for SiriDB

Python Left-Right Parser Pyleri is an easy-to-use parser created for SiriDB. We first used lrparsing and wrote jsleri for auto-completion and suggesti

Cesbit 106 Dec 06, 2022
Configuration Management for Python ⚙

dynaconf - Configuration Management for Python. Features Inspired by the 12-factor application guide Settings management (default values, validation,

Bruno Rocha 2.8k Jan 06, 2023
KConfig Browser is a graphical application which allows you to modify KDE configuration files found in ~/.config

kconfig_browser KConfig Browser is a graphical application which allows you to modify KDE configuration files found in ~/.config Screenshot Why I crea

11 Sep 15, 2022
Dynamic Django settings.

Constance - Dynamic Django settings A Django app for storing dynamic settings in pluggable backends (Redis and Django model backend built in) with an

Jazzband 1.5k Jan 04, 2023
🤫 Easily manage configs and secrets in your Python projects (with CLI support)

Installation pip install confidential How does it work? Confidential manages secrets for your project, using AWS Secrets Manager. First, store a secr

Candid™️ 63 Oct 30, 2022
Django-environ allows you to utilize 12factor inspired environment variables to configure your Django application.

Django-environ django-environ allows you to use Twelve-factor methodology to configure your Django application with environment variables. import envi

Daniele Faraglia 2.7k Jan 03, 2023
A tool to manage configuration files, build scripts etc. across multiple projects.

A tool to manage configuration files, build scripts etc. across multiple projects.

8 Dec 14, 2022
Chinese-specific configuration to improve your favorite DNS server

Dnsmasq-china-list - Chinese-specific configuration to improve your favorite DNS server. Best partner for chnroutes.

Felix Yan 4.6k Jan 03, 2023
Hydra is a framework for elegantly configuring complex applications

Python Decouple: Strict separation of settings from code Decouple helps you to organize your settings so that you can change parameters without having

Facebook Research 6.6k Jan 04, 2023
A helper for organizing Django project settings by relying on well established programming patterns.

django-configurations django-configurations eases Django project configuration by relying on the composability of Python classes. It extends the notio

Jazzband 955 Jan 05, 2023