help for opendf_dta2csv version 2.0.2 (28 August 2024)

opendf_dta2csv -- builds csv files containing meta data for survey data from a Stata dataset (.dta).

Syntax

opendf_dta2csv
, {output_dir()} [{languages()} ]

options

output_dir(string) Specifies a directory where to save the csvs.

languages(string) Specifies which label and description languages should be written to the csvs. (Default: "all")

input(string) Specifies a .dta file that should be loaded and written to csvs.

Description

opendf_dta2csv Transforms survey data from dta-format including metadata saved in labels and characteristics to four csvs files (data.csv, dataset.csv, variables.csv and categories.csv) in a specified directory.

output_dir Indicates the folder where the csv files are saved.

languages Indicates which languages to keep. Default is "all".

input Indicates a .dta file that should be loaded and written to csv. Default is the dataset currently loaded in Stata.

data.csv containings the data.

dataset.csv contains the metadata of the dataset

variables.csv contains the metadata of the variables.

categories.csv contains the metadata of the values.

Metadata is taken from the labels and characteristics.

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

Examples

Saves the dataset that is currently loaded in 4 csvs in the current working directory.

. opendf_dta2csv, output_dir("`c(pwd)'")

Author

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

Also see

Help: opendf_read, opendf_write, opendf_docu, opendf_csv2dta, opendf_csv2zip, opendf_zip2csv