How to use ODKmeta?

What is the problem? Please be detailed.

I have exported my data and want to use it in STATA. How can i use ODKmeta to create a do file?
My first step was installing ODKmeta in stata and then I imported the file but no do file was created ? Am I using the right steps ? is ODKmeta going to generate the do file or me who should do it ?
What ODK tool and version are you using? And on what device and operating system version?

What steps can we take to reproduce the problem?

please guide me to the right steps to use ODKmeta
What you have you tried to fix the problem?

tried to see the odkmeta beta but these were no steps there to show


Anything else we should know or have? If you have a test form or screenshots or logs, attach here.

Go through with below post and i believe you will able to use ODKmeta easily.


1 Like

write below command in your Stata CLI

cd "Path"
odkmeta using, csv("ODKexample.csv") survey("survey.csv") choices("choices.csv") other(99) replace

*Here you need to make 3 sheets, first one is output, second one is the survey and the third one is choices sheet.



Thanks a lot Narendra,

I have few Q if you don't mind.

Can I just import the CSV file in stata and start the anlaysis without using ODKmeta? because I tried to import the file and it worked ..not sure this is the right way or not and if using this way will make me lose some data ?

Regarding the commands ..My CSV file has the choices that particaipns made and no survey or choices contain the naswes of the survey only ..I attached here a test example to see . How do I use ODKmeta for that and what commands should i use to have the do file by ODKmeta .

Thnaks and I apolgies for asking many Questions

Abrar test1_results (2).csv (8.3 KB)

The answer to your Questions are below:

Answer: I believe you should go through with ODK basics because a good form of ODK needs to contain survey, choice, settings. You can go through with below video for your learning purpose.

Thanks Narendra for your answers

Is there any manual for ODKmeta step by step how to start and create its do file and all the commands?

Regarding the ODK form , I already created a form which contains survey, choice and settings but this was the form for data collection . When I exported the collected data from my ODK account , it gave me answers only and no survey, choice, settings were exported with the data . I don't know where is the problem in my export ? do we have to export the survey, choice, settings when we export data from the ODK ? and how to do that ?


When you will export then CSV file will come.
For use of ODKmeta, you need your Data Collection excel form only. With the help of Data Collection form, you can make your do file.
You need to make 3 files with your Data Collection Form.
First Excel sheet need to contain Survey.
Second excel sheet need to contain Choices.
And the Third one will be your response which you got from Data Collector which only contains Answers.



I just wanted to chime in with a couple of comments:

The output of odkmeta is a do-file that you can run to import your data, but you are always able to create your own do-file. Stata ships with a command to import .csv data: import delimited, or insheet in older versions. If you review the odkmeta do-file, you'll see that it uses such commands.

If you have a simple form and you've never imported ODK data to Stata, you might learn a lot about the structure of the data or about Stata by writing your own do-file.

However, especially for more complex forms, I've seen research analysts and others struggle to quickly write a robust do-file to import the data. odkmeta not only imports the .csv data, it also applies the metadata described in the XLSForm, attaching variable and value labels, splitting select_multiple variables, formatting date and time variables, and merging repeat groups, among other tasks. It's that metadata piece that gives odkmeta its name: odkmeta imports ODK data while also applying the form metadata.

The odkmeta help file has detailed documentation. odkmeta also comes with an example form and data: type ssc install odkmeta, all to download those. If you find any part of the documentation confusing, we would welcome a GitHub issue.


Thanks Matthew, I will let you know if i have any question , Thanks a lot

@iamnarendrasingh, do we need three sheets in the one CSV file or three separated CSV files. What do you mean by output? Is it the data we export from the server?