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.
Have a great day!
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.
Thanks again for providing feedback on this Kal.
Though we do not offer support on ArcGIS, I would suggest that you look at the following articles and see if they fit the purpose you need
Once you figure out the ArcGIS component, we can then look at the KoBoToolbox component.
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!
Thank you for sharing this with the entire community! This should help a lot of our community users!
Expecting your knowledge and expertise in the upcoming days as well.
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.
Sure. Basically you need to:
set up a new Notebook in DataBricks
import ArcGIS library (unless you’ve already installed it in your cluster)
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:
from requests.auth import HTTPBasicAuth
response = requests.get(url, auth=HTTPBasicAuth(user, pwd))
Save the response into a CSV
overwrite() method from AGOL to update the layer:
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.
Hope that helps!
Thanks @janekb for the amazing share
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!