Project structure

This documentation explains how to use variableMetadataProduction in the secured offline area (“geschützter Bereich”). In the FDZ partition’s root directory you find the directory Variablenexport, which contains the directories Projekte, variableMetadataPreparation_productive, variableMetadataPreparation_test and, miniCRAN_VariableMetadataPreparation. The relevant directory for the end user is the Projekte directory, in which each project has its own subdirectory, e.g. Projekte/gra2005.

Each project directory has the following structure:

Projekte/
├── gra2005
|   ├── data-raw/
│   |   ├── excel
|   |   |  ├── conditions.xlsx
|   |   |  ├── vimport_ds1.xsls
|   |   |  └── vimport_ds2.xlsx
│   |   ├── stata
|   |   |  ├── ds1.dta
|   |   |  └── ds2.dta
├───└── output/
│       ├── ds1/
│       └── ds2/
└── variablesToJson.bat

The data-raw directory contains the stata subdatasets, a conditions.xlsx file, and one vimport_dsx.xlsx file per subdataset. The output directory will be automatically populated with the correct subdirectories, as well as the variable-metadata-jsons.

Modifying variablesToJson.bat

You need to modify only the line starting with Rscript in the variablesToJson.bat file. You need to adapt the project name in the paths specified in this line and at the end the variables which should not get a distribution. You find an example file here:

https://github.com/dzhw/variableMetadataPreparation/blob/master/bin/variablesToJson.bat.tmpl

An example project with appropriate variablesToJson.bat can be found at Q://Variablenexport/example_projects/cmp2014.