help for opendf write (opendf_write) version 2.0.2 (28 August 2024)

opendf write -- Saves data in the opendf-format as opendf-zip folder containing a csv(data) and a xml(metadate) file.

Syntax

opendf write output [,input() languages() variables() replace verbose]

options

output(string) (Path and) Name of the output-zip-folder.

input(string) A path to a Stata dataset which should be saved in opendf-format.

languages(string) Chooses, which languages to keep. Default is all.

variables(string) Chooses, which Variables to keep. Default is all.

replace Overwrite the opendf file.

verbose More warnings are displayed.

Description

opendf write Saves a dataset in the opendf-format (zip-folder). The Output is a zip-folder that contains a csv-file with the data and a xml-file with the meta data.

output Name of the output-zip-folder. Can also include a path where to save the output. The extension ".zip" can be omited.

input A Stata dataset (.dta) that should be saved in the opendf-format.

languages The languages that should be saved in the opendf-file. Default is all.

variables Indicates the variables that should be saved in the opendf-file. Default is all.

replace Indicates whether any existing file with this name should be overwritten.

verbose If activated, more warnings are displayed.

Remarks

This command from the opendf package is part of the Open Data Format Project bundle, written to assist with survey data files in the open data format(.zip).

Due to cross-plattform compability of the Open Data Format some Stata-specific features are not supported by the ODF.

There are no value label names in the ODF. Therefore, value label names are lost when a datset is written to ODF. Value labels reveice generic names when an ODF file is read in Stata.

Extended missings for numeric variables (.a, .b, ..., .z) are not available in ODF specification. Therefore, extended missings are converted to ordinary missings (.)

Value Labels of extended missings er not written to ODF file.

Examples

Saves the dataset that is currently loaded in Stata as zip-folder out.zip in the current working directory.

. opendf write "out.zip"

Saves the dataset that is currently loaded in Stata with the labels and descriptions in english as zip-folder out.zip in the current working directory. The

. opendf write "out", languages("en")

Saves the variables pid, cid, hid, syear, name, bap9001 from the dataset that is currently loaded in Stata with the labels and descriptions in english as zip-folder out.zip in the current working directory.

. opendf write "out.zip", languages("en") variables(pid cid hid syear name bap9001)

Author

Tom Hartl (thartl@diw.de), Deutsches Institut für Wirtschaftsforschung Berlin.

Also see

Help: opendf read, opendf write, opendf docu