{"id":13496004,"url":"https://github.com/Esri/workforce-scripts","last_synced_at":"2025-03-28T17:34:44.710Z","repository":{"id":9340314,"uuid":"61748211","full_name":"Esri/workforce-scripts","owner":"Esri","description":"A set of scripts to help administer Workforce projects. ","archived":false,"fork":false,"pushed_at":"2022-04-27T16:48:43.000Z","size":6669,"stargazers_count":79,"open_issues_count":3,"forks_count":64,"subscribers_count":31,"default_branch":"master","last_synced_at":"2024-08-25T00:56:13.776Z","etag":null,"topics":["data-management","python"],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Esri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-22T20:09:26.000Z","updated_at":"2024-03-12T12:40:44.000Z","dependencies_parsed_at":"2022-08-07T05:00:54.947Z","dependency_job_id":null,"html_url":"https://github.com/Esri/workforce-scripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esri%2Fworkforce-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esri%2Fworkforce-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esri%2Fworkforce-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esri%2Fworkforce-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Esri","download_url":"https://codeload.github.com/Esri/workforce-scripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222402884,"owners_count":16978761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-management","python"],"created_at":"2024-07-31T19:01:40.617Z","updated_at":"2024-10-31T11:30:38.087Z","avatar_url":"https://github.com/Esri.png","language":"Jupyter Notebook","readme":"# Workforce Scripts\nA set of Python scripts and notebooks to help administer and configure Workforce projects.\n\n## Notebooks\n\nSeveral example Jupyter notebooks are provided to demonstrate some more advanced workflows that are possible via the ArcGIS API for Python and Workforce:\n- [1 - Configuring a Project](notebooks/examples/1%20-%20Configuring%20a%20Project.ipynb)\n- [2 - Importing Assignments](notebooks/examples/2%20-%20Importing%20Assignments.ipynb)\n- [3 - Assigning Work](notebooks/examples/3%20-%20Assigning%20Work.ipynb)\n- [4 - Optimally Creating and Assigning Work Orders Based on Routes](notebooks/examples/4%20-%20Optimally%20Creating%20and%20Assigning%20Work%20Orders%20Based%20on%20Routes.ipynb)\n\nNotebooks used for previous demos are also available:\n- [UC 2018](notebooks/UC_2018)\n- [Dev Summit 2019](notebooks/dev_summit_2019)\n- [UC 2019](notebooks/UC_2019)\n- [Dev Summit 2020](notebooks/dev_summit_2020)\n\nIn addition, we have uploaded our AGOL-compatible notebooks into a publicly accessible [group of Hosted Notebooks in ArcGIS Online](https://arcgis.com/home/group.html?id=c1695c0c2f9945a8a7fee7dd106c74ae)\n\n## Scripts\n\nSupports:\n- Python 3.6+\n- Python API for ArcGIS 1.8.3+\n\nThe Workforce team released a new version of the app supporting offline-enabled Projects in July 2020. To work with\nthose projects in Python and deploy the corresponding scripts in this repo, users will need to update their version\nof the Python API to 1.8.3. This can be downloaded in Conda prior to 1.8.3's official release via:\n\n`conda install -c esri/label/prerelease -c esri arcgis`\n\nA set of Python scripts using the [ArcGIS API for Python v1.8.3+](https://developers.arcgis.com/python/).\nThese scripts support Workforce in both ArcGIS Online and ArcGIS Enterprise.\n\nNote that some may scripts may work with a Python API for ArcGIS version that is less than 1.8.3 but this cannot \nbe guaranteed.\n\n### Features\n\n| Functionality                                                        | Script                                                                            \n|----------------------------------------------------------------------|----------------------------------------------------------------------------------------|\n| [Create Assignment Types ](readmes/create_assignment_types.md)               | [create_assignment_types.py](scripts/create_assignment_types.py)              |\n| [Import Workers](readmes/import_workers.md)                                  | [import_workers.py](scripts/import_workers.py)                       |\n| [Import Dispatchers](readmes/import_dispatchers.md)                          | [import_dispatchers.py](scripts/import_dispatchers.py)\n| [Create Assignments From CSV](readmes/create_assignments_from_csv_readme.md) | [create_assignments_from_csv.py](scripts/create_assignments_from_csv.py)          |\n| [Copy Assignments To Feature Service](readmes/copy_assignments_to_fs_readme.md) | [copy_assignments_to_fs.py](scripts/copy_assignments_to_fs.py)                  |\n| [Export Assignments to CSV](readmes/export_assignments_to_csv_readme.md)     | [export_assignments_from_csv.py](scripts/export_assignments_from_csv.py)          |\n| [Check Assignment Completion Location](readmes/check_completion_location.md)         | [check_completion_location.py](scripts/check_completion_location.py)            |\n| [Delete Assignments](readmes/delete_assignments_readme.md)                   | [delete_assignments.py](scripts/delete_assignments.py)          |                   |\n| [Delete Assignment Types ](readmes/delete_assignment_types.md)               | [create_assignment_types.py](scripts/create_assignment_types.py)              |\n| [Assignment Monitor (Slack Integration)](readmes/assignment_monitor.md)                           | [assignment_monitor.py](scripts/assignment_monitor.py) |\n| [Migrate to Version 2 Project](readmes/migrate_to_v2.md) | [migrate_to_v2.py](scripts/migrate_to_v2.py) |\n| [Reset Stale Workers ](readmes/reset_stale_workers.md)               | [reset_stale_workers.py](scripts/reset_stale_workers.py)              |\n| [Report Incomplete Assignments with Work Orders ](readmes/report_incomplete_assignments_with_work_orders.md)               | [report_incomplete_assignments_with_work_orders.py](scripts/report_incomplete_assignments_with_work_orders.py)    \n| [Report Complete Assignments without Work Orders](readmes/report_complete_assignments_without_work_orders.md)               | [report_complete_assignments_without_work_orders.py](scripts/report_complete_assignments_without_work_orders.py)    \n| [Create Default Ops Dashboard](readmes/create_ops_dashboard.md)              | [create_ops_dashboard.py](scripts/create_ops_dashboard.py)|\n| [Create Joined View](readmes/create_joined_view.md) | [create_joined_view](scripts/create_joined_view.py) |\n\n### Instructions\n\n\n1. Install ArcGIS API for Python package via Conda as described [here](https://developers.arcgis.com/python/guide/install-and-set-up/).\n2. Clone or download this repository\n3. In terminal/cmd navigate to the `scripts` folder\n4. Create Conda environment\n   1. Install Anaconda\n   2. Run `conda env create --file environment.yml` to create the virtual environment with the correct dependencies\n   3. Run `conda activate workforce-scripts` to activate the environment\n5. (Optional - dev only) Configure pre-commit to run flake8 linting on pushes\n   * `pre-commit install --hook-type pre-push`\n\nTo run in ArcGIS Notebooks:\n1. Visit our [AGOL Hosted Notebooks group](https://arcgis.com/home/group.html?id=c1695c0c2f9945a8a7fee7dd106c74ae#overview)\n2. Click on \"Content\"\n3. Choose a notebook you'd like\n4. Click on the thumbnail for \"Open Notebook\" to open in ArcGIS Notebooks\n\n## Resources\n\n * [ArcGIS API for Python](https://developers.arcgis.com/python)\n * [Workforce for ArcGIS](http://www.esri.com/products/workforce-for-arcgis)\n * [Usecases for the Workforce Python module](https://www.esri.com/arcgis-blog/products/workforce/field-mobility/automate-workforce-with-arcgis-api-for-python/)\n * [Scheduling Workforce Python scripts with Windows Task Scheduler](https://community.esri.com/groups/workforce-for-arcgis/blog/2020/05/14/schedule-tasks-for-workforce)\n * [Scheduling Workforce Python scripts in Linux / MacOS](readmes/scheduling_with_python.md)\n\n## Issues\n\nAlthough we do our best to ensure these scripts and notebooks work as expected, they are provided as is and there is no official support.\n\nIf you find a bug, please let us know by submitting an issue.\n\n## Contributing\n\nEsri welcomes contributions from anyone and everyone.\nPlease see our [guidelines for contributing](https://github.com/esri/contributing).\n\n## Licensing\n\nCopyright 2020 Esri\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nA copy of the license is available in the repository's\n[LICENSE](LICENSE) file.\n","funding_links":[],"categories":["Jupyter Notebook"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEsri%2Fworkforce-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEsri%2Fworkforce-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEsri%2Fworkforce-scripts/lists"}