New resource available: Stata program for handling ODK forms and data

Hi Sydney,

No, we have not created a video, but there is an extensive help file
available both through GitHub (https://github.com/matthew-white/odkmeta)
and the program's Stata helpfile.

Under the "Examples" section, you will see some lines of code for creating
a new do-file. To do so, you will need to take your xlsform and save your
survey and choices worksheets as individual csv files, and to have your
data csv files ready as well.

Let me know if you have any particular questions.

Lindsey

··· On Tue, Aug 5, 2014 at 10:34 AM, Sydney Rodney Lungu <sydneyrodney@gmail.com wrote:

Hi all,

Is there a short video that explains the steps/how this is done? if so,
can one share the video.

On Thursday, June 12, 2014 3:35:43 PM UTC+2, till.be...@gmail.com wrote:

Hi again,

I was able to solve Koens problem for me by making sure that csv files
are separated by comma, not by semicolon. Programs such as German language
excel in my case use semicolon delimiter as default. I needed to change
region settings to US to produce a comma separated csv, which is now
accepted by odkmeta!

Best Till

Am Mittwoch, 9. April 2014 19:29:23 UTC+2 schrieb Lindsey Shaughnessy:

Hi Koen,

Thanks for letting us know you're facing this issue.

odkmeta is written to read csv files, rather than xlsforms with
multiple worksheets. Can you save your choices and survey worksheets as
individual csvs, and then try running odkmeta? Let me know if that doesn't
solve your problems.

Lindsey

On Wed, Apr 9, 2014 at 12:11 PM, Koen koen.l...@gmail.com wrote:

Lindsey,
This looks really interesting. However, I have not yet gotten it to
work. With every xlsform I've tried so far, odkmeta throws back "column
header type not found, invalid type() suboption, invalid survey() option"
at me. But it's there. Has this issue been noticed before?

The command I've issued looks like this:
odkmeta using test.do, csv(CSV) survey(XL) choices(XL)
Where CSV is the exact path to the CSV datafile, and XL is the path to
the XLSForm. I've tried making the type heading explicit by including the
,type(type) suboption, but it didn't work.

Is this some known issue, or would you need some further information
from my part?
Koen

Koen

On Wednesday, January 15, 2014 4:40:42 PM UTC+1, Lindsey Shaughnessy wrote:

Hi Mitch,

Of course. You can find links to the program itself, to the helpfile,
and to sample data/files here: http://econpapers.repec.
org/software/bocbocode/S457767.htm.

I'm also attaching a pdf of the program's Stata helpfile, up-to-date as
of 2014-01-13.

Glad to hear there are many Stata and ODK users!

Lindsey

On Tue, Jan 14, 2014 at 6:41 PM, Mitch Sundt mitche...@gmail.com wrote:

Hi LIndsey,

Do you have a link to this documentation? I would love to add an entry
under the Help section, as many other groups are interested in using ODK
with Stata.

Mitch

On Tue, Jan 14, 2014 at 1:45 PM, Lindsey Shaughnessy < lshaug...@poverty-action.org> wrote:

Dear Stata users of the ODK community,

IPA is happy to announce that odkmeta v1.1 is now publicly available on
SSC! In Stata, simply type the command -ssc install odkmeta- to install the
program.

What does -odkmeta- do? In a nutshell/as a reminder, -odkmeta-
automatically generates a do-file to clean and merge your raw Open Data Kit
data. More specifically, -odkmeta- creates a do-file to import ODK
data, using the metadata from the survey and choices worksheets of
the XLSForm. The do-file completes the following tasks in order:
imports lists as value labels; adds other values to value labels;
imports field attributes as characteristics; splits select_multiple
variables; drops note variables; formats date, time, and datetime
variables; attaches value labels; attaches field labels as variable labels
and notes; and merges repeat groups.

The help file is extensive, but questions, concerns, and
suggestions may be sent directly to my email address.

Thanks again to all who helped test the program,
Lindsey, Matt and IPA

On Fri, Dec 20, 2013 at 11:46 AM, Lindsey Shaughnessy < lshaug...@poverty-action.org> wrote:

Hi ODK Community,

At IPA, our statistical package of choice is Stata -- and,
increasingly, our survey platform of choice is ODK. So, we've written a
Stata program, called -odkmeta-, that reads your xlsform in order to
automatically generate a Stata do-file that produces one very clean,
well-labeled, analysis-ready Stata dataset -- even if you are using repeat
groups.

Why are we messaging this group? If you are an ODK and Stata user, we'd
love for you to test -odkmeta- before we publicly release the program!

More specifically on the program's functionality, -odkmeta- reads the
survey and choices worksheets of your xlsform and generates a do file
which:

    o Imports lists as value labels
    o Adds other values to value labels








    o Imports ODK field attributes as characteristics








    o Splits select_multiple variables
    o Drops note variables

    o Formats dates, time, and datetime variables
    o Attaches field labels as variable labels and notes








    o Attaches value labels
    o Merges repeat groups

After select_multiple variables have been split, tasks can be removed
from the do-file without affecting other tasks. User-written supplements to
the do-file may make use of any field attributes, which are imported as
characteristics. An extensive Stata help file outlines simple adjustments
that you, as the end-user, can make to the resulting do-file in case of
errors related to non-ODKstandard csv data files (e.g. varying date-time
formats). We are also hoping to further improve the program's help file
through our interactions with you.

Please see attached for a package of files that demonstrate -odkmeta-
functionality: an example xlsform, dummy csv data files, the Stata do-file
automatically generated by -odkmeta-, and the Stata dataset that was
created by this do-file. The program itself, and the help file, are also
included, so that you can run the program yourself on your own forms and
data.

We have extensively tested -odkmeta- and intend to release it publicly
on SSC in January, but are first looking to see how well the program works
with any additional real-world forms we can, especially if those forms are
complex. Please feel free to email me directly if you have trouble running
the program, if you discover any bugs, or if you would like some assistance
modifying your do-file. And please also email me directly if you are able
to successfully run the program!

And finally, a preemptive statement. Here are some things we don't
intend to do, at least at the moment: write a similar program that reads
XML rather than XLSForms; write a similar program for R or SPSS; or
overhaul the program to handle ever-changing quirks of the way
certain ODK-based services handle output csv data (e.g. Formhub's n/a
values). If you are looking to automatically generate Stata do-files from
your XML (or from your XLSForm, and for other great features), we recommend
you set up an account with SurveyCTO.

Thanks in advance for helping us to complete our final tests of
-odkmeta-!

Lindsey, Matt, and IPA

--
Lindsey Shaughnessy
Data Coordinator
Innovations for Poverty Action

--
Lindsey Shaughnessy
Data Coordinator
Innovations for Poverty Action

Mobile: +1 508 932 6435

Skype: lindsey.shaughnessy

Email: lshaug...@poverty-action.org

--

--

Post: opend...@googlegroups.com

Unsubscribe: opendatakit...@googlegroups.com

Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups "ODK Community" group.

To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
Mitch Sundt
Software Engineer
University of Washington
mitche...@gmail.com

--

--

Post: opend...@googlegroups.com

Unsubscribe: opendatakit...@googlegroups.com

Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups "ODK Community" group.

To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
Lindsey Shaughnessy
Data Coordinator
Innovations for Poverty Action

Mobile: +1 508 932 6435

Skype: lindsey.shaughnessy

Email: lshaug...@poverty-action.org

--

--

Post: opend...@googlegroups.com

Unsubscribe: opendatakit...@googlegroups.com

Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups "ODK Community" group.

To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
Lindsey Shaughnessy
Data Coordinator
Innovations for Poverty Action

Mobile: +1 508 932 6435
Skype: lindsey.shaughnessy

Email: lshaug...@poverty-action.org

--
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Lindsey Shaughnessy
Data Coordinator
Innovations for Poverty Action

Mobile: +1 508 932 6435
Skype: lindsey.shaughnessy
Email: lshaughnessy@poverty-action.org

Hi Andeeb,
I tried your fix on my similar problem but it didn't work. I used Kobotoolbox and not ODK Aggregate and I'm not sure the same fix works. Did you ever figure out a more generic solution that I could try?

(I posted my code and more explanation of the error as a new post for more detail)

Thanks!
-Kate

Dear Kate,

Unfortunately, no, I never did figure out a more generic solution.

Good luck!

Did you ever figure this out? I get the error "column header type not found" rather than list name... my column header is already named type so not sure what to do.

6 posts were split to a new topic: Odkmeta: “column header type not found”

9 posts were split to a new topic: Odkmeta input csv format

We're glad that folks continue to find odkmeta helpful! If you have a new question about odkmeta, please ask it in a new thread: that helps the threads stay organized. Of course, feel free to link to this thread in your new thread!