Looking for ideas around uploading data to my arcgis online account. At the moment I have designed a questionnaire and am looking to create a feature service and then have the data populated whilst data is entered in the kobo form online (Enketo). Anyone that has had experience uploading kobo form data to ArcGIS online directly please feel free to comment.
Welcome to the community! Have not used it but there should be a way-out like you pull data to excel power query as outlined in the support article Pulling Data Into Excel Power Query or pulling data to power bi as outlined in the support article Pulling Data Into PowerBI. These two support article should give you some clue on how it’s possible to link data from KoBoToolbox.
It would be great if ArcGIS Online had the same simple add url and enter password details section. But I have not seen that functionality yet. Am remaining hopeful that ArcGIS online developers would work out a option for this as is in PowerBI.
Hi, recently I’ve used a Jupyter Notebook script (Python) to get data from KoBo via API and upload directly to ArcGIS Online using ArcGIS API. Notebooks were hosted and run in the Azure DataBricks but Esri is now offering Jupyter Notebooks too. The benefit of DataBricks was that we could easily add notebooks to a scheduler and run e.g. every hour or day to have near real-time data from KoBo in ArcGIS Online. Very simple and powerful!
I’d really like to learn more about your architecture to implement something similar. Can you share your code, solution or some more technical documentation? Thank you.
import ArcGIS library (unless you’ve already installed it in your cluster) dbutils.library.installPyPI("arcgis","1.6.2")
log in to ArcGIS Online and get the layer you want to update (or create a new one if needed) #connect to GIS from arcgis.gis import GIS from arcgis.features import FeatureLayerCollection gis = GIS(url,user,passwd) item = gis.content.get(uuid) flayer_collection = FeatureLayerCollection.fromitem(item)
Then use HTTP request to get data from Kobo: import requests from requests.auth import HTTPBasicAuth response = requests.get(url, auth=HTTPBasicAuth(user, pwd))
Save the response into a CSV
Call the overwrite() method from AGOL to update the layer: flayer_collection.manager.overwrite('file.csv')
Note: your CSV file from KoBo must match data schema of your feature layer in ArcGIS Online. If this is not the case, you need to manipulate the data before overwriting.
I honestly have no experience in DataBricks but will attempt to follow the steps. Thanks again @janekb. Not sure if possible but would you @janekb be willing to have a zoom call for the steps to follow?
Hi, as a first step I’d suggest getting an environment for hosting Jupyter Notebooks. This can be on you local computer or using one of the cloud platforms. Have a look here: https://www.dataschool.io/cloud-services-for-jupyter-notebook/
Hope that helps!