For seamless data analysis, you can leverage the KoBo API to pull your data into other tools for data analysis. This article covers how to connect to the API to pull your data into Excel Power Query.
- Login to your account.
- Next, go to the API for your account by going to either https://kc.humanitarianresponse.info/api/v1 or https://kc.kobotoolbox.org/api/v1/ . Select the URL for the instance in which your account is located.
- Under the Data heading, click on /api/v1/data
4. Click on "GET" and select "xls".
5. This action will download a text file to your computer called "data".
6. Next, locate your project's data structure inside the data file. It will be in the following format: description,id,id_string,title,url
7. To pull the data, take the form URL (in bold in the above example) and replace “?format=xls” to “.xls”. For our example, the URL should now be:
8. Before transitioning over the Excel, make sure that there is a) at least 1 record stored in your data table in KoboToolbox and b) under the Project's settings, set it to "share data publicly".
9. In Excel, click on Data > From Other Sources > From Web and paste your URL. You should now be able to have your dataset in Microsoft Excel.
Updating Data in Microsoft Excel
Once you have synced your KoBoToolbox with your Microsoft Excel through Excel Power Query, you should be able to have the dataset in Microsoft Excel. However, when the KoBoToolbox server is updated (i.e. through new submissions, deletion, amendments) your Microsoft Excel dataset does not get updated automatically. You could do this by refreshing the Excel document. For this you will need to click the Data and then select Refresh All. Any changes made in the KoBoToolbox server will now be manually updated in your Excel dataset. (Please follow this whenever you require an update with your Microsoft Excel dataset)
**Thanks to Awais Awan for writing the initial draft of this post.