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

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

odkmeta beta.zip (62 KB)

··· -- Lindsey Shaughnessy Data Coordinator Innovations for Poverty Action
1 Like

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 < lshaughnessy@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: lshaughnessy@poverty-action.org

Hello
I used ODKmeta and it works fine. But I have a problem. When I extract data using ODKmeta, it creates 3 separate files. 2 for multiple sections and 1 for all single data. The problem is I want to merge these 3 files in 1 file. I used PARENT_KEY as unique ID but it does not work.

Is there any way to merge these files????

That's one of my project -- still work in progress but happy to get
feedback if any

Best,
Edouard

··· Le vendredi 20 décembre 2013 18:46:59 UTC+2, Lindsey Shaughnessy a écrit : > > 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 > >
1 Like

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 < lshaughnessy@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 < lshaughnessy@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: lshaughnessy@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/groups/opt_out.

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

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

odkmeta helpfile.pdf (23.8 KB)

··· On Tue, Jan 14, 2014 at 6:41 PM, Mitch Sundt 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 < lshaughnessy@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 < lshaughnessy@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: lshaughnessy@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/groups/opt_out.

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

--

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/groups/opt_out.

--
Lindsey Shaughnessy
Data Coordinator
Innovations for Poverty Action

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

Dear Lindsey,

I don't know if this is the right place to post this particular problem
(apologies Yaw if it isn't), but my thinking is that odkmeta has great
potential and this problem is really a vexing one.

I have manage to successfully create a do-file for STATA using odkmeta but
the run breaks every time it comes to the following:

  • Duplicate variable name with grp_hh_mem-grp_hhmem_brk-totalchild_6to18
    . local pos : list posof "grp_hh_mem-grp_hhmem_brk-totalchild_below6" in
    fields

. local var : word pos' of all'
invalid syntax
r(198);

end of do-file

r(198);

As far as I can tell this happens for every variable name which exceeds the
32 character limit. I have perused the help file that came with odkmeta and
it seems that the way that odkmeta handles naming of variables in nested
group creates this particular type of command sequence each time (pulled
from the do-file)

··· ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ * totalchild_below6 * Duplicate variable name with grp_hh_mem-grp_hhmem_brk-totalchild_6to18 local pos : list posof "grp_hh_mem-grp_hhmem_brk-totalchild_below6" in fields local var : word `pos' of `all' char `var'[Odk_name] totalchild_below6 char `var'[Odk_bad_name] 1 char `var'[Odk_group] grp_hh_mem grp_hhmem_brk char `var'[Odk_long_name] grp_hh_mem-grp_hhmem_brk-totalchild_below6 char `var'[Odk_type] integer char `var'[Odk_or_other] 0 char `var'[Odk_is_other] 0 char `var'[Odk_label] A17. Number of children in HH under age 6

Another Example:

  • gr_who_ecoorn
  • Duplicate variable name with grp_hh_decision_shared-gr_who_ecoland
    local pos : list posof "grp_hh_decision_shared-gr_who_ecoorn" in fields
    local var : word pos' of all'
    char var'[Odk_name] gr_who_ecoorn char var'[Odk_bad_name] 1
    char var'[Odk_group] grp_hh_decision_shared char var'[Odk_long_name] grp_hh_decision_shared-gr_who_ecoorn
    char var'[Odk_type] select_one gr_who_list char var'[Odk_list_name] gr_who_list
    char var'[Odk_or_other] 0 char var'[Odk_is_other] 0
    char `var'[Odk_label] A25.13 Purchase/selling of ornaments

Given how many nested groups we have in this survey okdmeta creates this
type of command sequence many many times.

Can you suggest a workaround?

Warm Regards
Adeeb Choudhury

(again, apologies to Yaw if this isn't the right place to post this)

On Wednesday, 15 January 2014 03:45:40 UTC+6, Lindsey Shaughnessy 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 <javascript:>> 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 <javascript:>

For odkmeta questions, submit a GitHub issue at
https://github.com/matthew-white/odkmeta or e-mail
researchsupport@poverty-action.org.

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Sun, Sep 20, 2015 at 5:05 AM, kingkamrul@gmail.com wrote:

Hello
I used ODKmeta and it works fine. But I have a problem. When I extract data using ODKmeta, it creates 3 separate files. 2 for multiple sections and 1 for all single data. The problem is I want to merge these 3 files in 1 file. I used PARENT_KEY as unique ID but it does not work.

Is there any way to merge these files????

--

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.

This is really cool, Edouard! Thanks for sharing.

··· On Thu, May 25, 2017 at 9:10 AM, wrote:

That's one of my project -- still work in progress but happy to get
feedback if any

Best,
Edouard

Le vendredi 20 décembre 2013 18:46:59 UTC+2, Lindsey Shaughnessy a écrit :

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

--
--
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.

HI Lindsey Shaughnessy
I use both ODK and STATA on a daily basis
am not seeing the attached package would really love to try it out.

Thanks
Ayoub

··· On 25 May 2017 at 17:10, wrote:

That's one of my project -- still work in progress but happy to get
feedback if any

Best,
Edouard

Le vendredi 20 décembre 2013 18:46:59 UTC+2, Lindsey Shaughnessy a écrit :

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

--
--
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.

--
**In sun set years education is not associated with standard of living and
medical care access; it is the the financial myosin and actin!!!

**** Don't give me fish, teach me how to fish

Kayoub K
0772656158 / 0703516660
Data Manager
Mujhu Research Collaboration
Mulago Hosp
Msc Enterprise Architecture

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 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: 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

Dear All,

I must thank Lindsey for her suggestion:

The problem that was breaking the do-file run was quite simple: ODK
Aggregate exports the csv file with ":" instead of "-" when naming the
nested groups-- the solution, as suggested by Lindsey was to do a simple
find/replace and run it again.

Its working now!

Warm Regards
Adeeb

··· On Sunday, 4 May 2014 15:42:52 UTC+6, Adeeb Choudhury wrote: > > Dear Lindsey, > > I don't know if this is the right place to post this particular problem > (apologies Yaw if it isn't), but my thinking is that odkmeta has great > potential and this problem is really a vexing one. > > I have manage to successfully create a do-file for STATA using odkmeta but > the run breaks every time it comes to the following: > > * Duplicate variable name with grp_hh_mem-grp_hhmem_brk-totalchild_6to18 > . local pos : list posof "grp_hh_mem-grp_hhmem_brk-totalchild_below6" in > fields > > . local var : word `pos' of `all' > invalid syntax > r(198); > > end of do-file > > r(198); > > > As far as I can tell this happens for every variable name which exceeds > the 32 character limit. I have perused the help file that came with odkmeta > and it seems that the way that odkmeta handles naming of variables in > nested group creates this particular type of command sequence each time > (pulled from the do-file) > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > * totalchild_below6 > * Duplicate variable name with grp_hh_mem-grp_hhmem_brk-totalchild_6to18 > local pos : list posof "grp_hh_mem-grp_hhmem_brk-totalchild_below6" in > fields > local var : word `pos' of `all' > char `var'[Odk_name] totalchild_below6 > char `var'[Odk_bad_name] 1 > char `var'[Odk_group] grp_hh_mem grp_hhmem_brk > char `var'[Odk_long_name] grp_hh_mem-grp_hhmem_brk-totalchild_below6 > char `var'[Odk_type] integer > char `var'[Odk_or_other] 0 > char `var'[Odk_is_other] 0 > char `var'[Odk_label] A17. Number of children in HH under age 6 > > Another Example: > > * gr_who_ecoorn > * Duplicate variable name with grp_hh_decision_shared-gr_who_ecoland > local pos : list posof "grp_hh_decision_shared-gr_who_ecoorn" in fields > local var : word `pos' of `all' > char `var'[Odk_name] gr_who_ecoorn > char `var'[Odk_bad_name] 1 > char `var'[Odk_group] grp_hh_decision_shared > char `var'[Odk_long_name] grp_hh_decision_shared-gr_who_ecoorn > char `var'[Odk_type] select_one gr_who_list > char `var'[Odk_list_name] gr_who_list > char `var'[Odk_or_other] 0 > char `var'[Odk_is_other] 0 > char `var'[Odk_label] A25.13 Purchase/selling of ornaments > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > > Given how many nested groups we have in this survey okdmeta creates this > type of command sequence many many times. > > Can you suggest a workaround? > > Warm Regards > Adeeb Choudhury > > (again, apologies to Yaw if this isn't the right place to post this) > > On Wednesday, 15 January 2014 03:45:40 UTC+6, Lindsey Shaughnessy 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 >> >

Hi everyone,

Thanks for all of your (mostly private) feedback on odkmeta! We're glad it
has proven useful to Stata users.

We're also excited to announce that the code and helpfile are now available
on GitHub: https://github.com/matthew-white/odkmeta.

If you have feature requests or encounter bugs, please feel free to add
Issues.

We'd also love to start working with other Stata/Mata developers to keep
the code up-to-date as new the ODK team make new releases; see the
"Contributing" section if you are interested. And we hope you are.

Thanks again,
Matt, Lindsey, IPA

··· On Wed, Jan 15, 2014 at 10:40 AM, Lindsey Shaughnessy < lshaughnessy@poverty-action.org> 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 mitchellsundt@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 < lshaughnessy@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 < lshaughnessy@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: lshaughnessy@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/groups/opt_out.

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

--

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/groups/opt_out.

--
Lindsey Shaughnessy
Data Coordinator
Innovations for Poverty Action

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

--
Lindsey Shaughnessy
Data Coordinator
Innovations for Poverty Action

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

Ayoub, odkmeta is, and has been, available on SSC. Type *ssc install
odkmeta *while in Stata to install it.

It includes a readme/helpfile/examples if you install and then type help
odkmeta
while in Stata. 99% of questions can be answered by reading the
helpfile, so please read it thoroughly.

Happy to see similar work in R, Edouard.

··· -- *Lindsey Shaughnessy* Global Research and Data Support +1-508-932-6435 | lshaughnessy@poverty-action.org

On Thu, May 25, 2017 at 10:32 AM, Ayoub Kakande akakande@gmail.com wrote:

HI Lindsey Shaughnessy
I use both ODK and STATA on a daily basis
am not seeing the attached package would really love to try it out.

Thanks
Ayoub

On 25 May 2017 at 17:10, edouard.legoupil@gmail.com wrote:

That's one of my project -- still work in progress but happy to get
feedback if any

Best,
Edouard

Le vendredi 20 décembre 2013 18:46:59 UTC+2, Lindsey Shaughnessy a écrit :

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

--
--
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.

--
**In sun set years education is not associated with standard of living and
medical care access; it is the the financial myosin and actin!!!

**** Don't give me fish, teach me how to fish

Kayoub K
0772656158 / 0703516660
Data Manager
Mujhu Research Collaboration
Mulago Hosp
Msc Enterprise Architecture

--

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.

Hi Lindsey

Thanks for the work on ODKMeta

However am getting the following error

column header list_name not found

invalid listname() suboption

invalid choices() option

when I run

odkmeta using import.do, csv("d:\Surveilence and case_control 09 Mar 2017_InfantInfo.csv") survey("D:\s\survey.csv") choices("d:\s\choices.csv")

Any help?

choices.csv (13 KB)

survey.csv (82.4 KB)

Surveilence and case_control 09 Mar 2017_InfantInfo.csv (2.29 KB)

··· From: opendatakit@googlegroups.com [mailto:opendatakit@googlegroups.com] On Behalf Of Lindsey Shaughnessy Sent: Thursday, May 25, 2017 5:46 To: opendatakit@googlegroups.com Subject: Re: [ODK Community] Re: New resource available: Stata program for handling ODK forms and data

Ayoub, odkmeta is, and has been, available on SSC. Type ssc install odkmeta while in Stata to install it.

It includes a readme/helpfile/examples if you install and then type help odkmeta while in Stata. 99% of questions can be answered by reading the helpfile, so please read it thoroughly.

Happy to see similar work in R, Edouard.

--

Lindsey Shaughnessy

Global Research and Data Support

+1-508-932-6435 | mailto:lshaughnessy@poverty-action.org lshaughnessy@poverty-action.org

On Thu, May 25, 2017 at 10:32 AM, Ayoub Kakande <akakande@gmail.com mailto:akakande@gmail.com > wrote:

HI Lindsey Shaughnessy

I use both ODK and STATA on a daily basis

am not seeing the attached package would really love to try it out.

Thanks

Ayoub

On 25 May 2017 at 17:10, <edouard.legoupil@gmail.com mailto:edouard.legoupil@gmail.com > wrote:

write a similar program for R --> https://github.com/Edouard-Legoupil/koboloadeR/blob/master/README.md https://github.com/Edouard-Legoupil/koboloadeR/blob/master/README.md

That's one of my project -- still work in progress but happy to get feedback if any

Best,
Edouard

Le vendredi 20 décembre 2013 18:46:59 UTC+2, Lindsey Shaughnessy a écrit :

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

--

Post: opendatakit@googlegroups.com mailto:opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com mailto:opendatakit%2Bunsubscribe@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 mailto:opendatakit+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/d/optout.

--

**In sun set years education is not associated with standard of living and medical care access; it is the the financial myosin and actin!!!

**** Don't give me fish, teach me how to fish

Kayoub K
0772656158 / 0703516660
Data Manager
Mujhu Research Collaboration
Mulago Hosp

Msc Enterprise Architecture

--

Post: opendatakit@googlegroups.com mailto:opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com mailto:opendatakit%2Bunsubscribe@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 mailto:opendatakit+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/d/optout.

--

Post: opendatakit@googlegroups.com mailto:opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com mailto: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 mailto:opendatakit+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/d/optout.

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 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 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 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 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

Dear All,

I must thank Lindsey for her suggestion:

The problem that was breaking the do-file run was quite simple: ODK Aggregate exports the csv file with ":" instead of "-" when naming the nested groups-- the solution, as suggested by Lindsey was to do a simple find/replace and run it again.

Its working now!

Warm Regards
Adeeb

Dear Lindsey,

I don't know if this is the right place to post this particular problem (apologies Yaw if it isn't), but my thinking is that odkmeta has great potential and this problem is really a vexing one.

I have manage to successfully create a do-file for STATA using odkmeta but the run breaks every time it comes to the following:

  • Duplicate variable name with grp_hh_mem-grp_hhmem_brk-totalchild_6to18
    . local pos : list posof "grp_hh_mem-grp_hhmem_brk-totalchild_below6" in fields

. local var : word pos' of all'
invalid syntax
r(198);

end of do-file

r(198);

As far as I can tell this happens for every variable name which exceeds the 32 character limit. I have perused the help file that came with odkmeta and it seems that the way that odkmeta handles naming of variables in nested group creates this particular type of command sequence each time (pulled from the do-file)

  • totalchild_below6
  • Duplicate variable name with grp_hh_mem-grp_hhmem_brk-totalchild_6to18
    local pos : list posof "grp_hh_mem-grp_hhmem_brk-totalchild_below6" in fields
    local var : word pos' of all'
    char var'[Odk_name] totalchild_below6 char var'[Odk_bad_name] 1
    char var'[Odk_group] grp_hh_mem grp_hhmem_brk char var'[Odk_long_name] grp_hh_mem-grp_hhmem_brk-totalchild_below6
    char var'[Odk_type] integer char var'[Odk_or_other] 0
    char var'[Odk_is_other] 0 char var'[Odk_label] A17. Number of children in HH under age 6

Another Example:

  • gr_who_ecoorn
  • Duplicate variable name with grp_hh_decision_shared-gr_who_ecoland
    local pos : list posof "grp_hh_decision_shared-gr_who_ecoorn" in fields
    local var : word pos' of all'
    char var'[Odk_name] gr_who_ecoorn char var'[Odk_bad_name] 1
    char var'[Odk_group] grp_hh_decision_shared char var'[Odk_long_name] grp_hh_decision_shared-gr_who_ecoorn
    char var'[Odk_type] select_one gr_who_list char var'[Odk_list_name] gr_who_list
    char var'[Odk_or_other] 0 char var'[Odk_is_other] 0
    char `var'[Odk_label] A25.13 Purchase/selling of ornaments

Given how many nested groups we have in this survey okdmeta creates this type of command sequence many many times.

Can you suggest a workaround?

Warm Regards
Adeeb Choudhury

(again, apologies to Yaw if this isn't the right place to post this)
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

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

Dear Adeeb,

Could you specify what find/replace you ran exactly?

I'm not quite following what you did. In my csv file the groups were separated by forward slashes (so group_1/subgroup_1/var1). To overcome an earlier error I did a find/replace in the csv file to turn this into group_1-subgroup1-var1.

However, my odkmeta do-file gives me the same error you had:

local var : word pos' of all'
invalid syntax
r(198);

Kind regards,

Paul

··· On Tuesday, 6 May 2014 08:19:44 UTC+2, Adeeb Choudhury wrote: > On Sunday, 4 May 2014 15:42:52 UTC+6, Adeeb Choudhury wrote: > On Wednesday, 15 January 2014 03:45:40 UTC+6, Lindsey Shaughnessy wrote: > On Fri, Dec 20, 2013 at 11:46 AM, Lindsey Shaughnessy wrote:

Ayoub

The could be precisely due to what is reported: column header list_name
not found

Thus, in your choices worksheet, replace list name with list_name

I think the other two errors should go away after this correction.

··· On Saturday, May 27, 2017 at 11:55:40 AM UTC+3, Ayoub Kakande wrote: > > Hi *Lindsey* > > *Thanks for the work on ODKMeta* > > *However am getting the following error* > > column header list_name not found > > invalid listname() suboption > > invalid choices() option > > when I run > > *odkmeta using import.do, csv("d:\Surveilence and case_control 09 Mar > 2017_InfantInfo.csv") survey("D:\s\survey.csv") choices("d:\s\choices.csv")* > > > > *Any help?* > > *From:* opend...@googlegroups.com [mailto: > opend...@googlegroups.com ] *On Behalf Of *Lindsey > Shaughnessy > *Sent:* Thursday, May 25, 2017 5:46 > *To:* opend...@googlegroups.com > *Subject:* Re: [ODK Community] Re: New resource available: Stata program > for handling ODK forms and data > > > > Ayoub, odkmeta is, and has been, available on SSC. Type *ssc install > odkmeta *while in Stata to install it. > > > > It includes a readme/helpfile/examples if you install and then type *help > odkmeta* while in Stata. 99% of questions can be answered by reading the > helpfile, so please read it thoroughly. > > > > Happy to see similar work in R, Edouard. > > > > > -- > > *Lindsey Shaughnessy* > > Global Research and Data Support > > +1-508-932-6435 | lshaughnessy@poverty-action.org > > > > On Thu, May 25, 2017 at 10:32 AM, Ayoub Kakande <akak...@gmail.com > wrote: > > HI Lindsey Shaughnessy > > I use both ODK and STATA on a daily basis > > am not seeing the attached package would really love to try it out. > > Thanks > > Ayoub > > > > On 25 May 2017 at 17:10, <edouard....@gmail.com > wrote: > > *write a similar program for R *--> https://github.com/Edouard-Legoupil/koboloadeR/blob/master/README.md > > > That's one of my project -- still work in progress but happy to get > feedback if any > > Best, > Edouard > > Le vendredi 20 décembre 2013 18:46:59 UTC+2, Lindsey Shaughnessy a écrit : > > 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 > > > > -- > -- > 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. > > > > -- > > **In sun set years education is not associated with standard of living and > medical care access; it is the the financial myosin and actin!!! > > **** Don't give me fish, teach me how to fish > > Kayoub K > 0772656158 / 0703516660 > Data Manager > Mujhu Research Collaboration > Mulago Hosp > > Msc Enterprise Architecture > > -- > -- > 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. > > > > -- > -- > 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. >

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 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 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 > >

Hi Paul,

It seems you did the right thing, replacing slashes with dashes in your
variable names in your csv data file. You are welcome to send me your forms
and data to take a look, provided you first strip any identifying
information from your data.

Thanks,
Lindsey

··· On Tue, Sep 2, 2014 at 5:18 PM, wrote:

On Tuesday, 6 May 2014 08:19:44 UTC+2, Adeeb Choudhury wrote:

Dear All,

I must thank Lindsey for her suggestion:

The problem that was breaking the do-file run was quite simple: ODK
Aggregate exports the csv file with ":" instead of "-" when naming the
nested groups-- the solution, as suggested by Lindsey was to do a simple
find/replace and run it again.

Its working now!

Warm Regards
Adeeb

On Sunday, 4 May 2014 15:42:52 UTC+6, Adeeb Choudhury wrote:
Dear Lindsey,

I don't know if this is the right place to post this particular problem
(apologies Yaw if it isn't), but my thinking is that odkmeta has great
potential and this problem is really a vexing one.

I have manage to successfully create a do-file for STATA using odkmeta
but the run breaks every time it comes to the following:

  • Duplicate variable name with grp_hh_mem-grp_hhmem_brk-totalchild_6to18
    . local pos : list posof "grp_hh_mem-grp_hhmem_brk-totalchild_below6" in
    fields

. local var : word pos' of all'
invalid syntax
r(198);

end of do-file

r(198);

As far as I can tell this happens for every variable name which exceeds
the 32 character limit. I have perused the help file that came with odkmeta
and it seems that the way that odkmeta handles naming of variables in
nested group creates this particular type of command sequence each time
(pulled from the do-file)


  • totalchild_below6
  • Duplicate variable name with grp_hh_mem-grp_hhmem_brk-totalchild_6to18
    local pos : list posof "grp_hh_mem-grp_hhmem_brk-totalchild_below6" in
    fields
    local var : word pos' of all'
    char var'[Odk_name] totalchild_below6 char var'[Odk_bad_name] 1
    char var'[Odk_group] grp_hh_mem grp_hhmem_brk char var'[Odk_long_name] grp_hh_mem-grp_hhmem_brk-totalchild_below6
    char var'[Odk_type] integer char var'[Odk_or_other] 0
    char var'[Odk_is_other] 0 char var'[Odk_label] A17. Number of children in HH under age 6

Another Example:

  • gr_who_ecoorn
  • Duplicate variable name with grp_hh_decision_shared-gr_who_ecoland
    local pos : list posof "grp_hh_decision_shared-gr_who_ecoorn" in fields
    local var : word pos' of all'
    char var'[Odk_name] gr_who_ecoorn char var'[Odk_bad_name] 1
    char var'[Odk_group] grp_hh_decision_shared char var'[Odk_long_name] grp_hh_decision_shared-gr_who_ecoorn
    char var'[Odk_type] select_one gr_who_list char var'[Odk_list_name] gr_who_list
    char var'[Odk_or_other] 0 char var'[Odk_is_other] 0
    char `var'[Odk_label] A25.13 Purchase/selling of ornaments

Given how many nested groups we have in this survey okdmeta creates this
type of command sequence many many times.

Can you suggest a workaround?

Warm Regards
Adeeb Choudhury

(again, apologies to Yaw if this isn't the right place to post this)
On Wednesday, 15 January 2014 03:45:40 UTC+6, Lindsey Shaughnessy 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

Dear Adeeb,

Could you specify what find/replace you ran exactly?

I'm not quite following what you did. In my csv file the groups were
separated by forward slashes (so group_1/subgroup_1/var1). To overcome an
earlier error I did a find/replace in the csv file to turn this into
group_1-subgroup1-var1.

However, my odkmeta do-file gives me the same error you had:

local var : word pos' of all'
invalid syntax
r(198);

Kind regards,

Paul

--

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