Skip to content

Commit

Permalink
Merge pull request #5 from Esri/1.9_updates
Browse files Browse the repository at this point in the history
1.9 updates
  • Loading branch information
Zachary-Sutherby committed Aug 17, 2021
2 parents 06b1704 + c358060 commit 1e959e9
Show file tree
Hide file tree
Showing 3 changed files with 382 additions and 111 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"import re\r\n",
"import datetime\r\n",
"import requests\r\n",
"import arcpy\r\n",
"import tempfile\r\n",
"from IPython.display import display\r\n",
"from arcgis.gis import GIS"
Expand Down Expand Up @@ -136,7 +135,7 @@
"source": [
"def update_attachment(url, token, oid, attachment, attachID, keyword):\r\n",
" att_url = '{}/{}/updateAttachment'.format(url, oid)\r\n",
" start, extension = arcpy.os.path.splitext(attachment)\r\n",
" start, extension = os.path.splitext(attachment)\r\n",
"\r\n",
" jpg_list = ['.jpg', '.jpeg']\r\n",
" png_list = ['.png']\r\n",
Expand Down
25 changes: 18 additions & 7 deletions Work with Reports/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,36 @@

ArcGIS Survey123 reports are an effective way to quickly visualize, interpret, and share survey responses. Reports use a template you can personalize, that's applied to your survey results and shared as either a Microsoft Word or PDF document.

It's common to deploy a [webhook](https://doc.arcgis.com/en/survey123/browser/create-surveys/webhooks.htm) as an automated process to create and share reports with survey results. Although, using a third party webhook provider may not be a feasible workflow due to organizational or security policies. This is where the ArcGIS Survey123 module in the ArcGIS API for Python can be used to acheive a similar goal.
There are several ways to create reports from your survey data. The most common method is through the Report panel on the Data tab for your survey on the Survey123 website. Here, you can manage report templates and generate reports in PDF and DOCX format.

This sample notebook demonstrates the following functionality:
You can also use a webhook to trigger a process to create and share reports that contain survey results. A webhook is useful if want the report to be triggered by an action. For example, each time a survey is submitted, a webhook can trigger the Create report module in Integromat to generate a report. For more information, see [Webhooks](https://doc.arcgis.com/en/survey123/browser/create-surveys/webhooks.htm).

Another approach is to run an automated reporting process at regular intervals. For example, you might want to produce a report for all surveys submitted in the past week, month, or quarter. This is where the ArcGIS Survey123 module in the ArcGIS API for Python can be useful: you can set up a script and run it periodically as a scheduled task.

This sample notebook demonstrates ways you can use the ArcGIS Survey123 module to work with reports and covers the following functionality:

- Generate a default report template
- Identify report templates associated with a survey
- Generate a default report template
- Check template syntax
- Associate a report template with a survey
- Estimate credits
- Create sample report
- Generate a single report
- Generate a report as a PDF
- Generate multiple reports
- Generate multiple reports and save to your organization
- List saved reports
- Generate a report with all possible parameters
- Update report template
- List saved reports

**Python notebook** that demonstrates how to automate the process of generating reports.
**Python Notebook** that demonstrates how to automate the process of generating reports.

### Requirements
- Python 3.6+
- Python IDE (ArcGIS Notebooks, Jupyter Notebook, JupyterLab)
- Python IDE (ArcGIS Online notebooks, Jupyter notebook, Notebook Server)
- [ArcGIS API for Python](https://developers.arcgis.com/python/) - this module interacts with your ArcGIS organization

### Usage
- Enter your ArcGIS organization credentials in the GIS connection.
- Enter the item ID of a form item.
- Enter the item ID of a Form item.
- Update the template index with the correct index of your template when generating reports.
Loading

0 comments on commit 1e959e9

Please sign in to comment.