Dynamically populate choice lists with CSV data


In the last blog post Pull CSV data into your forms, we showed you how to pull data from a previous survey into your new survey using CSV files. Another application of this feature is to pull select_one or select_multiple choice lists from CSV files.

See the example below and the explanation that follows:

XLSForm survey sheet

type name label appearance
select_multiple fruits fruit Which fruits do you like? search('fruit_choices')

XLSForm choices sheet

list name name label
fruits fruit_name fruit_label

CSV file named 'fruit_choices' uploaded to the Media section of your survey

fruit_name fruit_label
apple Apple
mango Mango
pineapple Pineapple
watermelon Watermelon

You can take a look at this XLSForm here and the example CSV file here. If you download these files to try on your own, make sure you download them in Excel and CSV formats, respectively.

 Continue reading Dynamically populate choice lists with CSV data...

Pull CSV data into your forms


We have a new feature that we are sure will make data collection easier. It is now possible to pull existing survey data into your forms on the Ona Platform using CSV files.

What does this mean?

Say you have data from a previous survey, such as a baseline survey of members in each household in a village. After the baseline survey ended, you exported this data in CSV format, and it’s sitting on your computer. You now want to go back to the same village and conduct another survey, such as a Vitamin A coverage survey. When visiting each household, you would like to know how many children in this household are under 5 years of age, because they are eligible to receive Vitamin A. Using the pull CSV data feature, you can actually pull that information from your baseline survey and display it in the Vitamin A survey form. You can now conduct your survey with confidence, knowing you are capturing every eligible child from your baseline survey!

 Continue reading Pull CSV data into your forms...

Starting Ona


Starting Ona main graphic
Ona Nairobi's mascot and destroyer of dog beds, Mali

We started Ona six months ago and it’s been quite the ride so far. Since launching, we’ve completed a few cool projects, which we'll be posting soon to the website. A major success was building the vote tallying system used in Libya's elections. We've also added key new hires to a growing amazing team. We’re just now catching our breath, so we’re taking a minute to say hello world!

 Continue reading Starting Ona...

Automated Infrastructure with Pallet and Clojure


At Ona we are rebuilding our data management platform. We are starting with a light weight front-end that will serve up content pulled from the REST API of our current application. We are aiming to have the back-end in Clojure, the front-end in ClojureScript, and the infrastructure in Clojure using Pallet. We are excited to have a single (and a great) language handle all of these responsibilities.


We are still at a very early stage but we are a distributed team and like to have our apps on development boxes as we go. This allows us to share a common reference point, give mini-demos, and QA each other’s changes. Like Fabric for Python and Capistrano for Ruby, Pallet let’s us do quick deploys of the latest master or branch code.

Even better, Pallet let’s us write Clojure to bring up new clusters, similarly to Puppet, Chef, or Ansible – but in Clojure. We deploy to EC2 on AWS and are glad to avoid spending time mucking around in the AWS GUI. A succinct pallet file specifies the instance, the web application, and the deployment. Putting the current code online and bringing up a server (if one doesn’t already exist) is a single command:

lein do uberjar, with-profile +pallet pallet up --phases install,configure,deploy

This tells Leiningen to first create an uberjar, which puts all of our app’s dependencies in a single jar file. It then uses the pallet profile to install, configure, and deploy our application. This command is idempotent, making it easy to push the latest jar up.

A nuance we did not anticipate is that you cannot output logs to stdout in a Jetty app. This is not particularly surprising, but using stdout was a development configuration that we had not yet bothered to abstract.

For now we are handling this with the below middleware wrapper:

(defn wrap-with-logger [handler verbose?]
  (if verbose?
      (logger/wrap-with-logger handler "/dev/stdout")
          (fn [request] (handler request))))

This does the normal logging if verbose? is true and otherwise does nothing. When you run lein ring server-headless a handler is called which sets verbose? to true. When you run the app through java -jar ..., as in our pallet configuration, verbose? is set to false.

The ona-viewer project is a work-in-progress and we would welcome any feedback. Check it out on github.

NYC to Nairobi: Great Ideas and Good Times!



We just had an exciting week at the Nairobi office. The New York team came down to build our synergies, share ideas, feast on ugali and spot some game. Top of the agenda was redesigning Ona's user interface and adding new functionality for our enterprise users. We're excited about the updated user interface that will make it easier to manage, visualize and share your data. Expect to see new additions to Ona in the next few months! Here are a few highlights from the trip:

 Continue reading NYC to Nairobi: Great Ideas and Good Times!...