Category Archives: Python Script

Exporting Formhub data to JSON files

Few weeks ago we installed FormHub in one of our servers at ILRI. Formhub is an online system for aggregating ODK data coming from mobile devices. The data is stored in a Mongo Database. Although Formhub provides exporting features to CSV and Excel it does not provide exporting to more interoperable formats like JSON.

I created a small Python program that connects to a Formhub database and extracts survey data into a directory using the Survey ID as filter. Each data submission is exported as a JSON file using the UUID as file name.

You can get it from here