This article describes how to set up a data pipeline to pull records from an ActivityInfo Form into an ArcGIS Online feature layer integration using ActivityInfo's GeoJSON API.
ActivityInfo makes it easy to collect and visualize data using built-in mapping reports. However, there may come a time when you need to connect this data to a fully-featured GIS solution, such as ArcGIS Online.
To integrate geospatial information from ActivityInfo into ArcGIS Online, you need to activate an API token, and export the data from an ActivityInfo Form through GeoJSON API. Then you can follow the ArcGIS data pipeline workflow, and set up recurring imports.
Let’s get started!
- Open ActivityInfo.
- Click on the user profile and select “Account settings.”
- Select “API tokens” on the left navigation panel.
- Click “Add.”
- Give the token a name by filling in the Label field, and selecting “Read-only.”
- Click “Generate.”
- Copy the API token by clicking “Copy to clipboard.” Once you leave this page, you are no longer able to see or copy the token!
We strongly recommend that you copy and paste the API token into a note or file.
- Navigate to the ActivityInfo Form that contains the geospatial data you need enhanced visualization for.
If you do not yet have a Form, consider creating a Form from the IDP Response template.
- Select “Export” from the toolbar and select “Query as GeoJSON”.
If the “Export” tool is grayed out, that means you do not have the proper permission to complete this process. Contact your Database administrator.
- Copy the URL.
We recommend that you copy and paste the URL into a note or file, along with the API token.
- In a different browser tab, open ArcGIS Online.
- Switch to “Data pipelines” from the “Administrative view.”
- In the upper right corner, click “Create data pipeline.”
- On the “Inputs” side panel, choose the source type of the data you wish to import. In this case, select “Public URL.”
Fill out the values in the “Add a URL” pop-up window:
URL: paste the URL you exported from the ActivityInfo Form, type in
&token=
and paste the API token.Data format: select GeoJSON
The following is an example of a URL with the token included:
https://www.activityinfo.org/resources/form/c6rj4t3m4im9w0pc/query/points?x=cjy6ueyldty0z8437.cgf3teldtduxedw.longitude&y=cjy6ueyldty0z8437.cgf3teldtduxedw.latitude&token=57cd7ff6696c7be1870637e32e129912
- Click “Preview.”
The geospatial data is imported as a table.
If you get the “Failed to connect to the URL” due to “401 Unauthorized_”_ error message, then go back to step 14 and check if you correctly added the API token to the URL as well.
- Select Geometry type: Point.
- On the left side panel, click “Outputs” and select “Feature layer.”
- Connect the “points” box to the “Create” feature layer box using the drag & drop method.
- Name the Output on the right side panel under “Output settings.”
- Click “Run” and wait for the interface to load.
The feature layer is created.
Now you have the option to set up a scheduled, automated data import for this feature layer. To do so, follow these steps:
Change the following on the right side panel:
Output method to “Add and update” on the right side panel under “Output settings”
Select “_id” under “Select field”
Save your changes on the left side panel by clicking “Save and open” and selecting “Save as.”
Click “Schedule” on the left side panel, then select “Create task.”
Set the following parameters on the “Create task” pop-up window:
Title of the task
Time interval under “Repeat type.” For example, select Week > Friday> 6PM to set up a recurring data import for every Friday EoB repeating until the end of time.
- Click “Save.”
Success, the integration process is complete, and the feature layer in ArcGIS is automatically updated with the most recent data in your ActivityInfo Form.
To display the feature layer on a map in ArcGIS, you can navigate to the Map view, add the feature layer and style the attributes to your liking.
Sync to ArcGIS Desktop version
To synchronize the feature layer from the from ArcGIS Online to the desktop version, we recommend that you follow these steps:
- Open the ArcGIS desktop app.
- Log in with your company account.
- Sync the data from SaaS to the desktop version.
Related articles:
- Personal API tokens
- ArcGIS Online Help (external link)
- ArcGIS Data Pipelines (external link)