help for opendf csv2zip (opendf_csv2zip) version 2.0.2 (28 August 2024)

opendf_csv2zip -- generates an opendf-format zip-file from csv files containing data meta data for survey data.

Syntax

opendf_csv2zip,
output() [input() variables_arg() export_data() verbose]

options

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

input(string) Indicates location of csvs.

variables_arg(string) Specifies whether variable metadata should be exported. Default is "yes".

export_data(string) Indicates whether the data.csv should be exported to the opendf-zip file. Default is "yes".

verbose More warnings are displayed.

Description

opendf_csv2zip Transforms survey data from several csv files into dta-format including metadata saved in labels and characteristics.

The file containing the data has to be named data.csv

The file containing the metadata for the datset has to be named dataset.csv

The file containing the metadata for the variables has to be named variables.csv

The file containing the metadata for the values has to be named categories.csv

output Name of the output-zip-folder. Can also include a path where to save the output.

input is a path to a folder where 4 csvs have to be included that contain data and metadata.

If you are exporting the entire dataset, you can choose whether or not to export all available metadata (labels and descriptions of the dataset and the variables).

By default all metadata is exported (variables_arg("yes")): information describing the dataset itself, as well as information describing all variables in the dataset.

If you set variables_arg("no"), only the information describing the dataset is exported.

Option export_data indicates whether the data.csv should be exported to the opendf-zip file. Default is export_data("yes"). To save a dataset in opendf-format "yes" is necessary. Otherwise only the xml with the metadata is created.

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

Builds and saves the datafile out.zip in the current working directory in opendf-format (.zip) from the four csvs located in "C:/Documents/Data".

. opendf_csv2zip, output("out.zip") input("C:/Documents/Data")

Author

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

Also see

Help: opendf_read, opendf_write, opendf_docu, opendf_csv2dta