Forms from the field were received at the In Take Section
Early in 2014, the Libyan government held a national election to select 60 representatives tasked with drafting a foundational constitution for the country. This was an enormous effort for a shaky new democracy in a country twice the size of Texas, 90% of which is sparsely populated desert with limited resources and power. To overcome these obstacles, Ona worked with the United Nations Development Program (UNDP) and the Libyan High National Election Commission (HNEC) on a voting process involving paper votes that were digitized and aggregated during the tallying.
With input from UNDP and HNEC, Ona designed and built Tally-Ho, a robust, open-source tallying application used for supporting accurate, secure and timely elections. The application was successfully used to enter thousands of results from polling stations around the country and around the world, aggregating results and producing final counts in just 7 days.
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.
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!
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!
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.
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.